diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-04-20 22:20:20 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-04-20 22:20:20 +0000 |
commit | 23fcaf6b6493c8d479a30201ea9fff3e5cffe4ff (patch) | |
tree | a0ce56162f8d37d244953b0f1e2cc74865cb04b3 /admin/cat_list.php | |
parent | 57b03a7218475f365e8838bab029bc8a6de94a48 (diff) |
- 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
Diffstat (limited to '')
-rw-r--r-- | admin/cat_list.php | 9 |
1 files changed, 4 insertions, 5 deletions
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 = '<a class="" href="'.$base_url.'">'; +$base_url = get_root_url().'admin.php?page=cat_list'; +$navigation = '<a href="'.$base_url.'">'; $navigation.= l10n('home'); $navigation.= '</a>'; @@ -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']) ); |