[drupal-devel] Re: [CS dev] Worth a look: Symphony

Dries Buytaert dries at buytaert.net
Thu Sep 29 21:37:32 UTC 2005


On 29 Sep 2005, at 20:16, Gerhard Killesreiter wrote:
>>> Take Frontend Offline
>>> This will disable your front-end for non-superusers displaying your
>>> Maintainence page instead. If not maintainence page is found a  
>>> default
>>> message is presented.
>>>
>>
>> Hey, I just did that on drupal.org today!  I needed exclusive access
>> to drupal.org for a couple minutes.  I had to modify index.php for it
>> though ...
>>
>
> I guess you will agree with me that wasting screen space and code  
> lines on
> a button that one needs once every few months isn't worth it...

To give you a quick idea, here is how my modified index.php looks like:


$maintenance = FALSE;

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

if ($maintenance && $user->uid != 1) {
   drupal_set_title("We'll be right back");
   print theme('maintenance_page', 'Drupal.org is being upgraded.  We  
should be back in a jiffy.');
}
else {
   $return = menu_execute_active_handler();
   switch ($return) {
     case MENU_NOT_FOUND:
       drupal_not_found();
       break;
     case MENU_ACCESS_DENIED:
       drupal_access_denied();
       break;
     default:
       if (!empty($return)) {
         print theme('page', $return);
       }
       break;
   }
   drupal_page_footer();
}

I'm certainly going to leave that in.  It's simple, handy, and the  
only effective way to shortcut all visitors.  A non-developer would  
not be able to figure that out.  I leave it up to you guys whether  
that needs to be extended and committed.

--
Dries Buytaert  ::  http://www.buytaert.net/




More information about the drupal-devel mailing list