mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
comments
This commit is contained in:
parent
5508feb6ce
commit
712b2b1bb2
1 changed files with 4 additions and 0 deletions
|
@ -126,6 +126,10 @@ function comanche_parser(&$a, $s, $pass = 0) {
|
||||||
|
|
||||||
function comanche_test_condition($s) {
|
function comanche_test_condition($s) {
|
||||||
|
|
||||||
|
// This is extensible. The first version of variable testing supports tests of the form
|
||||||
|
// [if $config.system.foo] which will check for a return of a true condition for get_config('system','foo');
|
||||||
|
// The values 0, '', an empty array, and an unset value will all evaluate to false.
|
||||||
|
|
||||||
if(preg_match("/[\$]config[\.](.*?)/",$s,$matches)) {
|
if(preg_match("/[\$]config[\.](.*?)/",$s,$matches)) {
|
||||||
$x = explode('.',$s);
|
$x = explode('.',$s);
|
||||||
if(get_config($x[1],$x[2]))
|
if(get_config($x[1],$x[2]))
|
||||||
|
|
Loading…
Reference in a new issue