From 23fcaf6b6493c8d479a30201ea9fff3e5cffe4ff Mon Sep 17 00:00:00 2001 From: rvelices Date: Sun, 20 Apr 2008 22:20:20 +0000 Subject: - merged function ordering() with update_global_rank() and also optimized the queries git-svn-id: http://piwigo.org/svn/trunk@2306 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/cat_list.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'admin/cat_list.php') diff --git a/admin/cat_list.php b/admin/cat_list.php index 640754c70..1ec2d4422 100644 --- a/admin/cat_list.php +++ b/admin/cat_list.php @@ -57,7 +57,7 @@ function save_categories_order($categories) $fields = array('primary' => array('id'), 'update' => array('rank')); mass_updates(CATEGORIES_TABLE, $fields, $datas); - update_global_rank(@$_GET['parent_id']); + update_global_rank(); } // +-----------------------------------------------------------------------+ @@ -66,8 +66,8 @@ function save_categories_order($categories) $categories = array(); -$base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_list'; -$navigation = ''; +$base_url = get_root_url().'admin.php?page=cat_list'; +$navigation = ''; $navigation.= l10n('home'); $navigation.= ''; @@ -79,7 +79,6 @@ if (isset($_GET['delete']) and is_numeric($_GET['delete']) and !is_adviser()) { delete_categories(array($_GET['delete'])); array_push($page['infos'], l10n('cat_virtual_deleted')); - ordering(); update_global_rank(); } // request to add a virtual category @@ -236,7 +235,7 @@ foreach ($categories as $category) 'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'], 'U_EDIT' => $base_url.'cat_modify&cat_id='.$category['id'], - + 'IS_VIRTUAL' => empty($category['dir']) ); -- cgit v1.2.3