From bf7d95056ae063c95de9269e7fd3d8305fd286c8 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Mon, 05 Mar 2012 10:46:54 -0500
Subject: [PATCH] - FS#1824: Implemented maintenance mode.

---
 interface/lib/classes/remoting.inc.php |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 9f88cfc..12b9c7e 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -67,13 +67,21 @@
     {
 		global $app, $conf, $server;
 		
+		// Maintenance mode
+		$app->uses('ini_parser,getconf');
+		$server_config_array = $app->getconf->get_global_config('misc');
+		if($server_config_array['maintenance_mode'] == 'y'){
+			$this->server->fault('maintenance_mode', 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.');
+			return false;
+		}
+		
 		if(empty($username)) {
-			$this->server->fault('login_username_empty', 'The login username is empty');
+			$this->server->fault('login_username_empty', 'The login username is empty.');
 			return false;
 		}
 		
 		if(empty($password)) {
-			$this->server->fault('login_password_empty', 'The login password is empty');
+			$this->server->fault('login_password_empty', 'The login password is empty.');
 			return false;
 		}
 		

--
Gitblit v1.9.1