Ignore:
Timestamp:
Mar 22, 2010, 1:39:04 AM (14 years ago)
Author:
plg
Message:

feature 1505: improvement, ability to browse the empty gallery. The "no photo
yet" feature can be deactivated at session level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/common.inc.php

    r5240 r5241  
    170170  and !(defined('IN_ADMIN') and IN_ADMIN)   // no message inside administration
    171171  and script_basename() != 'identification' // keep the ability to login
     172  and !isset($_SESSION['no_photo_yet'])     // temporary hide
    172173  )
    173174{
     
    180181  if (0 == $nb_photos)
    181182  {
    182     $template->set_filenames(array('no_photo_yet'=>'no_photo_yet.tpl'));
    183    
    184     if (is_admin())
     183    if (isset($_GET['no_photo_yet']))
    185184    {
    186       if (isset($_GET['no_photo_yet']))
     185      if ('browse' == $_GET['no_photo_yet'])
     186      {
     187        $_SESSION['no_photo_yet'] = 'browse';
     188        redirect(make_index_url());
     189        exit();
     190      }
     191
     192      if ('deactivate' == $_GET['no_photo_yet'])
    187193      {
    188194        conf_update_param('no_photo_yet', 'false');
     
    190196        exit();
    191197      }
    192      
     198    }
     199   
     200    $template->set_filenames(array('no_photo_yet'=>'no_photo_yet.tpl'));
     201   
     202    if (is_admin())
     203    {     
    193204      $url = $conf['no_photo_yet_url'];
    194205      if (substr($url, 0, 4) != 'http')
     
    216227          'step' => 1,
    217228          'U_LOGIN' => 'identification.php',
     229          'deactivate_url' => get_root_url().'?no_photo_yet=browse',
    218230          )
    219231        );
Note: See TracChangeset for help on using the changeset viewer.