// Fixed issue with refresh of default_country_modules_list.xml
This commit is contained in:
@@ -2723,13 +2723,13 @@ class AdminControllerCore extends Controller
|
||||
{
|
||||
// Define protocol accepted and post data values for this request
|
||||
$protocolsList = array('https://' => 443, 'http://' => 80);
|
||||
$postData = 'version='._PS_VERSION_.'&method=listing&action=native&iso_code='.strtolower(Configuration::get('PS_LOCALE_COUNTRY')).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
|
||||
$postData = 'version='._PS_VERSION_.'&method=listing&action=native&iso_code='.strtolower(Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
|
||||
}
|
||||
if ($request == 'must-have')
|
||||
{
|
||||
// Define protocol accepted and post data values for this request
|
||||
$protocolsList = array('https://' => 443, 'http://' => 80);
|
||||
$postData = 'version='._PS_VERSION_.'&method=listing&action=must-have&iso_code='.strtolower(Configuration::get('PS_LOCALE_COUNTRY')).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
|
||||
$postData = 'version='._PS_VERSION_.'&method=listing&action=must-have&iso_code='.strtolower(Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))).'&iso_lang='.strtolower(Context::getContext()->language->iso_code);
|
||||
}
|
||||
if ($request == 'customer')
|
||||
{
|
||||
@@ -2758,7 +2758,6 @@ class AdminControllerCore extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Make the request
|
||||
$opts = array(
|
||||
'http'=>array(
|
||||
|
||||
@@ -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