fixed path and stuff, version increased, added doc blocks

Dieser Commit ist enthalten in:
Oldperl 2018-01-10 11:01:23 +00:00
Ursprung 405b3d9fe3
Commit ba5e895d99
6 geänderte Dateien mit 85 neuen und 18 gelöschten Zeilen

Datei anzeigen

@ -9,11 +9,11 @@
<copyright>(c) 2017 Ortwin Pinke, PHP-Backoffice.de</copyright>
<mail>info@php-backoffice.de</mail>
<website>http://php-backoffice.de</website>
<version>1.0.0</version>
<version>1.0.2</version>
<license>GNU Lesser General Public License</license>
</general>
<requirements php="5.6">
<conlite minversion="2.0" />
<conlite minversion="2.0.2" />
</requirements>
<conlite />
</plugin>

Datei anzeigen

@ -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 <o.pinke@conlite.org>
* @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 <www.4fb.de>
* @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;

Datei anzeigen

@ -1,4 +1,19 @@
<?php
/**
* This file contains the frontend class for smarty wrapper plugin.
*
* @package Plugin
* @subpackage SmartyWrapper
* @version $Rev$
* @since 2.0.2
* @author Ortwin Pinke <o.pinke@conlite.org>
* @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 <www.4fb.de>
* @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'
);

Datei anzeigen

@ -1,21 +1,32 @@
<?php
/**
* This file contains the wrapper class for smarty wrapper plugin.
*
*
* @package Plugin
* @subpackage SmartyWrapper
* @version $Rev$
* @since 2.0.2
* @author Ortwin Pinke <o.pinke@conlite.org>
* @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 <www.4fb.de>
* @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);
}
}

Datei anzeigen

@ -1,4 +1,21 @@
<?php
/**
* This file contains the autoloader stuff for this plugin
*
* @package Plugin
* @subpackage SmartyWrapper
* @version $Rev$
* @since 2.0.2
* @author Ortwin Pinke <o.pinke@conlite.org>
* @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',

Datei anzeigen

@ -1,6 +1,22 @@
<?php
/**
* This file is the config file for this plugin
*
* @package Plugin
* @subpackage SmartyWrapper
* @version $Rev$
* @since 2.0.2
* @author Ortwin Pinke <o.pinke@conlite.org>
* @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