// remove deprecated PS_ADMIN_DIR by _PS_ADMIN_DIR_
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8666 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
b9e7daf0b7
commit
b45dd02452
79 files changed
+145
-145
No files matched your search
@@ -25,8 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('_PS_ADMIN_DIR_', getcwd());
|
define('_PS_ADMIN_DIR_', dirname(__FILE__));
|
||||||
define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); // Retro-compatibility
|
|
||||||
|
|
||||||
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
include(_PS_ADMIN_DIR_.'/functions.php');
|
include(_PS_ADMIN_DIR_.'/functions.php');
|
||||||
|
|||||||
+2
-2
@@ -25,8 +25,8 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
include(PS_ADMIN_DIR.'/../config/config.inc.php');
|
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
/* Getting cookie or logout */
|
/* Getting cookie or logout */
|
||||||
require_once(dirname(__FILE__).'/init.php');
|
require_once(dirname(__FILE__).'/init.php');
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
include_once('../config/config.inc.php');
|
include_once('../config/config.inc.php');
|
||||||
include_once('tabs/AdminCatalog.php');
|
include_once('tabs/AdminCatalog.php');
|
||||||
include_once('tabs/AdminProducts.php');
|
include_once('tabs/AdminProducts.php');
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
include(PS_ADMIN_DIR.'/../config/config.inc.php');
|
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
/* Getting cookie or logout */
|
/* Getting cookie or logout */
|
||||||
require_once(dirname(__FILE__).'/init.php');
|
require_once(dirname(__FILE__).'/init.php');
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
include(PS_ADMIN_DIR.'/../config/config.inc.php');
|
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
/* Getting cookie or logout */
|
/* Getting cookie or logout */
|
||||||
require_once(dirname(__FILE__).'/init.php');
|
require_once(dirname(__FILE__).'/init.php');
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
include_once(dirname(__FILE__).'/../config/config.inc.php');
|
include_once(dirname(__FILE__).'/../config/config.inc.php');
|
||||||
|
|
||||||
/* Getting cookie or logout */
|
/* Getting cookie or logout */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
* @since 22/May/2007
|
* @since 22/May/2007
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @since 22/April/2007
|
* @since 22/April/2007
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @since 22/April/2007
|
* @since 22/April/2007
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @since 22/May/2007
|
* @since 22/May/2007
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @since 22/May/2007
|
* @since 22/May/2007
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @since 22/May/2007
|
* @since 22/May/2007
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?
|
<?
|
||||||
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
$error = '';
|
$error = '';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
* @since 22/May/2007
|
* @since 22/May/2007
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "inc" . DIRECTORY_SEPARATOR . "config.php");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require_once('../../config/config.inc.php');
|
require_once('../../config/config.inc.php');
|
||||||
require_once('../init.php');
|
require_once('../init.php');
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
|
|
||||||
include(PS_ADMIN_DIR.'/../config/config.inc.php');
|
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
|
|
||||||
if (!Context::getContext()->employee->isLoggedBack())
|
if (!Context::getContext()->employee->isLoggedBack())
|
||||||
Tools::redirectAdmin('login.php');
|
Tools::redirectAdmin('login.php');
|
||||||
@@ -37,7 +37,7 @@ $tabAccess = Profile::getProfileAccess(Context::getContext()->employee->id_profi
|
|||||||
if ($tabAccess['view'] !== '1')
|
if ($tabAccess['view'] !== '1')
|
||||||
die (Tools::displayError('You do not have permission to view here'));
|
die (Tools::displayError('You do not have permission to view here'));
|
||||||
|
|
||||||
$backupdir = realpath( PS_ADMIN_DIR . '/backups/');
|
$backupdir = realpath(_PS_ADMIN_DIR_ . '/backups/');
|
||||||
|
|
||||||
if ($backupdir === false)
|
if ($backupdir === false)
|
||||||
die (Tools::displayError('Backups directory does not exist.'));
|
die (Tools::displayError('Backups directory does not exist.'));
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
include_once(dirname(__FILE__).'/../config/config.inc.php');
|
include_once(dirname(__FILE__).'/../config/config.inc.php');
|
||||||
|
|
||||||
$module = Tools::getValue('module');
|
$module = Tools::getValue('module');
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ function rewriteSettingsFile($baseUrls = NULL, $theme = NULL, $arrayDB = NULL)
|
|||||||
foreach ($defines as $k => $value)
|
foreach ($defines as $k => $value)
|
||||||
$content .= 'define(\''.$k.'\', \''.addslashes($value).'\');'."\n";
|
$content .= 'define(\''.$k.'\', \''.addslashes($value).'\');'."\n";
|
||||||
$content .= "\n?>";
|
$content .= "\n?>";
|
||||||
if ($fd = @fopen(PS_ADMIN_DIR.'/../config/settings.inc.php', 'w'))
|
if ($fd = @fopen(_PS_ADMIN_DIR_.'/../config/settings.inc.php', 'w'))
|
||||||
{
|
{
|
||||||
fwrite($fd, $content);
|
fwrite($fd, $content);
|
||||||
fclose($fd);
|
fclose($fd);
|
||||||
@@ -255,9 +255,8 @@ function checkingTab($tab)
|
|||||||
}
|
}
|
||||||
if ($row['module'] AND file_exists(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php'))
|
if ($row['module'] AND file_exists(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php'))
|
||||||
include_once(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php');
|
include_once(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php');
|
||||||
elseif (file_exists(PS_ADMIN_DIR.'/tabs/'.$tab.'.php'))
|
elseif (file_exists(_PS_ADMIN_DIR_.'/tabs/'.$tab.'.php'))
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/'.$tab.'.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/'.$tab.'.php');
|
||||||
|
|
||||||
if (!class_exists($tab, false) OR !$row['id_tab'])
|
if (!class_exists($tab, false) OR !$row['id_tab'])
|
||||||
{
|
{
|
||||||
echo Tools::displayError('Tab file cannot be found.');
|
echo Tools::displayError('Tab file cannot be found.');
|
||||||
@@ -273,6 +272,9 @@ function checkingTab($tab)
|
|||||||
return $adminObj;
|
return $adminObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @TODO deprecate for Tab::checkTabRights()
|
||||||
|
*/
|
||||||
function checkTabRights($id_tab)
|
function checkTabRights($id_tab)
|
||||||
{
|
{
|
||||||
static $tabAccesses = NULL;
|
static $tabAccesses = NULL;
|
||||||
|
|||||||
@@ -25,6 +25,6 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
require(dirname(dirname(__FILE__)).'/config/config.inc.php');
|
require(dirname(dirname(__FILE__)).'/config/config.inc.php');
|
||||||
Controller::getController('getFileController')->run();
|
Controller::getController('getFileController')->run();
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
include_once(dirname(__FILE__).'/../config/config.inc.php');
|
include_once(dirname(__FILE__).'/../config/config.inc.php');
|
||||||
|
|
||||||
$module = Tools::getValue('module');
|
$module = Tools::getValue('module');
|
||||||
|
|||||||
+4
-4
@@ -26,10 +26,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
|
|
||||||
include(PS_ADMIN_DIR.'/../config/config.inc.php');
|
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
include(PS_ADMIN_DIR.'/functions.php');
|
include(_PS_ADMIN_DIR_.'/functions.php');
|
||||||
|
|
||||||
$clientIsMaintenanceOrLocal = in_array(Tools::getRemoteAddr(), array_merge(array('127.0.0.1'),explode(',', Configuration::get('PS_MAINTENANCE_IP'))));
|
$clientIsMaintenanceOrLocal = in_array(Tools::getRemoteAddr(), array_merge(array('127.0.0.1'),explode(',', Configuration::get('PS_MAINTENANCE_IP'))));
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ echo '
|
|||||||
<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post">';
|
<form action="'.Tools::htmlentitiesUTF8($_SERVER['REQUEST_URI']).'" method="post">';
|
||||||
|
|
||||||
$randomNb = rand(100, 999);
|
$randomNb = rand(100, 999);
|
||||||
if(file_exists(PS_ADMIN_DIR.'/../install') OR file_exists(PS_ADMIN_DIR.'/../admin'))
|
if(file_exists(_PS_ADMIN_DIR_.'/../install') OR file_exists(_PS_ADMIN_DIR_.'/../admin'))
|
||||||
{
|
{
|
||||||
echo ' <span>'.translate('For security reasons, you cannot connect to the Back Office until after you have:').'<br /><br />
|
echo ' <span>'.translate('For security reasons, you cannot connect to the Back Office until after you have:').'<br /><br />
|
||||||
- '.translate('delete the /install folder').'<br />
|
- '.translate('delete the /install folder').'<br />
|
||||||
|
|||||||
@@ -25,10 +25,10 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
|
|
||||||
include(PS_ADMIN_DIR.'/../config/config.inc.php');
|
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
include(PS_ADMIN_DIR.'/functions.php');
|
include(_PS_ADMIN_DIR_.'/functions.php');
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -25,9 +25,9 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
|
|
||||||
include(PS_ADMIN_DIR.'/../config/config.inc.php');
|
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
|
|
||||||
if (!Context::getContext()->employee->id)
|
if (!Context::getContext()->employee->id)
|
||||||
Tools::redirectAdmin('login.php');
|
Tools::redirectAdmin('login.php');
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminAccess extends AdminTab
|
class AdminAccess extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
if(Configuration::get('VATNUMBER_MANAGEMENT') AND file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php'))
|
if(Configuration::get('VATNUMBER_MANAGEMENT') AND file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php'))
|
||||||
include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php');
|
include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php');
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminAttachments extends AdminTab
|
class AdminAttachments extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@ini_set('max_execution_time', 3600);
|
@ini_set('max_execution_time', 3600);
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminAttributeGenerator extends AdminTab
|
class AdminAttributeGenerator extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminAttributes extends AdminTab
|
class AdminAttributes extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminAttributes.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminAttributes.php');
|
||||||
|
|
||||||
class AdminAttributesGroups extends AdminTab
|
class AdminAttributesGroups extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminBackup extends AdminTab
|
class AdminBackup extends AdminTab
|
||||||
{
|
{
|
||||||
@@ -87,7 +87,7 @@ class AdminBackup extends AdminTab
|
|||||||
*/
|
*/
|
||||||
public function displayForm($isMainTab = true)
|
public function displayForm($isMainTab = true)
|
||||||
{
|
{
|
||||||
if(is_writable(PS_ADMIN_DIR.'/backups/'))
|
if(is_writable(_PS_ADMIN_DIR_.'/backups/'))
|
||||||
{
|
{
|
||||||
if (!($object = $this->loadObject()))
|
if (!($object = $this->loadObject()))
|
||||||
return;
|
return;
|
||||||
@@ -179,7 +179,7 @@ class AdminBackup extends AdminTab
|
|||||||
public function displayList()
|
public function displayList()
|
||||||
{
|
{
|
||||||
// Test if the backup dir is writable
|
// Test if the backup dir is writable
|
||||||
if(!is_writable(PS_ADMIN_DIR.'/backups/'))
|
if(!is_writable(_PS_ADMIN_DIR_.'/backups/'))
|
||||||
$this->displayWarning($this->l('"Backups" Directory in admin directory must be writeable (CHMOD 755 / 777)'));
|
$this->displayWarning($this->l('"Backups" Directory in admin directory must be writeable (CHMOD 755 / 777)'));
|
||||||
|
|
||||||
$this->displayErrors();
|
$this->displayErrors();
|
||||||
@@ -235,10 +235,10 @@ class AdminBackup extends AdminTab
|
|||||||
$this->_list = array();
|
$this->_list = array();
|
||||||
|
|
||||||
// Find all the backups
|
// Find all the backups
|
||||||
$dh = @opendir(PS_ADMIN_DIR.'/backups/');
|
$dh = @opendir(_PS_ADMIN_DIR_.'/backups/');
|
||||||
if ($dh === false)
|
if ($dh === false)
|
||||||
{
|
{
|
||||||
$this->_errors[] = Tools::displayError('Unable to open backup directory .').addslashes(PS_ADMIN_DIR.'/backups/').'"';
|
$this->_errors[] = Tools::displayError('Unable to open backup directory .').addslashes(_PS_ADMIN_DIR_.'/backups/').'"';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while (($file = readdir($dh)) !== false)
|
while (($file = readdir($dh)) !== false)
|
||||||
@@ -260,7 +260,7 @@ class AdminBackup extends AdminTab
|
|||||||
$age = floor($age / 86400);
|
$age = floor($age / 86400);
|
||||||
$age = $age.' '.(($age == 1) ? $this->l('day') : $this->l('days'));
|
$age = $age.' '.(($age == 1) ? $this->l('day') : $this->l('days'));
|
||||||
}
|
}
|
||||||
$size = filesize(PS_ADMIN_DIR.'/backups/'.$file);
|
$size = filesize(_PS_ADMIN_DIR_.'/backups/'.$file);
|
||||||
$this->_list[] = array(
|
$this->_list[] = array(
|
||||||
'filename' => $file,
|
'filename' => $file,
|
||||||
'age' => $age,
|
'age' => $age,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminCMS extends AdminTab
|
class AdminCMS extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminCMSCategories extends AdminTab
|
class AdminCMSCategories extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
include(PS_ADMIN_DIR.'/tabs/AdminCMSCategories.php');
|
include(_PS_ADMIN_DIR_.'/tabs/AdminCMSCategories.php');
|
||||||
include(PS_ADMIN_DIR.'/tabs/AdminCMS.php');
|
include(_PS_ADMIN_DIR_.'/tabs/AdminCMS.php');
|
||||||
|
|
||||||
class AdminCMSContent extends AdminTab
|
class AdminCMSContent extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminCarriers extends AdminTab
|
class AdminCarriers extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminCarts extends AdminTab
|
class AdminCarts extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
include(PS_ADMIN_DIR.'/tabs/AdminCategories.php');
|
include(_PS_ADMIN_DIR_.'/tabs/AdminCategories.php');
|
||||||
include(PS_ADMIN_DIR.'/tabs/AdminProducts.php');
|
include(_PS_ADMIN_DIR_.'/tabs/AdminProducts.php');
|
||||||
|
|
||||||
class AdminCatalog extends AdminTab
|
class AdminCatalog extends AdminTab
|
||||||
{
|
{
|
||||||
@@ -105,7 +105,7 @@ class AdminCatalog extends AdminTab
|
|||||||
{
|
{
|
||||||
if (!isset($this->attributeGenerator))
|
if (!isset($this->attributeGenerator))
|
||||||
{
|
{
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminAttributeGenerator.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminAttributeGenerator.php');
|
||||||
$this->attributeGenerator = new AdminAttributeGenerator();
|
$this->attributeGenerator = new AdminAttributeGenerator();
|
||||||
}
|
}
|
||||||
$this->attributeGenerator->postProcess();
|
$this->attributeGenerator->postProcess();
|
||||||
@@ -153,7 +153,7 @@ class AdminCatalog extends AdminTab
|
|||||||
{
|
{
|
||||||
if (!isset($this->attributeGenerator))
|
if (!isset($this->attributeGenerator))
|
||||||
{
|
{
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminAttributeGenerator.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminAttributeGenerator.php');
|
||||||
$this->attributeGenerator = new AdminAttributeGenerator();
|
$this->attributeGenerator = new AdminAttributeGenerator();
|
||||||
}
|
}
|
||||||
$this->attributeGenerator->displayForm();
|
$this->attributeGenerator->displayForm();
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
class AdminContact extends AdminPreferences
|
class AdminContact extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminContacts extends AdminTab
|
class AdminContacts extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminCountries extends AdminTab
|
class AdminCountries extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminCurrencies extends AdminTab
|
class AdminCurrencies extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
class AdminDb extends AdminPreferences
|
class AdminDb extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
class AdminEmails extends AdminPreferences
|
class AdminEmails extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminFeaturesValues.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminFeaturesValues.php');
|
||||||
|
|
||||||
class AdminFeatures extends AdminTab
|
class AdminFeatures extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../images.inc.php');
|
include_once(_PS_ADMIN_DIR_.'/../images.inc.php');
|
||||||
@ini_set('max_execution_time', 0);
|
@ini_set('max_execution_time', 0);
|
||||||
// No max line limit since the lines can be more than 4096. Performance impact is not significant.
|
// No max line limit since the lines can be more than 4096. Performance impact is not significant.
|
||||||
define('MAX_LINE_SIZE', 0);
|
define('MAX_LINE_SIZE', 0);
|
||||||
@@ -1325,7 +1325,7 @@ class AdminImport extends AdminTab
|
|||||||
if ((Tools::getValue('import')) AND (isset($this->_warnings) AND !sizeof($this->_warnings)))
|
if ((Tools::getValue('import')) AND (isset($this->_warnings) AND !sizeof($this->_warnings)))
|
||||||
echo '<div class="module_confirmation conf confirm"><img src="../img/admin/ok.gif" alt="" title="" style="margin-right:5px; float:left;" />'.$this->l('The .CSV file has been imported into your shop.').'</div>';
|
echo '<div class="module_confirmation conf confirm"><img src="../img/admin/ok.gif" alt="" title="" style="margin-right:5px; float:left;" />'.$this->l('The .CSV file has been imported into your shop.').'</div>';
|
||||||
|
|
||||||
if(!is_writable(PS_ADMIN_DIR.'/import/'))
|
if(!is_writable(_PS_ADMIN_DIR_.'/import/'))
|
||||||
$this->displayWarning($this->l('directory import on admin directory must be writable (CHMOD 755 / 777)'));
|
$this->displayWarning($this->l('directory import on admin directory must be writable (CHMOD 755 / 777)'));
|
||||||
|
|
||||||
if(isset($this->_warnings) AND sizeof($this->_warnings))
|
if(isset($this->_warnings) AND sizeof($this->_warnings))
|
||||||
|
|||||||
@@ -40,17 +40,17 @@ class AdminInformation extends AdminTab
|
|||||||
'system' => $funcs,
|
'system' => $funcs,
|
||||||
'gd' => false,
|
'gd' => false,
|
||||||
'mysql_support' => false,
|
'mysql_support' => false,
|
||||||
'config_dir' => PS_ADMIN_DIR.'/../config/',
|
'config_dir' => _PS_ADMIN_DIR_.'/../config/',
|
||||||
'tools_dir' => PS_ADMIN_DIR.'/../tools/smarty/compile',
|
'tools_dir' => _PS_ADMIN_DIR_.'/../tools/smarty/compile',
|
||||||
'cache_dir' => PS_ADMIN_DIR.'/../tools/smarty/cache/',
|
'cache_dir' => _PS_ADMIN_DIR_.'/../tools/smarty/cache/',
|
||||||
'sitemap' => PS_ADMIN_DIR.'/../sitemap.xml',
|
'sitemap' => _PS_ADMIN_DIR_.'/../sitemap.xml',
|
||||||
'img_dir' => PS_ADMIN_DIR.'/../img/',
|
'img_dir' => _PS_ADMIN_DIR_.'/../img/',
|
||||||
'mails_dir' => PS_ADMIN_DIR.'/../mails/',
|
'mails_dir' => _PS_ADMIN_DIR_.'/../mails/',
|
||||||
'module_dir' => PS_ADMIN_DIR.'/../modules/',
|
'module_dir' => _PS_ADMIN_DIR_.'/../modules/',
|
||||||
'theme_lang_dir' => PS_ADMIN_DIR.'/../themes/'._THEME_NAME_.'/lang/',
|
'theme_lang_dir' => _PS_ADMIN_DIR_.'/../themes/'._THEME_NAME_.'/lang/',
|
||||||
'translations_dir' => PS_ADMIN_DIR.'/../translations/',
|
'translations_dir' => _PS_ADMIN_DIR_.'/../translations/',
|
||||||
'customizable_products_dir' => PS_ADMIN_DIR.'/../upload/',
|
'customizable_products_dir' => _PS_ADMIN_DIR_.'/../upload/',
|
||||||
'virtual_products_dir' => PS_ADMIN_DIR.'/../download/'
|
'virtual_products_dir' => _PS_ADMIN_DIR_.'/../download/'
|
||||||
);
|
);
|
||||||
|
|
||||||
$tests_op = array(
|
$tests_op = array(
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
class AdminLocalization extends AdminPreferences
|
class AdminLocalization extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
|
|
||||||
class AdminLogs extends AdminTab
|
class AdminLogs extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../tools/tar/Archive_Tar.php');
|
include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php');
|
||||||
|
|
||||||
class AdminModules extends AdminTab
|
class AdminModules extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -96,9 +96,9 @@ class AdminOrdersStates extends AdminTab
|
|||||||
private function getTemplates($iso_code)
|
private function getTemplates($iso_code)
|
||||||
{
|
{
|
||||||
$array = array();
|
$array = array();
|
||||||
if (!file_exists(PS_ADMIN_DIR.'/../mails/'.$iso_code))
|
if (!file_exists(_PS_ADMIN_DIR_.'/../mails/'.$iso_code))
|
||||||
return false;
|
return false;
|
||||||
$templates = scandir(PS_ADMIN_DIR.'/../mails/'.$iso_code);
|
$templates = scandir(_PS_ADMIN_DIR_.'/../mails/'.$iso_code);
|
||||||
foreach ($templates AS $template)
|
foreach ($templates AS $template)
|
||||||
if (!strncmp(strrev($template), 'lmth.', 5))
|
if (!strncmp(strrev($template), 'lmth.', 5))
|
||||||
$array[] = substr($template, 0, -5);
|
$array[] = substr($template, 0, -5);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
class AdminPDF extends AdminPreferences
|
class AdminPDF extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
class AdminPPreferences extends AdminPreferences
|
class AdminPPreferences extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminProfiles.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminProfiles.php');
|
||||||
|
|
||||||
class AdminProducts extends AdminTab
|
class AdminProducts extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('PS_ADMIN_DIR')) define('PS_ADMIN_DIR', getcwd().'/..');
|
if (!defined('_PS_ADMIN_DIR_')) define('_PS_ADMIN_DIR_', getcwd().'/..');
|
||||||
include_once(PS_ADMIN_DIR.'/../config/config.inc.php');
|
include_once(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
include_once(PS_ADMIN_DIR.'/init.php');
|
include_once(_PS_ADMIN_DIR_.'/init.php');
|
||||||
|
|
||||||
if (Tools::getValue('token') == Tools::getAdminToken('AdminReferrers'.(int)(Tab::getIdFromClassName('AdminReferrers')).(int)(Tools::getValue('id_employee'))))
|
if (Tools::getValue('token') == Tools::getAdminToken('AdminReferrers'.(int)(Tab::getIdFromClassName('AdminReferrers')).(int)(Tools::getValue('id_employee'))))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
class AdminSearchConf extends AdminPreferences
|
class AdminSearchConf extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(dirname(__FILE__).'/AdminStatsTab.php');
|
include_once(dirname(__FILE__).'/AdminStatsTab.php');
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
class AdminStatsConf extends AdminPreferences
|
class AdminStatsConf extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
abstract class AdminStatsTab extends AdminPreferences
|
abstract class AdminStatsTab extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include(PS_ADMIN_DIR.'/tabs/AdminOrdersStates.php');
|
include(_PS_ADMIN_DIR_.'/tabs/AdminOrdersStates.php');
|
||||||
include(PS_ADMIN_DIR.'/tabs/AdminReturnStates.php');
|
include(_PS_ADMIN_DIR_.'/tabs/AdminReturnStates.php');
|
||||||
|
|
||||||
class AdminStatuses extends AdminTab
|
class AdminStatuses extends AdminTab
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/AdminPreferences.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/AdminPreferences.php');
|
||||||
|
|
||||||
class AdminThemes extends AdminPreferences
|
class AdminThemes extends AdminPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(PS_ADMIN_DIR.'/../classes/AdminTab.php');
|
include_once(_PS_ADMIN_DIR_.'/../classes/AdminTab.php');
|
||||||
include_once(PS_ADMIN_DIR.'/../tools/tar/Archive_Tar.php');
|
include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php');
|
||||||
include_once(PS_ADMIN_DIR.'/../tools/pear/PEAR.php');
|
include_once(_PS_ADMIN_DIR_.'/../tools/pear/PEAR.php');
|
||||||
define ('TEXTAREA_SIZED', 70);
|
define ('TEXTAREA_SIZED', 70);
|
||||||
|
|
||||||
class AdminTranslations extends AdminTab
|
class AdminTranslations extends AdminTab
|
||||||
@@ -1023,11 +1023,11 @@ class AdminTranslations extends AdminTab
|
|||||||
$str_output = '';
|
$str_output = '';
|
||||||
/* List templates to parse */
|
/* List templates to parse */
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$tabs = scandir(PS_ADMIN_DIR.'/tabs');
|
$tabs = scandir(_PS_ADMIN_DIR_.'/tabs');
|
||||||
$tabs[] = '../../classes/AdminTab.php';
|
$tabs[] = '../../classes/AdminTab.php';
|
||||||
$files = array();
|
$files = array();
|
||||||
foreach ($tabs AS $tab)
|
foreach ($tabs AS $tab)
|
||||||
if (preg_match('/^(.*)\.php$/', $tab) AND file_exists($tpl = PS_ADMIN_DIR.'/tabs/'.$tab))
|
if (preg_match('/^(.*)\.php$/', $tab) AND file_exists($tpl = _PS_ADMIN_DIR_.'/tabs/'.$tab))
|
||||||
{
|
{
|
||||||
$tab = basename(substr($tab, 0, -4));
|
$tab = basename(substr($tab, 0, -4));
|
||||||
$fd = fopen($tpl, 'r');
|
$fd = fopen($tpl, 'r');
|
||||||
@@ -1041,7 +1041,7 @@ class AdminTranslations extends AdminTab
|
|||||||
}
|
}
|
||||||
foreach (array('header.inc', 'footer.inc', 'index', 'login', 'password', 'functions') AS $tab)
|
foreach (array('header.inc', 'footer.inc', 'index', 'login', 'password', 'functions') AS $tab)
|
||||||
{
|
{
|
||||||
$tab = PS_ADMIN_DIR.'/'.$tab.'.php';
|
$tab = _PS_ADMIN_DIR_.'/'.$tab.'.php';
|
||||||
$fd = fopen($tab, 'r');
|
$fd = fopen($tab, 'r');
|
||||||
$content = fread($fd, filesize($tab));
|
$content = fread($fd, filesize($tab));
|
||||||
fclose($fd);
|
fclose($fd);
|
||||||
@@ -1098,13 +1098,13 @@ class AdminTranslations extends AdminTab
|
|||||||
|
|
||||||
/* List files to parse */
|
/* List files to parse */
|
||||||
$stringToTranslate = array();
|
$stringToTranslate = array();
|
||||||
$dirToParse = array(PS_ADMIN_DIR.'/../',
|
$dirToParse = array(_PS_ADMIN_DIR_.'/../',
|
||||||
PS_ADMIN_DIR.'/../classes/',
|
_PS_ADMIN_DIR_.'/../classes/',
|
||||||
PS_ADMIN_DIR.'/../controllers/',
|
_PS_ADMIN_DIR_.'/../controllers/',
|
||||||
PS_ADMIN_DIR.'/../override/classes/',
|
_PS_ADMIN_DIR_.'/../override/classes/',
|
||||||
PS_ADMIN_DIR.'/../override/controllers/',
|
_PS_ADMIN_DIR_.'/../override/controllers/',
|
||||||
PS_ADMIN_DIR.'/',
|
_PS_ADMIN_DIR_.'/',
|
||||||
PS_ADMIN_DIR.'/tabs/');
|
_PS_ADMIN_DIR_.'/tabs/');
|
||||||
if (!file_exists(_PS_MODULE_DIR_))
|
if (!file_exists(_PS_MODULE_DIR_))
|
||||||
die($this->displayWarning(Tools::displayError('Fatal error: Module directory is not here anymore ').'('._PS_MODULE_DIR_.')'));
|
die($this->displayWarning(Tools::displayError('Fatal error: Module directory is not here anymore ').'('._PS_MODULE_DIR_.')'));
|
||||||
if (!is_writable(_PS_MODULE_DIR_))
|
if (!is_writable(_PS_MODULE_DIR_))
|
||||||
@@ -1480,7 +1480,7 @@ class AdminTranslations extends AdminTab
|
|||||||
$arr_files_to_parse = array(
|
$arr_files_to_parse = array(
|
||||||
_PS_ROOT_DIR_.'/controllers',
|
_PS_ROOT_DIR_.'/controllers',
|
||||||
_PS_ROOT_DIR_.'/classes',
|
_PS_ROOT_DIR_.'/classes',
|
||||||
PS_ADMIN_DIR.'/tabs',
|
_PS_ADMIN_DIR_.'/tabs',
|
||||||
);
|
);
|
||||||
$arr_files_to_parse = array_merge($arr_files_to_parse, $modules_has_mails);
|
$arr_files_to_parse = array_merge($arr_files_to_parse, $modules_has_mails);
|
||||||
foreach ($arr_files_to_parse as $path) {
|
foreach ($arr_files_to_parse as $path) {
|
||||||
@@ -1843,7 +1843,7 @@ class AdminTranslations extends AdminTab
|
|||||||
die('Please create a "'.$iso.'" directory in '._PS_TRANSLATIONS_DIR_);
|
die('Please create a "'.$iso.'" directory in '._PS_TRANSLATIONS_DIR_);
|
||||||
if (!file_exists(_PS_TRANSLATIONS_DIR_.$lang.'/pdf.php'))
|
if (!file_exists(_PS_TRANSLATIONS_DIR_.$lang.'/pdf.php'))
|
||||||
if (!file_put_contents(_PS_TRANSLATIONS_DIR_.$lang.'/pdf.php', "<?php\n\nglobal \$_LANGPDF;\n\$_LANGPDF = array();\n\n?>"))
|
if (!file_put_contents(_PS_TRANSLATIONS_DIR_.$lang.'/pdf.php', "<?php\n\nglobal \$_LANGPDF;\n\$_LANGPDF = array();\n\n?>"))
|
||||||
die('Please create a "'.Tools::strtolower($lang).'.php" file in '.realpath(PS_ADMIN_DIR.'/'));
|
die('Please create a "'.Tools::strtolower($lang).'.php" file in '.realpath(_PS_ADMIN_DIR_.'/'));
|
||||||
unset($_LANGPDF);
|
unset($_LANGPDF);
|
||||||
@include(_PS_TRANSLATIONS_DIR_.$lang.'/pdf.php');
|
@include(_PS_TRANSLATIONS_DIR_.$lang.'/pdf.php');
|
||||||
$files = array();
|
$files = array();
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('PS_ADMIN_DIR', getcwd());
|
define('_PS_ADMIN_DIR_', getcwd());
|
||||||
|
|
||||||
include(PS_ADMIN_DIR.'/../config/config.inc.php');
|
include(_PS_ADMIN_DIR_.'/../config/config.inc.php');
|
||||||
|
|
||||||
if (!isset(Context::getContext()->employee) || !Context::getContext()->employee->isLoggedBack())
|
if (!isset(Context::getContext()->employee) || !Context::getContext()->employee->isLoggedBack())
|
||||||
die;
|
die;
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ abstract class AdminTabCore
|
|||||||
$classname = 'Admin'.$subtab;
|
$classname = 'Admin'.$subtab;
|
||||||
if ($module = Db::getInstance()->getValue('SELECT `module` FROM `'._DB_PREFIX_.'tab` WHERE `class_name` = \''.pSQL($classname).'\'') AND file_exists(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php'))
|
if ($module = Db::getInstance()->getValue('SELECT `module` FROM `'._DB_PREFIX_.'tab` WHERE `class_name` = \''.pSQL($classname).'\'') AND file_exists(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php'))
|
||||||
include_once(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php');
|
include_once(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php');
|
||||||
elseif (file_exists(PS_ADMIN_DIR.'/tabs/'.$classname.'.php'))
|
elseif (file_exists(_PS_ADMIN_DIR_.'/tabs/'.$classname.'.php'))
|
||||||
include_once('tabs/'.$classname.'.php');
|
include_once('tabs/'.$classname.'.php');
|
||||||
if (!isset($this->_includeObj[$key]))
|
if (!isset($this->_includeObj[$key]))
|
||||||
$this->_includeObj[$key] = new $classname;
|
$this->_includeObj[$key] = new $classname;
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ class ShopCore extends ObjectModel
|
|||||||
$excluded_uris[] = $directory;
|
$excluded_uris[] = $directory;
|
||||||
|
|
||||||
// Find current shop from URL
|
// Find current shop from URL
|
||||||
if (!$id_shop = Tools::getValue('id_shop') && !defined('PS_ADMIN_DIR'))
|
if (!$id_shop = Tools::getValue('id_shop') && !defined('_PS_ADMIN_DIR_'))
|
||||||
{
|
{
|
||||||
$sql = 'SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri
|
$sql = 'SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri
|
||||||
FROM '._DB_PREFIX_.'shop_url su
|
FROM '._DB_PREFIX_.'shop_url su
|
||||||
@@ -313,7 +313,7 @@ class ShopCore extends ObjectModel
|
|||||||
*/
|
*/
|
||||||
public function getGroupID()
|
public function getGroupID()
|
||||||
{
|
{
|
||||||
if (defined('PS_ADMIN_DIR'))
|
if (defined('_PS_ADMIN_DIR_'))
|
||||||
return Shop::getContextGroupID();
|
return Shop::getContextGroupID();
|
||||||
return (int)$this->id_group_shop;
|
return (int)$this->id_group_shop;
|
||||||
}
|
}
|
||||||
@@ -541,7 +541,7 @@ class ShopCore extends ObjectModel
|
|||||||
|
|
||||||
$shopID = $context->shop->id;
|
$shopID = $context->shop->id;
|
||||||
$shopGroupID = $context->shop->id_group_shop;
|
$shopGroupID = $context->shop->id_group_shop;
|
||||||
if (defined('PS_ADMIN_DIR'))
|
if (defined('_PS_ADMIN_DIR_'))
|
||||||
{
|
{
|
||||||
if (!isset($context->cookie) || !$context->cookie->shopContext)
|
if (!isset($context->cookie) || !$context->cookie->shopContext)
|
||||||
return ($type == 'shop' || $type == 'group') ? '' : array('', '');
|
return ($type == 'shop' || $type == 'group') ? '' : array('', '');
|
||||||
@@ -561,7 +561,7 @@ class ShopCore extends ObjectModel
|
|||||||
if (!$executed)
|
if (!$executed)
|
||||||
{
|
{
|
||||||
$context = Context::getContext();
|
$context = Context::getContext();
|
||||||
if (defined('PS_ADMIN_DIR'))
|
if (defined('_PS_ADMIN_DIR_'))
|
||||||
{
|
{
|
||||||
// While cookie is not instancied in admin, we wait ...
|
// While cookie is not instancied in admin, we wait ...
|
||||||
if (!isset($context->cookie))
|
if (!isset($context->cookie))
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ class AdminPreferences extends AdminTab
|
|||||||
if (get_class($this) == 'Adminemails')
|
if (get_class($this) == 'Adminemails')
|
||||||
echo '<script type="text/javascript">if (getE(\'PS_MAIL_METHOD2_on\').checked) getE(\'smtp\').style.display = \'block\'; else getE(\'smtp\').style.display = \'none\';</script></div>';
|
echo '<script type="text/javascript">if (getE(\'PS_MAIL_METHOD2_on\').checked) getE(\'smtp\').style.display = \'block\'; else getE(\'smtp\').style.display = \'none\';</script></div>';
|
||||||
|
|
||||||
if (!is_writable(PS_ADMIN_DIR.'/../config/settings.inc.php') AND $name == 'themes')
|
if (!is_writable(_PS_ADMIN_DIR_.'/../config/settings.inc.php') AND $name == 'themes')
|
||||||
echo '<p><img src="../img/admin/warning.gif" alt="" /> '.$this->l('if you change the theme, the settings.inc.php file must be writable (CHMOD 755 / 777)').'</p>';
|
echo '<p><img src="../img/admin/warning.gif" alt="" /> '.$this->l('if you change the theme, the settings.inc.php file must be writable (CHMOD 755 / 777)').'</p>';
|
||||||
|
|
||||||
echo ' <div align="center" style="margin-top: 20px;">
|
echo ' <div align="center" style="margin-top: 20px;">
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ abstract class AdminSelfTab
|
|||||||
if (get_class($this) == 'Adminemails')
|
if (get_class($this) == 'Adminemails')
|
||||||
echo '<script type="text/javascript">if (getE(\'PS_MAIL_METHOD2_on\').checked) getE(\'smtp\').style.display = \'block\'; else getE(\'smtp\').style.display = \'none\';</script></div>';
|
echo '<script type="text/javascript">if (getE(\'PS_MAIL_METHOD2_on\').checked) getE(\'smtp\').style.display = \'block\'; else getE(\'smtp\').style.display = \'none\';</script></div>';
|
||||||
|
|
||||||
if (!is_writable(PS_ADMIN_DIR.'/../config/settings.inc.php') AND $name == 'themes')
|
if (!is_writable(_PS_ADMIN_DIR_.'/../config/settings.inc.php') AND $name == 'themes')
|
||||||
echo '<p><img src="../img/admin/warning.gif" alt="" /> '.$this->l('if you change the theme, the settings.inc.php file must be writable (CHMOD 755 / 777)').'</p>';
|
echo '<p><img src="../img/admin/warning.gif" alt="" /> '.$this->l('if you change the theme, the settings.inc.php file must be writable (CHMOD 755 / 777)').'</p>';
|
||||||
|
|
||||||
echo ' <div align="center" style="margin-top: 20px;">
|
echo ' <div align="center" style="margin-top: 20px;">
|
||||||
@@ -550,7 +550,7 @@ abstract class AdminSelfTab
|
|||||||
$classname = 'Admin'.$subtab;
|
$classname = 'Admin'.$subtab;
|
||||||
if ($module = Db::getInstance()->getValue('SELECT `module` FROM `'._DB_PREFIX_.'tab` WHERE `class_name` = \''.pSQL($classname).'\'') AND file_exists(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php'))
|
if ($module = Db::getInstance()->getValue('SELECT `module` FROM `'._DB_PREFIX_.'tab` WHERE `class_name` = \''.pSQL($classname).'\'') AND file_exists(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php'))
|
||||||
include_once(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php');
|
include_once(_PS_MODULE_DIR_.'/'.$module.'/'.$classname.'.php');
|
||||||
elseif (file_exists(PS_ADMIN_DIR.'/tabs/'.$classname.'.php'))
|
elseif (file_exists(_PS_ADMIN_DIR_.'/tabs/'.$classname.'.php'))
|
||||||
include_once('tabs/'.$classname.'.php');
|
include_once('tabs/'.$classname.'.php');
|
||||||
if (!isset($this->_includeObj[$key]))
|
if (!isset($this->_includeObj[$key]))
|
||||||
$this->_includeObj[$key] = new $classname;
|
$this->_includeObj[$key] = new $classname;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
if(!defined('_PS_ADMIN_DIR_'))
|
if(!defined('_PS_ADMIN_DIR_'))
|
||||||
define('_PS_ADMIN_DIR_',PS_ADMIN_DIR);
|
define('_PS_ADMIN_DIR_', _PS_ADMIN_DIR_);
|
||||||
if(!defined('_PS_USE_SQL_SLAVE_'))
|
if(!defined('_PS_USE_SQL_SLAVE_'))
|
||||||
define('_PS_USE_SQL_SLAVE_',false);
|
define('_PS_USE_SQL_SLAVE_',false);
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ if ( _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$_POST['dir'] !== realpath(_PS_ROOT_DIR_
|
|||||||
die('not allowed');
|
die('not allowed');
|
||||||
|
|
||||||
define('_PS_ADMIN_DIR_', _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$_POST['dir']);
|
define('_PS_ADMIN_DIR_', _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.$_POST['dir']);
|
||||||
define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); // Retro-compatibility
|
|
||||||
//require(_PS_ADMIN_DIR_.'/functions.php');
|
//require(_PS_ADMIN_DIR_.'/functions.php');
|
||||||
include(AUTOUPGRADE_MODULE_DIR.'init.php');
|
include(AUTOUPGRADE_MODULE_DIR.'init.php');
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Autoupgrade extends Module
|
class Autoupgrade extends Module
|
||||||
{
|
{
|
||||||
function __construct()
|
function __construct()
|
||||||
@@ -9,11 +10,11 @@ class Autoupgrade extends Module
|
|||||||
|
|
||||||
if (!defined('_PS_ADMIN_DIR_'))
|
if (!defined('_PS_ADMIN_DIR_'))
|
||||||
{
|
{
|
||||||
if (defined('PS_ADMIN_DIR'))
|
if (defined('_PS_ADMIN_DIR_'))
|
||||||
define('_PS_ADMIN_DIR_',PS_ADMIN_DIR);
|
define('_PS_ADMIN_DIR_', _PS_ADMIN_DIR_);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->_errors[] = $this->l('This version of PrestaShop cannot be upgraded : PS_ADMIN_DIR constant is missing');
|
$this->_errors[] = $this->l('This version of PrestaShop cannot be upgraded :_PS_ADMIN_DIR_ constant is missing');
|
||||||
$autoupgradeCanWork = false;
|
$autoupgradeCanWork = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ function rewriteSettingsFile($baseUrls = NULL, $theme = NULL, $arrayDB = NULL)
|
|||||||
foreach ($defines as $k => $value)
|
foreach ($defines as $k => $value)
|
||||||
$content .= 'define(\''.$k.'\', \''.addslashes($value).'\');'."\n";
|
$content .= 'define(\''.$k.'\', \''.addslashes($value).'\');'."\n";
|
||||||
$content .= "\n?>";
|
$content .= "\n?>";
|
||||||
if ($fd = @fopen(PS_ADMIN_DIR.'/../config/settings.inc.php', 'w'))
|
if ($fd = @fopen(_PS_ADMIN_DIR_.'/../config/settings.inc.php', 'w'))
|
||||||
{
|
{
|
||||||
fwrite($fd, $content);
|
fwrite($fd, $content);
|
||||||
fclose($fd);
|
fclose($fd);
|
||||||
@@ -254,8 +254,8 @@ function checkingTab($tab)
|
|||||||
}
|
}
|
||||||
if ($row['module'] AND file_exists(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php'))
|
if ($row['module'] AND file_exists(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php'))
|
||||||
include_once(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php');
|
include_once(_PS_MODULE_DIR_.'/'.$row['module'].'/'.$tab.'.php');
|
||||||
elseif (file_exists(PS_ADMIN_DIR.'/tabs/'.$tab.'.php'))
|
elseif (file_exists(_PS_ADMIN_DIR_.'/tabs/'.$tab.'.php'))
|
||||||
include_once(PS_ADMIN_DIR.'/tabs/'.$tab.'.php');
|
include_once(_PS_ADMIN_DIR_.'/tabs/'.$tab.'.php');
|
||||||
|
|
||||||
if (!class_exists($tab, false) OR !$row['id_tab'])
|
if (!class_exists($tab, false) OR !$row['id_tab'])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user