// small fix
This commit is contained in:
@@ -2199,7 +2199,7 @@ class AdminControllerCore extends Controller
|
|||||||
if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture'))
|
if (!Tools::getValue($this->identifier) || ($field != 'passwd' && $field != 'no-picture'))
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('The field %s is required.'),
|
Tools::displayError('The field %s is required.'),
|
||||||
Tools::safeOutput(call_user_func(array($class_name, 'displayFieldName'), $field, $class_name))
|
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Checking for multilingual required fields */
|
/* Checking for multilingual required fields */
|
||||||
@@ -2207,7 +2207,7 @@ class AdminControllerCore extends Controller
|
|||||||
if (($empty = Tools::getValue($field_lang.'_'.$default_language->id)) === false || $empty !== '0' && empty($empty))
|
if (($empty = Tools::getValue($field_lang.'_'.$default_language->id)) === false || $empty !== '0' && empty($empty))
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('The field %1$s is required at least in %2$s.'),
|
Tools::displayError('The field %1$s is required at least in %2$s.'),
|
||||||
Tools::safeOutput(call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name)),
|
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||||
$default_language->name
|
$default_language->name
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -2216,7 +2216,7 @@ class AdminControllerCore extends Controller
|
|||||||
if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $max_length)
|
if (Tools::getValue($field) !== false && Tools::strlen(Tools::getValue($field)) > $max_length)
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('The field %1$s is too long (%2$d chars max).'),
|
Tools::displayError('The field %1$s is too long (%2$d chars max).'),
|
||||||
Tools::safeOutput(call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)),
|
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name),
|
||||||
$max_length
|
$max_length
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -2228,7 +2228,7 @@ class AdminControllerCore extends Controller
|
|||||||
if ($field_lang !== false && Tools::strlen($field_lang) > $max_length)
|
if ($field_lang !== false && Tools::strlen($field_lang) > $max_length)
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('The field %1$s (%2$s) is too long (%3$d chars max, html chars including).'),
|
Tools::displayError('The field %1$s (%2$s) is too long (%3$d chars max, html chars including).'),
|
||||||
Tools::safeOutput(call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name)),
|
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||||
$language['name'],
|
$language['name'],
|
||||||
$max_length
|
$max_length
|
||||||
);
|
);
|
||||||
@@ -2242,7 +2242,7 @@ class AdminControllerCore extends Controller
|
|||||||
if (!Validate::$function($value) && !empty($value))
|
if (!Validate::$function($value) && !empty($value))
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('The field %s is invalid.'),
|
Tools::displayError('The field %s is invalid.'),
|
||||||
Tools::safeOutput(call_user_func(array($class_name, 'displayFieldName'), $field, $class_name))
|
call_user_func(array($class_name, 'displayFieldName'), $field, $class_name)
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Checking for passwd_old validity */
|
/* Checking for passwd_old validity */
|
||||||
@@ -2251,12 +2251,12 @@ class AdminControllerCore extends Controller
|
|||||||
if ($class_name == 'Employee' && !Validate::isPasswdAdmin($value))
|
if ($class_name == 'Employee' && !Validate::isPasswdAdmin($value))
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('The field %s is invalid.'),
|
Tools::displayError('The field %s is invalid.'),
|
||||||
Tools::safeOutput(call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name))
|
call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name)
|
||||||
);
|
);
|
||||||
elseif ($class_name == 'Customer' && !Validate::isPasswd($value))
|
elseif ($class_name == 'Customer' && !Validate::isPasswd($value))
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('The field %s is invalid.'),
|
Tools::displayError('The field %s is invalid.'),
|
||||||
Tools::safeOutput(call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name))
|
call_user_func(array($class_name, 'displayFieldName'), 'passwd', $class_name)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2267,7 +2267,7 @@ class AdminControllerCore extends Controller
|
|||||||
if (!Validate::$function($value))
|
if (!Validate::$function($value))
|
||||||
$this->errors[] = sprintf(
|
$this->errors[] = sprintf(
|
||||||
Tools::displayError('The field %1$s (%2$s) is invalid.'),
|
Tools::displayError('The field %1$s (%2$s) is invalid.'),
|
||||||
Tools::safeOutput(call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name)),
|
call_user_func(array($class_name, 'displayFieldName'), $field_lang, $class_name),
|
||||||
$language['name']
|
$language['name']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user