diff options
author | redmatrix <git@macgirvin.com> | 2016-03-31 16:06:03 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-03-31 16:06:03 -0700 |
commit | 9abd95fad3784a10fc48bc40f9b8a75d7d74edda (patch) | |
tree | 3cf2eec6a29f384b80a8c607aa97172b84e37e62 /include/smarty.php | |
parent | 256c228efd249f2ce93405db8e36f52030aa4876 (diff) | |
download | volse-hubzilla-9abd95fad3784a10fc48bc40f9b8a75d7d74edda.tar.gz volse-hubzilla-9abd95fad3784a10fc48bc40f9b8a75d7d74edda.tar.bz2 volse-hubzilla-9abd95fad3784a10fc48bc40f9b8a75d7d74edda.zip |
static App
Diffstat (limited to 'include/smarty.php')
-rwxr-xr-x | include/smarty.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/smarty.php b/include/smarty.php index 99f143db1..3812c6021 100755 --- a/include/smarty.php +++ b/include/smarty.php @@ -16,19 +16,19 @@ class FriendicaSmarty extends Smarty { // setTemplateDir can be set to an array, which Smarty will parse in order. // The order is thus very important here $template_dirs = array('theme' => "view/theme/$theme/tpl/"); - if( x($a->theme_info,"extends") ) - $template_dirs = $template_dirs + array('extends' => "view/theme/".$a->theme_info["extends"]."/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('base' => 'view/tpl/'); $this->setTemplateDir($template_dirs); - $basecompiledir = $a->config['system']['smarty3_folder']; + $basecompiledir = App::$config['system']['smarty3_folder']; $this->setCompileDir($basecompiledir.'/compiled/'); $this->setConfigDir($basecompiledir.'/config/'); $this->setCacheDir($basecompiledir.'/cache/'); - $this->left_delimiter = $a->get_template_ldelim('smarty3'); - $this->right_delimiter = $a->get_template_rdelim('smarty3'); + $this->left_delimiter = App::get_template_ldelim('smarty3'); + $this->right_delimiter = App::get_template_rdelim('smarty3'); // Don't report errors so verbosely $this->error_reporting = E_ALL & ~E_NOTICE; @@ -53,7 +53,7 @@ class FriendicaSmartyEngine implements ITemplateEngine { // Cannot use get_config() 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',$a->config['system'])) ? $a->config['system']['smarty3_folder'] : ''); + $basecompiledir = ((array_key_exists('smarty3_folder',App::$config['system'])) ? App::$config['system']['smarty3_folder'] : ''); if (!$basecompiledir) $basecompiledir = dirname(__dir__) . "/" . TEMPLATE_BUILD_PATH; if (!is_dir($basecompiledir)) { echo "<b>ERROR:</b> folder <tt>$basecompiledir</tt> does not exist."; killme(); @@ -61,7 +61,7 @@ class FriendicaSmartyEngine implements ITemplateEngine { if(!is_writable($basecompiledir)){ echo "<b>ERROR:</b> folder <tt>$basecompiledir</tt> must be writable by webserver."; killme(); } - $a->config['system']['smarty3_folder'] = $basecompiledir; + App::$config['system']['smarty3_folder'] = $basecompiledir; } // ITemplateEngine interface @@ -94,8 +94,8 @@ class FriendicaSmartyEngine implements ITemplateEngine { public function get_intltext_template($file, $root='') { $a = get_app(); - if(file_exists("view/{$a->language}/$file")) - $template_file = "view/{$a->language}/$file"; + if(file_exists("view/{App::$language}/$file")) + $template_file = "view/{App::$language}/$file"; elseif(file_exists("view/en/$file")) $template_file = "view/en/$file"; else |