diff options
author | plegall <plg@piwigo.org> | 2010-03-22 00:39:04 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-03-22 00:39:04 +0000 |
commit | 3fde53f0d980fa01c6c2824be412e14b5edd9bc9 (patch) | |
tree | ecc834941341e7fcfa2023ba28e86064a917f965 /include | |
parent | fbfe11375e1ee84a2a9ba102ee34acb5ee1c3d26 (diff) |
feature 1505: improvement, ability to browse the empty gallery. The "no photo
yet" feature can be deactivated at session level.
git-svn-id: http://piwigo.org/svn/trunk@5241 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/common.inc.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/common.inc.php b/include/common.inc.php index 728bf5bad..4aaf940c1 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -169,6 +169,7 @@ if ( !isset($conf['no_photo_yet']) // the message disappears at first photo and !(defined('IN_ADMIN') and IN_ADMIN) // no message inside administration and script_basename() != 'identification' // keep the ability to login + and !isset($_SESSION['no_photo_yet']) // temporary hide ) { $query = ' @@ -179,17 +180,27 @@ SELECT list($nb_photos) = pwg_db_fetch_row(pwg_query($query)); if (0 == $nb_photos) { - $template->set_filenames(array('no_photo_yet'=>'no_photo_yet.tpl')); - - if (is_admin()) + if (isset($_GET['no_photo_yet'])) { - if (isset($_GET['no_photo_yet'])) + if ('browse' == $_GET['no_photo_yet']) + { + $_SESSION['no_photo_yet'] = 'browse'; + redirect(make_index_url()); + exit(); + } + + if ('deactivate' == $_GET['no_photo_yet']) { conf_update_param('no_photo_yet', 'false'); redirect(make_index_url()); exit(); } - + } + + $template->set_filenames(array('no_photo_yet'=>'no_photo_yet.tpl')); + + if (is_admin()) + { $url = $conf['no_photo_yet_url']; if (substr($url, 0, 4) != 'http') { @@ -215,6 +226,7 @@ SELECT array( 'step' => 1, 'U_LOGIN' => 'identification.php', + 'deactivate_url' => get_root_url().'?no_photo_yet=browse', ) ); } |