diff --git a/admin/inc/class.bocategories.inc.php b/admin/inc/class.bocategories.inc.php index 24219b1219..a97dd998d0 100644 --- a/admin/inc/class.bocategories.inc.php +++ b/admin/inc/class.bocategories.inc.php @@ -40,14 +40,14 @@ $this->read_sessiondata(); /* _debug_array($GLOBALS['HTTP_POST_VARS']); */ - /* Might change this to '' at the end---> */ - $start = $GLOBALS['HTTP_POST_VARS']['start'] ? $GLOBALS['HTTP_POST_VARS']['start'] : $GLOBALS['HTTP_GET_VARS']['start']; - $query = $GLOBALS['HTTP_POST_VARS']['query'] ? $GLOBALS['HTTP_POST_VARS']['query'] : $GLOBALS['HTTP_GET_VARS']['query']; - $sort = $GLOBALS['HTTP_POST_VARS']['sort'] ? $GLOBALS['HTTP_POST_VARS']['sort'] : $GLOBALS['HTTP_GET_VARS']['sort']; - $order = $GLOBALS['HTTP_POST_VARS']['order'] ? $GLOBALS['HTTP_POST_VARS']['order'] : $GLOBALS['HTTP_GET_VARS']['order']; - $cat_id = $GLOBALS['HTTP_POST_VARS']['cat_id'] ? $GLOBALS['HTTP_POST_VARS']['cat_id'] : $GLOBALS['HTTP_GET_VARS']['cat_id']; - if(!empty($start) || $start == '0' || $start == 0) + $start = intval(get_var('start',array('POST','GET'))); + $query = get_var('query',array('POST','GET')); + $sort = get_var('sort',array('POST','GET')); + $order = get_var('order',array('POST','GET')); + $cat_id = intval(get_var('cat_id', array('POST','GET'))); + + if(!empty($start) || $start == 0) { if($this->debug) { echo '
overriding start: "' . $this->start . '" now "' . $start . '"'; } $this->start = $start; @@ -62,14 +62,17 @@ { $this->cat_id = $cat_id; } - if($cat_id == '0' || $cat_id == 0 || $cat_id == '') + + if($cat_id == 0) { unset($this->cat_id); } + if(isset($sort) && !empty($sort)) { $this->sort = $sort; } + if(isset($order) && !empty($order)) { $this->order = $order; @@ -125,8 +128,6 @@ function exists($data) { - //$data['type'] = $data['type'] ? $data['type'] : ''; - //$data['cat_id'] = $data['cat_id'] ? $data['cat_id'] : ''; return $this->cats->exists($data); } @@ -142,7 +143,7 @@ } } - function delete($cat_id,$drop_subs=False,$modify_subs=True) + function delete($cat_id,$drop_subs,$modify_subs) { $this->cats->delete($cat_id,$drop_subs,$modify_subs); } diff --git a/admin/inc/class.uicategories.inc.php b/admin/inc/class.uicategories.inc.php index e54540c427..a80010b46a 100644 --- a/admin/inc/class.uicategories.inc.php +++ b/admin/inc/class.uicategories.inc.php @@ -474,7 +474,7 @@ } else { - $GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to delete this category ?')); + $GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to delete this global category ?')); $exists = $this->bo->exists(array ( @@ -488,12 +488,6 @@ $sub_select = '' . lang('Do you want to move all global subcategories one level down ?') . '
'; $sub_select .= '' . lang('Do you want to delete all global subcategories ?'); $GLOBALS['phpgw']->template->set_var('sub_select',$sub_select); - - /* $GLOBALS['phpgw']->template->set_var('lang_drop_subs',lang('Do you also want to delete all global subcategories ?')); - $GLOBALS['phpgw']->template->set_var('drop_subs',''); - - $GLOBALS['phpgw']->template->set_var('lang_modify_subs',lang('Do you want to move all global subcategories one level down ?')); - $GLOBALS['phpgw']->template->set_var('subs',''); */ } $GLOBALS['phpgw']->template->set_var('nolink',$nolink); diff --git a/admin/setup/phpgw_de.lang b/admin/setup/phpgw_de.lang index 9c036dd80e..ea0bf8e687 100644 --- a/admin/setup/phpgw_de.lang +++ b/admin/setup/phpgw_de.lang @@ -18,13 +18,14 @@ application title admin de Titel der Anwendung applications admin de Anwendungen are you sure you want to delete this account ? admin de Sind Sie sicher, daß Sie dieses Konto löschen wollen ? are you sure you want to delete this application ? admin de Sind Sie sicher, daß Sie diese Anwendung löschen wollen ? -are you sure you want to delete this category ? common de Sind Sie sicher, daß Sie diese Kategorie löschen wollen ? +are you sure you want to delete this global category ? common de Sind Sie sicher, daß Sie diese globale Kategorie löschen wollen ? are you sure you want to delete this group ? admin de Sind Sie sicher, daß Sie diese Gruppe löschen wollen ? are you sure you want to kill this session ? admin de Sind Sie sicher, daß Sie diese Session killen wollen ? change main screen message admin de Nachricht der Startseite ändern create group admin de Erstelle Gruppe display admin de Bezeichnung -do you also want to delete all global subcategories ? admin de wollen Sie auch alle globalen Unterkategorien löschen ? +do you want to delete all global subcategories ? admin de Wollen Sie alle globalen Unterkategorien löschen ? +do you want to move all global subcategories one level down ? admin de Wollen Sie alle globalen Unterkategorien einen Level nach unten verschieben ? edit application admin de Anwendung bearbeiten edit global category admin de Globale Kategorie bearbeiten edit global category for x admin de Globale Kategorie für %1 bearbeiten diff --git a/admin/setup/phpgw_en.lang b/admin/setup/phpgw_en.lang index 24f8127b4e..400b6ebfd0 100644 --- a/admin/setup/phpgw_en.lang +++ b/admin/setup/phpgw_en.lang @@ -27,7 +27,7 @@ applications admin en Applications application title admin en Application title are you sure you want to delete this account ? admin en Are you sure you want to delete this account ? are you sure you want to delete this application ? admin en Are you sure you want to delete this application ? -are you sure you want to delete this category ? common en Are you sure you want to delete this category ? +are you sure you want to delete this global category ? common en Are you sure you want to delete this global category ? are you sure you want to delete this group ? admin en Are you sure you want to delete this group ? are you sure you want to delete this server? admin en Are you sure you want to delete this server? are you sure you want to kill this session ? admin en Are you sure you want to kill this session ? @@ -57,7 +57,8 @@ deny access to site configuration admin en Deny access to site configuration deny access to user accounts admin en Deny access to user accounts deny all users access to grant other users access to their entries ? admin en Deny all users access to grant other users access to their entries ? display admin en Display -do you also want to delete all global subcategories ? admin en Do you also want to delete all global subcategories ? +do you want to delete all global subcategories ? admin en Do you want to delete all global subcategories ? +do you want to move all global subcategories one level down ? admin en Do you want to move all global subcategories one level down ? edit application admin en Edit application edit global category admin en Edit global category edit global category for x admin en Edit global category for %1 diff --git a/admin/templates/default/delete_cat.tpl b/admin/templates/default/delete_cat.tpl index aad245f591..fad370b5bc 100644 --- a/admin/templates/default/delete_cat.tpl +++ b/admin/templates/default/delete_cat.tpl @@ -3,21 +3,17 @@
+{error_msg} + - - - - - - + diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index c1548d803d..5b1548ee09 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -538,7 +538,7 @@ if ($cats[$i]['level'] == 1) { $this->db->query("UPDATE phpgw_categories set cat_level=0, cat_parent=0, cat_main='" . intval($cats[$i]['id']) - . " WHERE cat_id='" . intval($cats[$i]['id']) . "' AND cat_appname='" . $this->app_name . "'",__LINE__,__FILE__); + . "' WHERE cat_id='" . intval($cats[$i]['id']) . "' AND cat_appname='" . $this->app_name . "'",__LINE__,__FILE__); $new_main = $cats[$i]['id']; } else
{messages}
{lang_modify_subs}{modify_subs}
{lang_drop_subs}{drop_subs}{sub_select}
-