forked from extern/egroupware
update cats
This commit is contained in:
parent
f71b6a8f54
commit
6cd1089ca6
@ -26,10 +26,11 @@
|
||||
$errorcount = 0;
|
||||
|
||||
if (!$cat_name) { $error[$errorcount++] = lang('Please enter a name for that category !'); }
|
||||
if (!$error) {
|
||||
if (!$cat_parent) { $exists = $c->exists('mains',$cat_name,$cat_id=''); }
|
||||
else { $exists = $c->exists('subs',$cat_name,$cat_id=''); }
|
||||
if ($exists == True) { $error[$errorcount++] = lang('That category name has been used already !'); }
|
||||
|
||||
}
|
||||
if (! $error) {
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
|
@ -37,10 +37,11 @@
|
||||
if ($submit) {
|
||||
$errorcount = 0;
|
||||
if (!$cat_name) { $error[$errorcount++] = lang('Please enter a name for that category !'); }
|
||||
|
||||
if (!$error) {
|
||||
if (!$cat_parent) { $exists = $c->exists('mains',$cat_name,$cat_id); }
|
||||
else { $exists = $c->exists('subs',$cat_name,$cat_id); }
|
||||
if ($exists == True) { $error[$errorcount++] = lang('That category name has been used already !'); }
|
||||
}
|
||||
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
|
@ -42,10 +42,11 @@
|
||||
if ($submit) {
|
||||
$errorcount = 0;
|
||||
if (!$cat_name) { $error[$errorcount++] = lang('Please enter a name for that category !'); }
|
||||
if (!$error) {
|
||||
if (!$cat_parent) { $exists = $c->exists('mains',$cat_name,$cat_id); }
|
||||
else { $exists = $c->exists('subs',$cat_name,$cat_id); }
|
||||
if ($exists == True) { $error[$errorcount++] = lang('That category name has been used already !'); }
|
||||
|
||||
}
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
if ($access) { $cat_access = 'private'; }
|
||||
|
Loading…
Reference in New Issue
Block a user