[geeklog-cvs] Geeklog-1.x/public_html lib-common.php,1.708,1.709
Dirk Haun
dhaun at qs1489.pair.com
Fri Jul 4 14:19:52 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/public_html
In directory qs1489.pair.com:/tmp/cvs-serv37368/public_html
Modified Files:
lib-common.php
Log Message:
Send a HTTP status code 503 "Service Unavailable" when the site is disabled
Index: lib-common.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/lib-common.php,v
retrieving revision 1.708
retrieving revision 1.709
diff -C2 -d -r1.708 -r1.709
*** lib-common.php 4 Jul 2008 17:26:47 -0000 1.708
--- lib-common.php 4 Jul 2008 18:19:43 -0000 1.709
***************
*** 99,117 ****
// Before we do anything else, check to ensure site is enabled
! if( isset( $_CONF['site_enabled'] ) && !$_CONF['site_enabled'] )
! {
! if( empty( $_CONF['site_disabled_msg'] ))
! {
! echo $_CONF['site_name'] . ' is temporarily down. Please check back soon';
! }
! else
! {
// if the msg starts with http: assume it's a URL we should redirect to
! if( preg_match( "/^(https?):/", $_CONF['site_disabled_msg'] ) === 1 )
! {
! echo COM_refresh( $_CONF['site_disabled_msg'] );
! }
! else
! {
echo $_CONF['site_disabled_msg'];
}
--- 99,115 ----
// Before we do anything else, check to ensure site is enabled
! if (isset($_CONF['site_enabled']) && !$_CONF['site_enabled']) {
!
! if (empty($_CONF['site_disabled_msg'])) {
! header("HTTP/1.1 503 Service Unavailable");
! header("Status: 503 Service Unavailable");
! echo $_CONF['site_name'] . ' is temporarily down. Please check back soon.';
! } else {
// if the msg starts with http: assume it's a URL we should redirect to
! if (preg_match("/^(https?):/", $_CONF['site_disabled_msg']) === 1) {
! echo COM_refresh($_CONF['site_disabled_msg']);
! } else {
! header("HTTP/1.1 503 Service Unavailable");
! header("Status: 503 Service Unavailable");
echo $_CONF['site_disabled_msg'];
}
***************
*** 3968,3972 ****
function COM_emailUserTopics()
{
! global $_CONF, $_TABLES, $LANG08, $LANG24;
$subject = strip_tags( $_CONF['site_name'] . $LANG08[30] . strftime( '%Y-%m-%d', time() ));
--- 3966,3970 ----
function COM_emailUserTopics()
{
! global $_CONF, $_TABLES, $LANG04, $LANG08, $LANG24;
$subject = strip_tags( $_CONF['site_name'] . $LANG08[30] . strftime( '%Y-%m-%d', time() ));
More information about the geeklog-cvs
mailing list