1
0
Fork 0

upgrade smarty lib; use composer; increase php version and plugin version

Dieser Commit ist enthalten in:
Ortwin Pinke 2025-06-26 22:01:05 +02:00
Ursprung f8d1a613c4
Commit a2e2312610
4 geänderte Dateien mit 22 neuen und 16 gelöschten Zeilen

Datei anzeigen

@ -10,9 +10,9 @@
<mail>info@php-backoffice.de</mail>
<website>http://php-backoffice.de</website>
<version>1.1.0</version>
<license>GNU Lesser General Public License</license>
<license>GPL-3.0-or-later</license>
</general>
<requirements php="8.2">
<requirements php="8.0">
<conlite minversion="2.9.0" />
</requirements>
<conlite />

Datei anzeigen

@ -23,7 +23,7 @@
*/
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
class cSmartyWrapper extends Smarty {
class cSmartyWrapper extends Smarty\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

16
composer.json Normale Datei
Datei anzeigen

@ -0,0 +1,16 @@
{
"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.*"
}
}

Datei anzeigen

@ -5,30 +5,20 @@ global $load_client;
*
* @package Plugin
* @subpackage SmartyWrapper
* @version $Rev: 128 $
* @since 2.0.2
* @since 3.0.0
* @author Ortwin Pinke <o.pinke@conlite.org>
* @copyright (c) 2018, conlite.org
* @copyright (c) 2018 - 2025, 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: config.plugin.php 128 2019-07-03 11:58:28Z oldperl $
*/
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
rereadClients();
$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(SMARTY_DIR . 'Autoloader.php');
Smarty_Autoloader::register();
require_once dirname(__FILE__, 2) . '/vendor/autoload.php';
try {
new cSmartyFrontend(cRegistry::getConfig(), cRegistry::getClientConfig(cRegistry::getClientId()), true);