Plugin Directory

Changeset 950506


Ignore:
Timestamp:
07/17/2014 06:00:34 PM (12 years ago)
Author:
gibbon.cz
Message:

fixed defaults

Location:
busy-server/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • busy-server/trunk/busy-server-admin.php

    r950493 r950506  
    44Plugin URI: https://github.com/gibboncz/busy-server
    55Description: When the server load is higher than specified, show an error message instead of loading the page.
    6 Version: 0.2.1
     6Version: 0.2.2
    77Author: Lubos Svoboda
    88*/
  • busy-server/trunk/busy-server.php

    r950493 r950506  
    44Plugin URI: http://wordpress.org/plugins/busy-server/
    55Description: When the server load is higher than specified, show an error message instead of loading the page.
    6 Version: 0.2.1
     6Version: 0.2.2
    77Author: Lubos Svoboda
    88*/
     
    7373if (!function_exists('busy_server_show')) {
    7474    function busy_server_show() {
    75         $busy_msg = get_option('busy_server_busy_message');
    76         if (empty($busy_msg))
    77             $busy_msg = 'Server is busy. Please try reloading this page after few minutes.'; // default message
    78         echo $busy_msg;
    79         exit;
    80     }
    81 }
     75   
     76        header("HTTP/1.1 503 Service Temporarily Unavailable");
     77        header("Status: 503 Service Temporarily Unavailable");
     78        header("Retry-After: 3600");
     79            ?><!DOCTYPE html>
     80                <html>
     81                <head>
     82                    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     83                    <title>Server Busy</title>
     84                    <meta name="robots" content="none" />
     85                </head>
     86                <body>
     87                    <div>
     88            <?php   
     89       
     90                $busy_msg = get_option('busy_server_busy_message');
     91                if (empty($busy_msg))
     92                    $busy_msg = 'Server is busy. Please try reloading this page after few minutes.'; // default message
     93                echo $busy_msg;
     94                echo '</div></body>';
     95                exit;
     96            }
     97        }
    8298
    8399//Calculate load for UNIX multiple core machine, @return float
  • busy-server/trunk/readme.txt

    r950494 r950506  
    44Requires at least: 3.4.2
    55Tested up to: 3.9.1
    6 Stable tag: 0.2.1
     6Stable tag: 0.2.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4949= 0.2 =
    5050Custom error message and maximum load settings
     51
     52= 0.2.1 =
     53Fixed default values
     54
     55= 0.2.2 =
     56Added proper 503 HTTP headers
Note: See TracChangeset for help on using the changeset viewer.