1 edb Mar 21, 2009 05:37
3 edb Mar 21, 2009 20:48
Awesome! I tweaked it a wee bit so I could leave it there until the next time I need it. Fairly simple tweak, as I'm sure you already guessed given that it's code from me eh?
// this is "maintenance mode for everyone but me"
if( false ) {
global $current_User;
if( !is_logged_in() || (is_logged_in() && $current_User->ID != 1) ) {
header('HTTP/1.0 503 Service Unavailable');
echo '<h1>503 Service Unavailable</h1>';
die( 'The site is temporarily down for maintenance.' );
}
}
Now all I gotta do next time is change the false to true and it'll be like magic.
Thanks sam2kb!
4 sam2kb Mar 22, 2009 06:01
No problem :)
As a temporarily solution you can put something like this in conf/hacks.php
You're right about the core feature, and there also should be different ways to display the debug info only to selected users/groups, or at least to user #1