Commits vergleichen
Keine gemeinsamen Commits. „4f82c17918626df378985fd2aeb17ff7e7b590be“ und „2f80a087f96320adb36b820d9aeb1ff4b7390ad7“ haben vollständig unterschiedliche Historien.
4f82c17918
...
2f80a087f9
5 geänderte Dateien mit 17 neuen und 26 gelöschten Zeilen
|
@ -10,9 +10,9 @@
|
||||||
<mail>info@php-backoffice.de</mail>
|
<mail>info@php-backoffice.de</mail>
|
||||||
<website>http://php-backoffice.de</website>
|
<website>http://php-backoffice.de</website>
|
||||||
<version>1.1.0</version>
|
<version>1.1.0</version>
|
||||||
<license>GPL-3.0-or-later</license>
|
<license>GNU Lesser General Public License</license>
|
||||||
</general>
|
</general>
|
||||||
<requirements php="8.0">
|
<requirements php="8.2">
|
||||||
<conlite minversion="2.9.0" />
|
<conlite minversion="2.9.0" />
|
||||||
</requirements>
|
</requirements>
|
||||||
<conlite />
|
<conlite />
|
||||||
|
|
|
@ -63,7 +63,7 @@ class cSmartyFrontend {
|
||||||
* @throws cInvalidArgumentException if the given configurations are not an
|
* @throws cInvalidArgumentException if the given configurations are not an
|
||||||
* array
|
* array
|
||||||
*/
|
*/
|
||||||
public function __construct($aCfg, $aClientCfg, $bSanityCheck = false) {
|
public function __construct(&$aCfg, &$aClientCfg, $bSanityCheck = false) {
|
||||||
// check if already instanciated
|
// check if already instanciated
|
||||||
if (isset(self::$bSmartyInstanciated) && self::$bSmartyInstanciated) {
|
if (isset(self::$bSmartyInstanciated) && self::$bSmartyInstanciated) {
|
||||||
throw new Exception("cSmartyFrontend class is intended to be used as singleton. Do not instanciate multiple times.");
|
throw new Exception("cSmartyFrontend class is intended to be used as singleton. Do not instanciate multiple times.");
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
*/
|
*/
|
||||||
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
||||||
|
|
||||||
class cSmartyWrapper extends Smarty\Smarty {
|
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) {
|
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
|
/* @todo implement functionality for CL 2.0
|
||||||
|
@ -44,9 +44,6 @@ class cSmartyWrapper extends Smarty\Smarty {
|
||||||
return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter);
|
return parent::fetch($template, $cache_id, $compile_id, $parent, $display, $merge_tpl_vars, $no_output_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws \Smarty\Exception
|
|
||||||
*/
|
|
||||||
public function display($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL) {
|
public function display($template = NULL, $cache_id = NULL, $compile_id = NULL, $parent = NULL) {
|
||||||
global $frontend_debug;
|
global $frontend_debug;
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
"name": "conlite/plugin_smarty",
|
|
||||||
"description": "Enhance Backend and Frontend of ConLite with Smarty Template Engine",
|
|
||||||
"minimum-stability": "stable",
|
|
||||||
"license": "GPL-3.0-or-later",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Ortwin Pinke",
|
|
||||||
"email": "o.pinke@conlite.de"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"require": {
|
|
||||||
"php": ">=8.0",
|
|
||||||
"smarty/smarty": "v5.5.*"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -5,20 +5,30 @@ global $load_client;
|
||||||
*
|
*
|
||||||
* @package Plugin
|
* @package Plugin
|
||||||
* @subpackage SmartyWrapper
|
* @subpackage SmartyWrapper
|
||||||
* @since 3.0.0
|
* @version $Rev: 128 $
|
||||||
|
* @since 2.0.2
|
||||||
* @author Ortwin Pinke <o.pinke@conlite.org>
|
* @author Ortwin Pinke <o.pinke@conlite.org>
|
||||||
* @copyright (c) 2018 - 2025, 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.en.html GPL v3 (english version)
|
||||||
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
|
* @license http://www.gnu.de/documents/gpl.de.html GPL v3 (deutsche Version)
|
||||||
* @link http://www.conlite.org ConLite.org
|
* @link http://www.conlite.org ConLite.org
|
||||||
|
*
|
||||||
|
* $Id: config.plugin.php 128 2019-07-03 11:58:28Z oldperl $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
|
||||||
|
|
||||||
rereadClients();
|
rereadClients();
|
||||||
$client = (isset($client)) ? $client : $load_client;
|
$client = (isset($client)) ? $client : $load_client;
|
||||||
|
// Load smarty
|
||||||
|
if (!defined('SMARTY_DIR')) {
|
||||||
|
define('SMARTY_DIR', cRegistry::getConfigValue('path', 'conlite')
|
||||||
|
. cRegistry::getConfigValue('path', 'plugins')
|
||||||
|
. 'smarty/libs/');
|
||||||
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__, 2) . '/vendor/autoload.php';
|
require_once(SMARTY_DIR . 'Autoloader.php');
|
||||||
|
Smarty_Autoloader::register();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
new cSmartyFrontend(cRegistry::getConfig(), cRegistry::getClientConfig(cRegistry::getClientId()), true);
|
new cSmartyFrontend(cRegistry::getConfig(), cRegistry::getClientConfig(cRegistry::getClientId()), true);
|
||||||
|
|
Laden …
In neuem Issue referenzieren