// Fixed issue with refresh of default_country_modules_list.xml
This commit is contained in:
@@ -132,6 +132,8 @@ class AdminAccessControllerCore extends AdminController
|
||||
|
||||
public function ajaxProcessUpdateAccess()
|
||||
{
|
||||
if (_PS_MODE_DEMO_)
|
||||
throw new PrestaShopException(Tools::displayError('This functionality has been disabled.'));
|
||||
if ($this->tabAccess['edit'] != '1')
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit here.'));
|
||||
|
||||
@@ -190,9 +192,10 @@ class AdminAccessControllerCore extends AdminController
|
||||
|
||||
public function ajaxProcessUpdateModuleAccess()
|
||||
{
|
||||
if (_PS_MODE_DEMO_)
|
||||
throw new PrestaShopException(Tools::displayError('This functionality has been disabled.'));
|
||||
if ($this->tabAccess['edit'] != '1')
|
||||
throw new PrestaShopException(Tools::displayError('You do not have permission to edit here.'));
|
||||
/* Update Access Modules */
|
||||
|
||||
if (Tools::isSubmit('changeModuleAccess'))
|
||||
{
|
||||
|
||||
@@ -126,13 +126,12 @@ class AdminAttachmentsControllerCore extends AdminController
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
/* PrestaShop demo mode */
|
||||
if (_PS_MODE_DEMO_)
|
||||
{
|
||||
$this->errors[] = Tools::displayError('This functionality has been disabled.');
|
||||
return;
|
||||
}
|
||||
/* PrestaShop demo mode*/
|
||||
|
||||
if (Tools::isSubmit('submitAdd'.$this->table))
|
||||
{
|
||||
$id = (int)Tools::getValue('id_attachment');
|
||||
|
||||
@@ -174,6 +174,10 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the module list cache if the default country changed
|
||||
if (Tools::isSubmit('submitOptionsconfiguration') && file_exists(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST))
|
||||
@unlink(Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST);
|
||||
|
||||
parent::postProcess();
|
||||
}
|
||||
|
||||
|
||||
@@ -185,8 +185,9 @@ class AdminLoginControllerCore extends AdminController
|
||||
|
||||
public function processForgot()
|
||||
{
|
||||
$email = trim(Tools::getValue('email_forgot'));
|
||||
if (empty($email))
|
||||
if (_PS_MODE_DEMO_)
|
||||
$this->errors[] = Tools::displayError('This functionality has been disabled.');
|
||||
elseif (!($email = trim(Tools::getValue('email_forgot'))))
|
||||
$this->errors[] = Tools::displayError('E-mail is empty');
|
||||
elseif (!Validate::isEmail($email))
|
||||
$this->errors[] = Tools::displayError('Invalid e-mail address');
|
||||
@@ -201,8 +202,6 @@ class AdminLoginControllerCore extends AdminController
|
||||
Configuration::get('PS_PASSWD_TIME_BACK')
|
||||
);
|
||||
}
|
||||
if (_PS_MODE_DEMO_)
|
||||
$this->errors[] = Tools::displayError('This functionality has been disabled.');
|
||||
|
||||
if (!count($this->errors))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user