aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Render
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Render')
-rw-r--r--Zotlabs/Render/Comanche.php28
-rw-r--r--Zotlabs/Render/SmartyInterface.php2
-rw-r--r--Zotlabs/Render/SmartyTemplate.php2
-rw-r--r--Zotlabs/Render/Theme.php6
4 files changed, 20 insertions, 18 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.
*
diff --git a/Zotlabs/Render/SmartyInterface.php b/Zotlabs/Render/SmartyInterface.php
index d80ea3f3a..64c6aa377 100644
--- a/Zotlabs/Render/SmartyInterface.php
+++ b/Zotlabs/Render/SmartyInterface.php
@@ -20,7 +20,7 @@ class SmartyInterface extends Smarty {
$template_dirs = array('theme' => "view/theme/$thname/tpl/");
if ( x(App::$theme_info,"extends") ) {
- $template_dirs = $template_dirs + array('extends' => "view/theme/" . \App::$theme_info["extends"] . "/tpl/");
+ $template_dirs = $template_dirs + array('extends' => "view/theme/" . App::$theme_info["extends"] . "/tpl/");
}
$template_dirs = $template_dirs + array('base' => 'view/tpl/');
$this->setTemplateDir($template_dirs);
diff --git a/Zotlabs/Render/SmartyTemplate.php b/Zotlabs/Render/SmartyTemplate.php
index 2cb96521b..79f03637b 100644
--- a/Zotlabs/Render/SmartyTemplate.php
+++ b/Zotlabs/Render/SmartyTemplate.php
@@ -11,7 +11,7 @@ class SmartyTemplate implements TemplateEngine {
public function __construct() {
- // Cannot use get_config() here because it is called during installation when there is no DB.
+ // Cannot use Config::Get() here because it is called during installation when there is no DB.
// FIXME: this may leak private information such as system pathnames.
$basecompiledir = ((array_key_exists('smarty3_folder', App::$config['system']))
diff --git a/Zotlabs/Render/Theme.php b/Zotlabs/Render/Theme.php
index 543bf7a3f..a42b65e03 100644
--- a/Zotlabs/Render/Theme.php
+++ b/Zotlabs/Render/Theme.php
@@ -24,7 +24,7 @@ class Theme {
*
* @return array
*/
- static public function current(){
+ static public function current() {
self::$system_theme = ((isset(App::$config['system']['theme']))
? App::$config['system']['theme'] : '');
@@ -37,7 +37,7 @@ class Theme {
if(App::$profile_uid) {
$r = q("select channel_theme from channel where channel_id = %d limit 1",
- intval(\App::$profile_uid)
+ intval(App::$profile_uid)
);
if($r) {
$page_theme = $r[0]['channel_theme'];
@@ -46,7 +46,7 @@ class Theme {
// Themes from Comanche layouts over-ride the channel theme
- if(array_key_exists('theme', \App::$layout) && \App::$layout['theme']) {
+ if(array_key_exists('theme', App::$layout) && App::$layout['theme']) {
$page_theme = App::$layout['theme'];
}