mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 06:48:40 +01:00
modified exists() to check apps_sub_cats to a global parent_cat
This commit is contained in:
parent
8764e4aec8
commit
3883ba049a
@ -250,7 +250,7 @@
|
|||||||
$s .= '>' . $phpgw->strip_html($cats[$i]['name']);
|
$s .= '>' . $phpgw->strip_html($cats[$i]['name']);
|
||||||
if ($cats[$i]['app_name'] == 'phpgw')
|
if ($cats[$i]['app_name'] == 'phpgw')
|
||||||
{
|
{
|
||||||
$s .= '<' . lang('Global') . '>';
|
$s .= '<' . lang('Global') . '>';
|
||||||
}
|
}
|
||||||
$s .= '</option>';
|
$s .= '</option>';
|
||||||
}
|
}
|
||||||
@ -447,19 +447,18 @@
|
|||||||
|
|
||||||
if ($cat_name)
|
if ($cat_name)
|
||||||
{
|
{
|
||||||
$cat_exists = " AND cat_name='" . addslashes($cat_name) . "' ";
|
$cat_exists = " cat_name='" . addslashes($cat_name) . "' ";
|
||||||
}
|
}
|
||||||
if ($cat_id)
|
if ($cat_id)
|
||||||
{
|
{
|
||||||
$cat_exists = " AND cat_parent='$cat_id' ";
|
$cat_exists = " cat_parent='$cat_id' ";
|
||||||
}
|
}
|
||||||
if ($cat_name && $cat_id)
|
if ($cat_name && $cat_id)
|
||||||
{
|
{
|
||||||
$cat_exists = " AND cat_name='" . addslashes($cat_name) . "' AND cat_id != '$cat_id' ";
|
$cat_exists = " cat_name='" . addslashes($cat_name) . "' AND cat_id != '$cat_id' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->query("select count(*) from phpgw_categories where cat_appname='"
|
$this->db->query("select count(*) from phpgw_categories where $cat_exists $filter",__LINE__,__FILE__);
|
||||||
. $this->app_name . "' $cat_exists $filter",__LINE__,__FILE__);
|
|
||||||
|
|
||||||
$this->db->next_record();
|
$this->db->next_record();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user