Схема
protected mixed
validate (
)
Аргументы
| Аргумент |
Возможный тип |
Описание |
|
У метода нет аргументов
|
Описание
Метод пока еще не документирован.
Исходный код
if (!$this->user->hasPermission('modify', 'setting/setting')) {
$this->error['warning'] = $this->language->get('error_permission');
}
if (!$this->request->post['config_name']) {
$this->error['name'] = $this->language->get('error_name');
}
if ((utf8_strlen($this->request->post['config_owner']) < 3) || (utf8_strlen($this->request->post['config_owner']) > 64)) {
$this->error['owner'] = $this->language->get('error_owner');
}
if ((utf8_strlen($this->request->post['config_address']) < 3) || (utf8_strlen($this->request->post['config_address']) > 256)) {
$this->error['address'] = $this->language->get('error_address');
}
if ((utf8_strlen($this->request->post['config_email']) > 96) || !preg_match('/^[^\@]+@.*\.[a-z]{2,6}$/i', $this->request->post['config_email'])) {
$this->error['email'] = $this->language->get('error_email');
}
if ((utf8_strlen($this->request->post['config_telephone']) < 3) || (utf8_strlen($this->request->post['config_telephone']) > 32)) {
$this->error['telephone'] = $this->language->get('error_telephone');
}
if (!$this->request->post['config_title']) {
$this->error['title'] = $this->language->get('error_title');
}
if (!empty($this->request->post['config_customer_group_display']) && !in_array($this->request->post['config_customer_group_id'], $this->request->post['config_customer_group_display'])) {
$this->error['customer_group_display'] = $this->language->get('error_customer_group_display');
}
if (!$this->request->post['config_voucher_min']) {
$this->error['voucher_min'] = $this->language->get('error_voucher_min');
}
if (!$this->request->post['config_voucher_max']) {
$this->error['voucher_max'] = $this->language->get('error_voucher_max');
}
if (!$this->request->post['config_image_category_width'] || !$this->request->post['config_image_category_height']) {
$this->error['image_category'] = $this->language->get('error_image_category');
}
if (!$this->request->post['config_image_thumb_width'] || !$this->request->post['config_image_thumb_height']) {
$this->error['image_thumb'] = $this->language->get('error_image_thumb');
}
if (!$this->request->post['config_image_popup_width'] || !$this->request->post['config_image_popup_height']) {
$this->error['image_popup'] = $this->language->get('error_image_popup');
}
if (!$this->request->post['config_image_product_width'] || !$this->request->post['config_image_product_height']) {
$this->error['image_product'] = $this->language->get('error_image_product');
}
if (!$this->request->post['config_image_additional_width'] || !$this->request->post['config_image_additional_height']) {
$this->error['image_additional'] = $this->language->get('error_image_additional');
}
if (!$this->request->post['config_image_related_width'] || !$this->request->post['config_image_related_height']) {
$this->error['image_related'] = $this->language->get('error_image_related');
}
if (!$this->request->post['config_image_compare_width'] || !$this->request->post['config_image_compare_height']) {
$this->error['image_compare'] = $this->language->get('error_image_compare');
}
if (!$this->request->post['config_image_wishlist_width'] || !$this->request->post['config_image_wishlist_height']) {
$this->error['image_wishlist'] = $this->language->get('error_image_wishlist');
}
if (!$this->request->post['config_image_cart_width'] || !$this->request->post['config_image_cart_height']) {
$this->error['image_cart'] = $this->language->get('error_image_cart');
}
if ($this->request->post['config_ftp_status']) {
if (!$this->request->post['config_ftp_host']) {
$this->error['ftp_host'] = $this->language->get('error_ftp_host');
}
if (!$this->request->post['config_ftp_port']) {
$this->error['ftp_port'] = $this->language->get('error_ftp_port');
}
if (!$this->request->post['config_ftp_username']) {
$this->error['ftp_username'] = $this->language->get('error_ftp_username');
}
if (!$this->request->post['config_ftp_password']) {
$this->error['ftp_password'] = $this->language->get('error_ftp_password');
}
}
if (!$this->request->post['config_error_filename']) {
$this->error['error_filename'] = $this->language->get('error_error_filename');
}
if (!$this->request->post['config_catalog_limit']) {
$this->error['catalog_limit'] = $this->language->get('error_limit');
}
if (!$this->request->post['config_admin_limit']) {
$this->error['admin_limit'] = $this->language->get('error_limit');
}
if ((utf8_strlen($this->request->post['config_encryption']) < 3) || (utf8_strlen($this->request->post['config_encryption']) > 32)) {
$this->error['encryption'] = $this->language->get('error_encryption');
}
if ($this->error && !isset($this->error['warning'])) {
$this->error['warning'] = $this->language->get('error_warning');
}
if (!$this->error) {
return true;
} else {
return false;
}