Completed
Push — master ( 059178...9d38bf )
by Ralf
112:05 queued 89:44
created
setup/inc/functions.inc.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@  discard block
 block discarded – undo
13 13
  * @version $Id$
14 14
  */
15 15
 
16
-error_reporting(error_reporting() & ~E_NOTICE & ~E_STRICT);
16
+error_reporting(error_reporting()&~E_NOTICE & ~E_STRICT);
17 17
 
18 18
 // for an old header, we need to setup the reference before including it
19
-$GLOBALS['phpgw_info'] =& $GLOBALS['egw_info'];
19
+$GLOBALS['phpgw_info'] = & $GLOBALS['egw_info'];
20 20
 
21 21
 $GLOBALS['egw_info'] = array(
22 22
 	'flags' => array(
@@ -25,32 +25,32 @@  discard block
 block discarded – undo
25 25
 		'currentapp' => 'setup',
26 26
 		'noapi' => True
27 27
 ));
28
-if(file_exists(__DIR__.'/../../header.inc.php'))
28
+if (file_exists(__DIR__.'/../../header.inc.php'))
29 29
 {
30 30
 	include_once(__DIR__.'/../../header.inc.php');
31 31
 }
32 32
 // for an old header we need to setup a reference for the domains
33
-if (!is_array($GLOBALS['egw_domain'])) $GLOBALS['egw_domain'] =& $GLOBALS['phpgw_domain'];
33
+if (!is_array($GLOBALS['egw_domain'])) $GLOBALS['egw_domain'] = & $GLOBALS['phpgw_domain'];
34 34
 
35 35
 /*  If we included the header.inc.php, but it is somehow broken, cover ourselves... */
36
-if(!defined('EGW_SERVER_ROOT') && !defined('EGW_INCLUDE_ROOT'))
36
+if (!defined('EGW_SERVER_ROOT') && !defined('EGW_INCLUDE_ROOT'))
37 37
 {
38 38
 	if (defined('PHPGW_SERVER_ROOT') && defined('PHPGW_INCLUDE_ROOT'))	// pre 1.2 install
39 39
 	{
40
-		define('EGW_SERVER_ROOT',PHPGW_SERVER_ROOT);
41
-		define('EGW_INCLUDE_ROOT',PHPGW_INCLUDE_ROOT);
40
+		define('EGW_SERVER_ROOT', PHPGW_SERVER_ROOT);
41
+		define('EGW_INCLUDE_ROOT', PHPGW_INCLUDE_ROOT);
42 42
 	}
43 43
 	else	// no install
44 44
 	{
45
-		define('EGW_SERVER_ROOT',realpath('..'));
46
-		define('EGW_INCLUDE_ROOT',realpath('..'));
47
-		define('PHPGW_SERVER_ROOT',realpath('..'));
48
-		define('PHPGW_INCLUDE_ROOT',realpath('..'));
45
+		define('EGW_SERVER_ROOT', realpath('..'));
46
+		define('EGW_INCLUDE_ROOT', realpath('..'));
47
+		define('PHPGW_SERVER_ROOT', realpath('..'));
48
+		define('PHPGW_INCLUDE_ROOT', realpath('..'));
49 49
 	}
50
-	define('EGW_API_INC',EGW_SERVER_ROOT.'/phpgwapi/inc');
50
+	define('EGW_API_INC', EGW_SERVER_ROOT.'/phpgwapi/inc');
51 51
 }
52 52
 
53
-require_once(EGW_INCLUDE_ROOT . '/api/src/loader/common.php');
53
+require_once(EGW_INCLUDE_ROOT.'/api/src/loader/common.php');
54 54
 
55 55
 /**
56 56
  * function to handle multilanguage support
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 		if (!is_array($vars))
64 64
 		{
65 65
 			$vars = func_get_args();
66
-			array_shift($vars);    // remove $key
66
+			array_shift($vars); // remove $key
67 67
 		}
68 68
 		return $GLOBALS['egw_setup']->translation->translate("$key", $vars);
69 69
 	}
70 70
 }
71 71
 
72
-if(file_exists(EGW_SERVER_ROOT.'/api/setup/setup.inc.php'))
72
+if (file_exists(EGW_SERVER_ROOT.'/api/setup/setup.inc.php'))
73 73
 {
74 74
 	include(EGW_SERVER_ROOT.'/api/setup/setup.inc.php'); /* To set the current core version */
75 75
 	/* This will change to just use setup_info */
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
 
83 83
 $GLOBALS['egw_info']['server']['app_images'] = 'templates/default/images';
84 84
 
85
-CreateObject('setup.setup',True,True);	// setup constuctor assigns itself to $GLOBALS['egw_setup'], doing it twice fails on some php4
86
-$GLOBALS['phpgw_setup'] =& $GLOBALS['egw_setup'];
85
+CreateObject('setup.setup', True, True); // setup constuctor assigns itself to $GLOBALS['egw_setup'], doing it twice fails on some php4
86
+$GLOBALS['phpgw_setup'] = & $GLOBALS['egw_setup'];
87 87
 
88
-if (!function_exists('version_compare') || version_compare(PHP_VERSION,$GLOBALS['egw_setup']->required_php_version,'<'))
88
+if (!function_exists('version_compare') || version_compare(PHP_VERSION, $GLOBALS['egw_setup']->required_php_version, '<'))
89 89
 {
90 90
 	if (isset($_SERVER['HTTP_HOST'])) echo "<pre>\n";
91 91
 	echo "EGroupware now requires PHP {$GLOBALS['egw_setup']->required_php_version} or greater.\nYour PHP version is: ".PHP_VERSION."\n";
Please login to merge, or discard this patch.
Braces   +12 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,14 +30,20 @@  discard block
 block discarded – undo
30 30
 	include_once(__DIR__.'/../../header.inc.php');
31 31
 }
32 32
 // for an old header we need to setup a reference for the domains
33
-if (!is_array($GLOBALS['egw_domain'])) $GLOBALS['egw_domain'] =& $GLOBALS['phpgw_domain'];
33
+if (!is_array($GLOBALS['egw_domain']))
34
+{
35
+	$GLOBALS['egw_domain'] =& $GLOBALS['phpgw_domain'];
36
+}
34 37
 
35 38
 /*  If we included the header.inc.php, but it is somehow broken, cover ourselves... */
36 39
 if(!defined('EGW_SERVER_ROOT') && !defined('EGW_INCLUDE_ROOT'))
37 40
 {
38
-	if (defined('PHPGW_SERVER_ROOT') && defined('PHPGW_INCLUDE_ROOT'))	// pre 1.2 install
41
+	if (defined('PHPGW_SERVER_ROOT') && defined('PHPGW_INCLUDE_ROOT'))
42
+	{
43
+		// pre 1.2 install
39 44
 	{
40 45
 		define('EGW_SERVER_ROOT',PHPGW_SERVER_ROOT);
46
+	}
41 47
 		define('EGW_INCLUDE_ROOT',PHPGW_INCLUDE_ROOT);
42 48
 	}
43 49
 	else	// no install
@@ -87,7 +93,10 @@  discard block
 block discarded – undo
87 93
 
88 94
 if (!function_exists('version_compare') || version_compare(PHP_VERSION,$GLOBALS['egw_setup']->required_php_version,'<'))
89 95
 {
90
-	if (isset($_SERVER['HTTP_HOST'])) echo "<pre>\n";
96
+	if (isset($_SERVER['HTTP_HOST']))
97
+	{
98
+		echo "<pre>\n";
99
+	}
91 100
 	echo "EGroupware now requires PHP {$GLOBALS['egw_setup']->required_php_version} or greater.\nYour PHP version is: ".PHP_VERSION."\n";
92 101
 	echo 'Please contact your System Administrator.';
93 102
 	exit;
Please login to merge, or discard this patch.