mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Replace the DOCUMENT_ROOT and PROJECT_ROOT variables
Use the __DIR__ constant and dirname as needed
This commit is contained in:
@@ -106,7 +106,7 @@ class plugin_database {
|
||||
//initialize a template object
|
||||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/core/authentication/resources/views/';
|
||||
$view->template_dir = dirname(__DIR__, 5) . '/core/authentication/resources/views/';
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
@@ -210,7 +210,7 @@ class plugin_database {
|
||||
$user_authorized = false;
|
||||
|
||||
//check if contacts app exists
|
||||
$contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/core/contacts/') ? true : false;
|
||||
$contacts_exists = file_exists(dirname(__DIR__, 5) . '/core/contacts/') ? true : false;
|
||||
|
||||
//check the username and password if they don't match then redirect to the login
|
||||
$sql = "select ";
|
||||
|
||||
@@ -101,7 +101,7 @@ class plugin_email {
|
||||
//initialize a template object
|
||||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/core/authentication/resources/views/';
|
||||
$view->template_dir = dirname(__DIR__, 5) . '/core/authentication/resources/views/';
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
@@ -335,7 +335,7 @@ class plugin_email {
|
||||
//initialize a template object
|
||||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/core/authentication/resources/views/';
|
||||
$view->template_dir = dirname(__DIR__, 5) . '/core/authentication/resources/views/';
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
@@ -416,7 +416,7 @@ class plugin_email {
|
||||
unset($_POST['authentication_code']);
|
||||
|
||||
//check if contacts app exists
|
||||
$contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/core/contacts/') ? true : false;
|
||||
$contacts_exists = file_exists(dirname(__DIR__, 5) . '/core/contacts/') ? true : false;
|
||||
|
||||
//get the user details
|
||||
if ($auth_valid) {
|
||||
|
||||
@@ -72,7 +72,7 @@ class plugin_ldap {
|
||||
//initialize a template object
|
||||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/authentication/resources/views/';
|
||||
$view->template_dir = dirname(__DIR__, 5).'/core/authentication/resources/views/';
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ class plugin_totp {
|
||||
//initialize a template object
|
||||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/core/authentication/resources/views/';
|
||||
$view->template_dir = dirname(__DIR__, 5) . '/core/authentication/resources/views/';
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
@@ -214,7 +214,7 @@ class plugin_totp {
|
||||
//initialize a template object
|
||||
$view = new template();
|
||||
$view->engine = 'smarty';
|
||||
$view->template_dir = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/core/authentication/resources/views/';
|
||||
$view->template_dir = dirname(__DIR__, 5) . '/core/authentication/resources/views/';
|
||||
$view->cache_dir = sys_get_temp_dir();
|
||||
$view->init();
|
||||
|
||||
@@ -347,7 +347,7 @@ class plugin_totp {
|
||||
unset($_POST['authentication_code']);
|
||||
|
||||
//check if contacts app exists
|
||||
$contacts_exists = file_exists($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . '/core/contacts/') ? true : false;
|
||||
$contacts_exists = file_exists(dirname(__DIR__, 5) . '/core/contacts/') ? true : false;
|
||||
|
||||
//get the user details
|
||||
if ($auth_valid) {
|
||||
|
||||
Reference in New Issue
Block a user