aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Render/Comanche.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-07-06 11:05:22 +0000
committerMario <mario@mariovavti.com>2024-07-06 11:05:22 +0000
commit45275910e606a02b12393714ea3b0409da440d61 (patch)
tree10b2d173d58cb930f8df28fe75af73dd4974c08c /Zotlabs/Render/Comanche.php
parent0c1d0f7498661fb34dcca6f3c6566e757af310a7 (diff)
parentc04e781926a78e514cdf211fa24930a331149072 (diff)
downloadvolse-hubzilla-45275910e606a02b12393714ea3b0409da440d61.tar.gz
volse-hubzilla-45275910e606a02b12393714ea3b0409da440d61.tar.bz2
volse-hubzilla-45275910e606a02b12393714ea3b0409da440d61.zip
Merge branch '9.2RC'master
Diffstat (limited to 'Zotlabs/Render/Comanche.php')
-rw-r--r--Zotlabs/Render/Comanche.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/Zotlabs/Render/Comanche.php b/Zotlabs/Render/Comanche.php
index 7288c7fd7..ba0d77c39 100644
--- a/Zotlabs/Render/Comanche.php
+++ b/Zotlabs/Render/Comanche.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Render;
+use Zotlabs\Lib\Config;
+
require_once('include/security.php');
require_once('include/menu.php');
@@ -157,7 +159,7 @@ class Comanche {
* @brief Replace conditional variables with real values.
*
* Currently supported condition variables:
- * * $config.xxx.yyy - get_config with cat = xxx and k = yyy
+ * * $config.xxx.yyy - Config::Get with cat = xxx and k = yyy
* * $request - request uri for this page
* * $observer.language - viewer's preferred language (closest match)
* * $observer.address - xchan_addr or false
@@ -172,7 +174,7 @@ class Comanche {
if($v) {
$x = explode('.', $v);
if($x[0] == 'config')
- return get_config($x[1],$x[2]);
+ return Config::Get($x[1],$x[2]);
elseif($x[0] === 'request')
return $_SERVER['REQUEST_URI'];
elseif($x[0] === 'local_channel') {
@@ -208,18 +210,18 @@ class Comanche {
*
* This is extensible. The first version of variable testing supports tests of the forms:
*
- * - [if $config.system.foo ~= baz] which will check if get_config('system','foo') contains the string 'baz';
- * - [if $config.system.foo == baz] which will check if get_config('system','foo') is the string 'baz';
- * - [if $config.system.foo != baz] which will check if get_config('system','foo') is not the string 'baz';
- * - [if $config.system.foo >= 3] which will check if get_config('system','foo') is greater than or equal to 3;
- * - [if $config.system.foo > 3] which will check if get_config('system','foo') is greater than 3;
- * - [if $config.system.foo <= 3] which will check if get_config('system','foo') is less than or equal to 3;
- * - [if $config.system.foo < 3] which will check if get_config('system','foo') is less than 3;
+ * - [if $config.system.foo ~= baz] which will check if Config::Get('system','foo') contains the string 'baz';
+ * - [if $config.system.foo == baz] which will check if Config::Get('system','foo') is the string 'baz';
+ * - [if $config.system.foo != baz] which will check if Config::Get('system','foo') is not the string 'baz';
+ * - [if $config.system.foo >= 3] which will check if Config::Get('system','foo') is greater than or equal to 3;
+ * - [if $config.system.foo > 3] which will check if Config::Get('system','foo') is greater than 3;
+ * - [if $config.system.foo <= 3] which will check if Config::Get('system','foo') is less than or equal to 3;
+ * - [if $config.system.foo < 3] which will check if Config::Get('system','foo') is less than 3;
*
- * - [if $config.system.foo {} baz] which will check if 'baz' is an array element in get_config('system','foo')
- * - [if $config.system.foo {*} baz] which will check if 'baz' is an array key in get_config('system','foo')
- * - [if $config.system.foo] which will check for a return of a true condition for get_config('system','foo');
- * - [if !$config.system.foo] which will check for a return of a false condition for get_config('system','foo');
+ * - [if $config.system.foo {} baz] which will check if 'baz' is an array element in Config::Get('system','foo')
+ * - [if $config.system.foo {*} baz] which will check if 'baz' is an array key in Config::Get('system','foo')
+ * - [if $config.system.foo] which will check for a return of a true condition for Config::Get('system','foo');
+ * - [if !$config.system.foo] which will check for a return of a false condition for Config::Get('system','foo');
*
* The values 0, '', an empty array, and an unset value will all evaluate to false.
*