diff --git a/controllers/admin/AdminPerformanceController.php b/controllers/admin/AdminPerformanceController.php index 421a5323a..a3dd63340 100644 --- a/controllers/admin/AdminPerformanceController.php +++ b/controllers/admin/AdminPerformanceController.php @@ -562,6 +562,13 @@ class AdminPerformanceControllerCore extends AdminController public function postProcess() { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + if (Tools::isSubmit('submitAddServer')) { if ($this->tabAccess['add'] === '1') @@ -792,6 +799,10 @@ class AdminPerformanceControllerCore extends AdminController public function ajaxProcess() { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + die(Tools::displayError('This functionality has been disabled.')); + /* PrestaShop demo mode*/ if (Tools::isSubmit('action') && Tools::getValue('action') == 'test_server') { $host = pSQL(Tools::getValue('sHost', '')); diff --git a/controllers/admin/AdminRequestSqlController.php b/controllers/admin/AdminRequestSqlController.php index 588ca9276..81a28a724 100644 --- a/controllers/admin/AdminRequestSqlController.php +++ b/controllers/admin/AdminRequestSqlController.php @@ -158,12 +158,29 @@ class AdminRequestSqlControllerCore extends AdminController return parent::renderForm(); } + + public function postProcess() + { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + { + $this->errors[] = Tools::displayError('This functionality has been disabled.'); + return; + } + /* PrestaShop demo mode*/ + return parent::postProcess(); + } + /** * method call when ajax request is made with the details row action * @see AdminController::postProcess() */ public function ajaxProcess() { + /* PrestaShop demo mode */ + if (_PS_MODE_DEMO_) + die(Tools::displayError('This functionality has been disabled.')); + /* PrestaShop demo mode*/ if ($table = Tools::GetValue('table')) { $request_sql = new RequestSql();