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

Moshe Weitzman weitzman at tejasa.com
Fri Sep 30 11:12:50 UTC 2005


with this logic, the site will still appear up for cached pages. the UID 
check could happen after only doing a DRUPAL_BOOTSTRAP_SESSION. That 
would be a big help during a slashdotting. Not sure if the 
theme('maintenance page') call will work then though. It might.

> $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