diff options
author | plegall <plg@piwigo.org> | 2006-02-12 21:52:16 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2006-02-12 21:52:16 +0000 |
commit | dac7decfb5d01ff27797ba3ba39ea8af3766b89e (patch) | |
tree | 2191078267800600bc7c195f3626ee3436572990 /include/common.inc.php | |
parent | 2dc2eb8630a286ac291605901d7384840a0202a9 (diff) |
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
Diffstat (limited to 'include/common.inc.php')
-rw-r--r-- | include/common.inc.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/common.inc.php b/include/common.inc.php index 83e1bf30d..b89258df1 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -198,6 +198,19 @@ if (defined('IN_ADMIN') and IN_ADMIN) include_once(get_language_filepath('admin.lang.php')); } +if ($conf['gallery_locked']) +{ + echo + '<div style="text-align:center;">' + .$lang['gallery_locked_message'] + .'</div>'; + + if ($user['status'] != 'admin') + { + exit(); + } +} + // only now we can set the localized username of the guest user (and not in // include/user.inc.php) if ($user['is_the_guest']) @@ -209,7 +222,12 @@ if ($user['is_the_guest']) list($user['template'], $user['theme']) = explode('/', $user['template']); // TODO : replace initial $user['template'] by $user['layout'] -include(PHPWG_ROOT_PATH.'template/'.$user['template'].'/theme/'.$user['theme'].'/themeconf.inc.php'); +include( + PHPWG_ROOT_PATH + .'template/'.$user['template'] + .'/theme/'.$user['theme'] + .'/themeconf.inc.php' + ); // template instance $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template']); |