Update constants.php with new Smarty variables and used them where needed.

This commit is contained in:
DariusIII
2016-05-14 00:22:47 +02:00
parent 6588acc2fd
commit edc4aaa998
4 changed files with 18 additions and 7 deletions
+2
View File
@@ -1,3 +1,5 @@
2016-05-14 DariusIII
* Fix: Update constants.php with new Smarty variables and used them where needed.
2016-05-13 DariusIII
* Fix: Smarty cleaning of templates_c folder on nntmux update
* Upd: Improve the speed of fixrelnames work queries
+4 -4
View File
@@ -19,7 +19,7 @@
namespace app\extensions\command;
use \Exception;
use \SmartyBC;
use \Smarty;
use \app\extensions\util\Git;
use \app\extensions\util\Versions;
use \lithium\console\command\Help;
@@ -124,9 +124,9 @@ class Update extends \app\extensions\console\Command
};
}
$smarty = new SmartyBC();
$smarty->setCompileDir(NN_RES . DS . 'smarty' . DS . 'templates_c/');
$cleared = $smarty->clear_compiled_tpl();
$smarty = new Smarty();
$smarty->setCompileDir(NN_SMARTY_TEMPLATES);
$cleared = $smarty->clearCompiledTemplate();
if ($cleared) {
$this->out('The Smarty compiled template cache has been cleaned for you', 'primary');
} else {
+9
View File
@@ -49,6 +49,15 @@ define('NN_RES', NN_ROOT . 'resources' . DS);
// Used to refer to the covers folder
define('NN_COVERS', NN_RES . 'covers' . DS);
// Smarty's cache.
define('NN_SMARTY_CACHE', NN_RES . 'smarty' . DS . 'cache/');
// Smarty's configuration files.
define('NN_SMARTY_CONFIGS', NN_RES .'smarty' . DS . 'configs/');
// Smarty's compiled template cache.
define('NN_SMARTY_TEMPLATES', NN_RES . 'smarty' . DS . 'templates_c/');
// Used to refer to the tmp folder
define('NN_TMP', NN_RES . 'tmp' . DS);
+3 -3
View File
@@ -98,9 +98,9 @@ class BasePage
$this->settings = new Settings();
$this->smarty = new Smarty();
$this->smarty->setCompileDir(NN_RES . DS . 'smarty' . DS . 'templates_c/');
$this->smarty->setConfigDir(NN_RES . DS . 'smarty' . DS . 'configs/');
$this->smarty->setCacheDir(NN_RES . DS . 'smarty' . DS . 'cache/');
$this->smarty->setCompileDir(NN_SMARTY_TEMPLATES);
$this->smarty->setConfigDir(NN_SMARTY_CONFIGS);
$this->smarty->setCacheDir(NN_SMARTY_CACHE);
$this->smarty->setPluginsDir([
NN_WWW . 'plugins/',
SMARTY_DIR . 'plugins/',