summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/config.rst26
1 files changed, 25 insertions, 1 deletions
diff --git a/doc/source/config.rst b/doc/source/config.rst
index d7f7f24..ac8aef1 100644
--- a/doc/source/config.rst
+++ b/doc/source/config.rst
@@ -78,7 +78,7 @@ Miscellaneous
78conditions 78conditions
79^^^^^^^^^^ 79^^^^^^^^^^
80 80
81It's possible to use conditions to have configuration portables accross 81It's possible to use conditions to have configuration portable across
82several setups. 82several setups.
83 83
84:: 84::
@@ -88,6 +88,30 @@ several setups.
88 # some other rules 88 # some other rules
89 @end_condition; 89 @end_condition;
90 90
91Conditions accept variables and the special function ``extension_loadod()``.
92
93::
94 @condition extension_loaded("sqlite3");
95 sp.ini.key("sqlite3.extension_dir").ro();
96 @end_condition;
97
98Conditions cannot be nested, but arithmetic and logical operations can be applied.
99
100::
101 @condition extension_loaded("session") && PHP_VERSION_ID <= 80200;
102 set whitelist "my_fun,cos"
103 sp.eval_whitelist.list(whitelist).simulation().dump("/tmp/dump_result/");
104 @end_condition;
105
106variables
107^^^^^^^^^
108
109You may set a configuration variable using the ``set`` keyword (or ``@set``) and use it instead of arguments.
110
111::
112 @set CMD "ls"
113 sp.disable_function.function("system").pos("0").value(CMD).allow();
114
91global 115global
92^^^^^^ 116^^^^^^
93 117