Changeset 852

Show
Ignore:
Timestamp:
08/29/08 23:45:19 (3 months ago)
Author:
dmondark
Message:

plugin:maintenance Have the plugin return an HTTP 503 response along with a retry-after header (set to 900 seconds). Thanks BigJibby!

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/maintenance_mode/trunk/maintenance_mode.plugin.php

    r851 r852  
    112112    public function filter_theme_act_display_maintenance( $handled, $theme ) 
    113113    { 
     114 
     115        header("HTTP/1.1 503 Service Unavailable"); 
     116        header('Retry-After: 900'); 
     117 
    114118        if ($theme->template_exists('maintenance')) { 
    115119            $theme->maintenance_text = Options::get( self::OPTION_NAME . '__text' ); 
     
    117121        } 
    118122        else { 
     123            header("HTTP/1.1 503 Service Unavailable"); 
    119124            $theme->display('header'); 
    120125            echo '<h1>' . htmlspecialchars( Options::get( self::OPTION_NAME . '__text' ), ENT_COMPAT, 'UTF-8' ) . '</h1>';