mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-04 17:02:17 +02:00
improvement: $page['where'] string replaced by $page['items'].
$page['where'] was an SQL clause used to retrieve pictures in #images table. $page['items'] is the list of picture ids of the current section. improvement: function initialize_category replaced by dedicated included PHP script include/section_init.inc.php. Code was refactored to improve readibility and maintenability. $page['navigation_bar'] is now build in category.php instead of initialize_category function. Function check_cat_id was also replaced by a piece of code in the new file. The file to include to display thumbnails from category.php is now set in section_init.inc.php instead of calculated in category.php. bug fix: the test for rel="up" link for standard HTML navigation links in category menu was not working with non numeric categories, such as "favorites". improvement: function check_login_authorization removed because useless but in profile.php. git-svn-id: http://piwigo.org/svn/trunk@1036 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -100,29 +100,6 @@ SELECT MAX('.$conf['user_fields']['id'].') + 1
|
||||
return $errors;
|
||||
}
|
||||
|
||||
function check_login_authorization($guest_allowed = true)
|
||||
{
|
||||
global $user,$lang,$conf,$template;
|
||||
|
||||
if ($user['is_the_guest'] and !$guest_allowed)
|
||||
{
|
||||
echo '<div style="text-align:center;">'.$lang['only_members'].'<br />';
|
||||
echo '<a href="./identification.php">'.$lang['ident_title'].'</a></div>';
|
||||
exit();
|
||||
}
|
||||
|
||||
if ($conf['gallery_locked'])
|
||||
{
|
||||
echo '<div style="text-align:center;">';
|
||||
echo $lang['gallery_locked_message'];
|
||||
echo '</div>';
|
||||
if ($user['status'] != 'admin')
|
||||
{
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setup_style($style)
|
||||
{
|
||||
return new Template(PHPWG_ROOT_PATH.'template/'.$style);
|
||||
|
||||
Reference in New Issue
Block a user