merge r 2306 from trunk to branch-1_7

- merged function ordering() with update_global_rank() and also optimized the queries

git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2307 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2008-04-20 22:25:40 +00:00
parent e74943520a
commit cd30335df7
5 changed files with 58 additions and 97 deletions
+2 -3
View File
@@ -60,7 +60,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();
}
// +-----------------------------------------------------------------------+
@@ -82,7 +82,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
@@ -294,7 +293,7 @@ foreach ($categories as $category)
}
}
// Add a link to Page bottom only if needed (10 or more categories)
if ( isset($category['rank']) and $category['rank'] > 9 )
if ( isset($category['rank']) and $category['rank'] > 9 )
{
$template->assign_block_vars('eop_link', array('ICON'=>'Displayed'));
}