Template engine use sys_get_temp_dir
Used to get the operating system temp directory.
This commit is contained in:
parent
c5861e4170
commit
cf005c7671
|
|
@ -75,9 +75,6 @@ class plugin_database {
|
|||
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||
$domain_name = $domain_array[0];
|
||||
|
||||
//temp directory
|
||||
$_SESSION['server']['temp']['dir'] = '/tmp';
|
||||
|
||||
//create token
|
||||
//$object = new token;
|
||||
//$token = $object->create('login');
|
||||
|
|
@ -90,7 +87,7 @@ class plugin_database {
|
|||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/authentication/resources/views/';
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'];
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
//add translations
|
||||
|
|
|
|||
|
|
@ -67,9 +67,6 @@ class plugin_email {
|
|||
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||
$domain_name = $domain_array[0];
|
||||
|
||||
//temp directory
|
||||
$_SESSION['server']['temp']['dir'] = '/tmp';
|
||||
|
||||
//use the session username
|
||||
if (isset($_SESSION['username'])) {
|
||||
$_POST['username'] = $_SESSION['username'];
|
||||
|
|
@ -87,7 +84,7 @@ class plugin_email {
|
|||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/authentication/resources/views/';
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'];
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
//assign default values to the template
|
||||
|
|
@ -321,9 +318,6 @@ class plugin_email {
|
|||
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||
$domain_name = $domain_array[0];
|
||||
|
||||
//temp directory
|
||||
$_SESSION['server']['temp']['dir'] = '/tmp';
|
||||
|
||||
//create token
|
||||
//$object = new token;
|
||||
//$token = $object->create('login');
|
||||
|
|
@ -336,7 +330,7 @@ class plugin_email {
|
|||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/authentication/resources/views/';
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'];
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
//assign default values to the template
|
||||
|
|
|
|||
|
|
@ -38,9 +38,6 @@ class plugin_ldap {
|
|||
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||
$domain_name = $domain_array[0];
|
||||
|
||||
//temp directory
|
||||
$_SESSION['server']['temp']['dir'] = '/tmp';
|
||||
|
||||
//create token
|
||||
//$object = new token;
|
||||
//$token = $object->create('login');
|
||||
|
|
@ -53,7 +50,7 @@ class plugin_ldap {
|
|||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/authentication/resources/views/';
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'];
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
//add translations
|
||||
|
|
|
|||
|
|
@ -79,9 +79,6 @@ class plugin_totp {
|
|||
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||
$domain_name = $domain_array[0];
|
||||
|
||||
//temp directory
|
||||
$_SESSION['server']['temp']['dir'] = '/tmp';
|
||||
|
||||
//create token
|
||||
//$object = new token;
|
||||
//$token = $object->create('login');
|
||||
|
|
@ -94,7 +91,7 @@ class plugin_totp {
|
|||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/authentication/resources/views/';
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'];
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
//assign default values to the template
|
||||
|
|
@ -189,9 +186,6 @@ class plugin_totp {
|
|||
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||
$domain_name = $domain_array[0];
|
||||
|
||||
//temp directory
|
||||
$_SESSION['server']['temp']['dir'] = '/tmp';
|
||||
|
||||
//create token
|
||||
//$object = new token;
|
||||
//$token = $object->create('login');
|
||||
|
|
@ -204,7 +198,7 @@ class plugin_totp {
|
|||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/authentication/resources/views/';
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'];
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
//assign values to the template
|
||||
|
|
|
|||
|
|
@ -350,14 +350,11 @@
|
|||
$domain_array = explode(":", $_SERVER["HTTP_HOST"]);
|
||||
$domain_name = $domain_array[0];
|
||||
|
||||
//temp directory
|
||||
$_SESSION['server']['temp']['dir'] = '/tmp';
|
||||
|
||||
//initialize a template object
|
||||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/install/resources/views/';
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'];
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
//assign default values to the template
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH.'/themes/'.$_SESSION['domain']['template']['name'].'/';
|
||||
$view->cache_dir = $_SESSION['server']['temp']['dir'] ?: sys_get_temp_dir();
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
//add multi-lingual support
|
||||
|
|
|
|||
Loading…
Reference in New Issue