public/wordpress/wp-content/plugins/backupbuddy/classes/restore.php
/* maintenanceOn()
	 *
	 * Turn ON WordPress maintenance mode.
	 *
	 */
maintenanceOn()
Turn ON WordPress maintenance mode.
maintenanceOn () Turn ON WordPress maintenance mode .
public function maintenanceOn() {
		$this->_before( __FUNCTION__ );
		pb_backupbuddy::status( 'details', 'Turning on maintenance mode on.' );
		if ( ! file_exists( ABSPATH . '.maintenance' ) ) {
			$maintenance_result = @file_put_contents( ABSPATH . '.maintenance', "<?php if ( empty( \$_REQUEST['action'] ) || 'pb_backupbuddy_backupbuddy' != \$_REQUEST['action'] ) { header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); header('Retry-After: 3600'); die( 'Site undergoing maintenance.' ); }" );
			if ( false === $maintenance_result ) {
				$this->_error( '.maintenance file unable to be generated to prevent viewing.' );
				return false;
			} else {
				pb_backupbuddy::status( 'details', '.maintenance file generated to prevent viewing partially migrated site.' );
			}
		} else {
			pb_backupbuddy::status( 'details', '.maintenance file already exists. Skipping creation.' );
		}
		return true;
	}
public function maintenanceOn ( ) { $ this -> _before ( __FUNCTION__ ) ; pb_backupbuddy :: status ( 'details' , 'Turning on maintenance mode on.' ) ; if ( ! file_exists ( ABSPATH . '.maintenance' ) ) { $ maintenance_result = @ file_put_contents ( ABSPATH . '.maintenance' , " <?php if ( empty(  \$ _REQUEST['action'] ) || 'pb_backupbuddy_backupbuddy' !=  \$ _REQUEST['action'] ) { header('HTTP/1.1 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable'); header('Retry-After: 3600'); die( 'Site undergoing maintenance.' ); } " ) ; if ( false === $ maintenance_result ) { $ this -> _error ( '.maintenance file unable to be generated to prevent viewing.' ) ; return false ; } else { pb_backupbuddy :: status ( 'details' , '.maintenance file generated to prevent viewing partially migrated site.' ) ; } } else { pb_backupbuddy :: status ( 'details' , '.maintenance file already exists. Skipping creation.' ) ; } return true ; }
maintenanceOn()
 Turn ON WordPress maintenance mode.
maintenanceOn () Turn ON WordPress maintenance mode .
// Turn on maintenance mode.