public function add($autodate = true, $nullValues = false) { if (WebserviceKey::keyExists($this->key)) { return false; } return parent::add($autodate = true, $nullValues = false); }
public function postProcess() { if (Tools::getValue('key') && strlen(Tools::getValue('key')) < 32) { $this->errors[] = Tools::displayError($this->l('Key length must be 32 character long.')); } if (WebserviceKey::keyExists(Tools::getValue('key')) && !Tools::getValue('id_webservice_account')) { $this->errors[] = Tools::displayError($this->l('This key already exists.')); } return parent::postProcess(); }
public function postProcess() { /* PrestaShop demo mode */ if (_PS_MODE_DEMO_) { $this->_errors[] = Tools::displayError('This functionnality has been disabled.'); return; } /* PrestaShop demo mode*/ if (Tools::getValue('key') && strlen(Tools::getValue('key')) < 32) { $this->_errors[] = Tools::displayError($this->l('Key length must be 32 character long')); } if (WebserviceKey::keyExists(Tools::getValue('key')) && !Tools::getValue('id_webservice_account')) { $this->_errors[] = Tools::displayError($this->l('Key already exists')); } return parent::postProcess(); }
public function postProcess() { if (Tools::getValue('key') && strlen(Tools::getValue('key')) < 32) { $this->errors[] = $this->trans('Key length must be 32 character long.', array(), 'Admin.Parameters.Notification'); } if (WebserviceKey::keyExists(Tools::getValue('key')) && !Tools::getValue('id_webservice_account')) { $this->errors[] = $this->trans('This key already exists.', array(), 'Admin.Parameters.Notification'); } return parent::postProcess(); }