bug fixed: create_navigation_bar take into account clean URL if requested.

deletion: argument link_class (HTML class of links) in function
create_navigation_bar was removed, useless since branch 1.5.

bug fixed: rate_items are now a configuration parameter (set in config file)

modification: new functions library functions_rate.inc.php to reduce
picture.php length.

bug fixed: categories were never expanded in the menu since clean URLs.

bug fixed: changing pictures sorting order in main page was always
rederecting to root category.


git-svn-id: http://piwigo.org/svn/trunk@1084 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2006-03-16 22:34:45 +00:00
parent 853bf2a0a5
commit 5980db248a
14 changed files with 249 additions and 192 deletions
+8 -18
View File
@@ -129,30 +129,17 @@ if ($page['show_comments'])
$row = mysql_fetch_array( pwg_query( $query ) );
// navigation bar creation
$url = PHPWG_ROOT_PATH.'picture.php';
$url.= get_query_string_diff(array('add_fav','start'));
// $url = duplicate_picture_URL(
// array(),
// array('start')
// );
if (!isset($_GET['start'])
or !is_numeric($_GET['start'])
or (is_numeric($_GET['start']) and $_GET['start'] < 0))
if (!isset($page['start']))
{
$page['start'] = 0;
}
else
{
$page['start'] = $_GET['start'];
}
$page['navigation_bar'] = create_navigation_bar(
$url,
duplicate_picture_URL(array(), array('start')),
$row['nb_comments'],
$page['start'],
$conf['nb_comment_page'],
''
true // We want a clean URL
);
$template->assign_block_vars(
@@ -198,7 +185,10 @@ SELECT id,author,date,image_id,content
$template->assign_block_vars(
'comments.comment.delete',
array(
'U_COMMENT_DELETE' => $url.'&amp;del='.$row['id']
'U_COMMENT_DELETE' =>
$url_self
.'&amp;action=delete_comment'
.'&amp;comment_to_delete='.$row['id']
)
);
}