Ignore:
Timestamp:
Jan 31, 2012, 1:33:01 AM (12 years ago)
Author:
plg
Message:

bug 2558 fixed: instead of locking the gallery with a simple checkbox among
configuration options, "lock gallery" becomes a maintenance action, with a
confirmation on popup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/maintenance.php

    r12922 r13001  
    4848switch ($action)
    4949{
     50  case 'lock_gallery' :
     51  {
     52    conf_update_param('gallery_locked', 'true');
     53    redirect(get_root_url().'admin.php?page=maintenance');
     54    break;
     55  }
     56  case 'unlock_gallery' :
     57  {
     58    conf_update_param('gallery_locked', 'false');
     59    $_SESSION['page_infos'] = array(l10n('Gallery unlocked'));
     60    redirect(get_root_url().'admin.php?page=maintenance');
     61    break;
     62  }
    5063  case 'categories' :
    5164  {
     
    165178  );
    166179
     180if ($conf['gallery_locked'])
     181{
     182  $template->assign(
     183    array(
     184      'U_MAINT_UNLOCK_GALLERY' => sprintf($url_format, 'unlock_gallery'),
     185      )
     186    );
     187}
     188else
     189{
     190  $template->assign(
     191    array(
     192      'U_MAINT_LOCK_GALLERY' => sprintf($url_format, 'lock_gallery'),
     193      )
     194    );
     195}
     196
    167197// +-----------------------------------------------------------------------+
    168198// | Define advanced features                                              |
Note: See TracChangeset for help on using the changeset viewer.