diff --git a/conlite/plugins/smarty/cl_plugin.xml b/conlite/plugins/smarty/cl_plugin.xml index 3d11bb0..dcfee41 100644 --- a/conlite/plugins/smarty/cl_plugin.xml +++ b/conlite/plugins/smarty/cl_plugin.xml @@ -9,11 +9,11 @@ (c) 2017 Ortwin Pinke, PHP-Backoffice.de info@php-backoffice.de http://php-backoffice.de - 1.0.0 + 1.0.2 GNU Lesser General Public License - + \ No newline at end of file diff --git a/conlite/plugins/smarty/classes/class.smarty.backend.php b/conlite/plugins/smarty/classes/class.smarty.backend.php index 4a0088b..3f934b2 100644 --- a/conlite/plugins/smarty/classes/class.smarty.backend.php +++ b/conlite/plugins/smarty/classes/class.smarty.backend.php @@ -2,13 +2,23 @@ /** * This file contains the backend class for smarty wrapper plugin. * + * @package Plugin + * @subpackage SmartyWrapper + * @version $Rev$ + * @since 2.0.2 + * @author Ortwin Pinke + * @copyright (c) 2018, conlite.org + * @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version) + * @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version) + * @link http://www.conlite.org ConLite.org + * + * $Id$ + */ +/** * @package Plugin * @subpackage SmartyWrapper * @author Andreas Dieter * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org */ defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.'); @@ -25,8 +35,8 @@ class cSmartyBackend extends cSmartyFrontend { parent::$aDefaultPaths = array( 'template_dir' => $aCfg['path']['contenido'] . 'plugins/smarty_templates/', - 'cache_dir' => $aCfg['path']['contenido_cache'], - 'compile_dir' => $aCfg['path']['contenido_cache'] . 'templates_c/' + 'cache_dir' => $aCfg['path']['conlite_cache'], + 'compile_dir' => $aCfg['path']['conlite_cache'] . 'templates_c/' ); parent::$bSmartyInstanciated = true; diff --git a/conlite/plugins/smarty/classes/class.smarty.frontend.php b/conlite/plugins/smarty/classes/class.smarty.frontend.php index 5c7f2f2..523c883 100644 --- a/conlite/plugins/smarty/classes/class.smarty.frontend.php +++ b/conlite/plugins/smarty/classes/class.smarty.frontend.php @@ -1,4 +1,19 @@ + * @copyright (c) 2018, conlite.org + * @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version) + * @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version) + * @link http://www.conlite.org ConLite.org + * + * $Id$ + */ /** * This file contains the frontend class for smarty wrapper plugin. * @@ -6,9 +21,6 @@ * @subpackage SmartyWrapper * @author Andreas Dieter * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org */ defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.'); @@ -67,7 +79,7 @@ class cSmartyFrontend { self::$oSmarty = new cSmartyWrapper(); self::$aDefaultPaths = array( - 'template_dir' => $aClientCfg['tpl']['path'], + 'template_dir' => $aClientCfg['template']['path'], 'cache_dir' => $aClientCfg['cache']['path'] . 'templates_c', 'compile_dir' => $aClientCfg['cache']['path'] . 'templates_c' ); diff --git a/conlite/plugins/smarty/classes/class.smarty.wrapper.php b/conlite/plugins/smarty/classes/class.smarty.wrapper.php index 9fab118..909b716 100644 --- a/conlite/plugins/smarty/classes/class.smarty.wrapper.php +++ b/conlite/plugins/smarty/classes/class.smarty.wrapper.php @@ -1,21 +1,32 @@ + * @copyright (c) 2018, conlite.org + * @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version) + * @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version) + * @link http://www.conlite.org ConLite.org + * + * $Id$ + */ + +/** * @package Plugin * @subpackage SmartyWrapper * @author Andreas Dieter * @copyright four for business AG - * @license http://www.contenido.org/license/LIZENZ.txt - * @link http://www.4fb.de - * @link http://www.contenido.org */ defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.'); class cSmartyWrapper extends Smarty { public function fetch($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL, $display = false, $merge_tpl_vars = true, $no_output_filter = false) { + /* @todo implement functionality for CL 2.0 if ($this->templateExists($template) === false) { $moduleId = (int) cRegistry::getCurrentModuleId(); if ($moduleId > 0) { @@ -23,7 +34,7 @@ class cSmartyWrapper extends Smarty { $template = $module->getTemplatePath($template); } } - + */ return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter); } @@ -48,6 +59,7 @@ class cSmartyWrapper extends Smarty { } public function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) { + /* @todo implement functionality for CL 2.0 if ($this->templateExists($template_name) === false) { $moduleId = (int) cRegistry::getCurrentModuleId(); if ($moduleId > 0) { @@ -55,7 +67,7 @@ class cSmartyWrapper extends Smarty { $template_name = $module->getTemplatePath($template_name); } } - + */ return parent::clearCache($template_name, $cache_id, $compile_id, $exp_time, $type); } } \ No newline at end of file diff --git a/conlite/plugins/smarty/includes/config.autoloader.php b/conlite/plugins/smarty/includes/config.autoloader.php index 0dc1b3d..09f8de6 100644 --- a/conlite/plugins/smarty/includes/config.autoloader.php +++ b/conlite/plugins/smarty/includes/config.autoloader.php @@ -1,4 +1,21 @@ + * @copyright (c) 2018, conlite.org + * @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version) + * @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version) + * @link http://www.conlite.org ConLite.org + * + * $Id$ + */ +defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.'); + $sAutoloadClassPath = strstr(dirname(dirname(__FILE__)), "conlite/plugins")."/classes/"; return array( 'cSmartyBackend' => $sAutoloadClassPath.'class.smarty.backend.php', diff --git a/conlite/plugins/smarty/includes/config.plugin.php b/conlite/plugins/smarty/includes/config.plugin.php index 531a568..ab5c077 100644 --- a/conlite/plugins/smarty/includes/config.plugin.php +++ b/conlite/plugins/smarty/includes/config.plugin.php @@ -1,6 +1,22 @@ + * @copyright (c) 2018, conlite.org + * @license http://www.gnu.de/documents/gpl.en.html GPL v3 (english version) + * @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version) + * @link http://www.conlite.org ConLite.org + * + * $Id$ + */ defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.'); + rereadClients(); $client = (isset($client)) ? $client : $load_client; // Load smarty