Completed
Push — master ( 78ec00...fd9415 )
by Hadi
31:47 queued 09:52
created
pixelegg/inc/class.pixelegg_framework.inc.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
 	 *
42 42
 	 * @param string $template ='pixelegg' name of the template
43 43
 	 */
44
-	function __construct($template=self::APP)
44
+	function __construct($template = self::APP)
45 45
 	{
46
-		parent::__construct($template);		// call the constructor of the extended class
46
+		parent::__construct($template); // call the constructor of the extended class
47 47
 
48 48
 		// search 'mobile' dirs first
49
-		if (Api\Header\UserAgent::mobile()) array_unshift ($this->template_dirs, 'mobile');
49
+		if (Api\Header\UserAgent::mobile()) array_unshift($this->template_dirs, 'mobile');
50 50
 	}
51 51
 
52 52
 	/**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 * @param array $extra
58 58
 	 * @return type
59 59
 	 */
60
-	function header(array $extra=array())
60
+	function header(array $extra = array())
61 61
 	{
62 62
 		// load our slider.js, but only if framework requested
63 63
 		if (!self::$header_done && $_GET['cd'] === 'yes' &&
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
 	{
80 80
 		if ($color[0] == '#') $color = ltrim($color, '#');
81 81
 
82
-		$R = hexdec(substr($color,0,2));
83
-		$G = hexdec(substr($color,2,2));
84
-		$B = hexdec(substr($color,4,2));
82
+		$R = hexdec(substr($color, 0, 2));
83
+		$G = hexdec(substr($color, 2, 2));
84
+		$B = hexdec(substr($color, 4, 2));
85 85
 
86 86
 		$Rs = round($R * (100 + $percent) / 100);
87 87
 		$Gs = round($G * (100 + $percent) / 100);
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
 	{
105 105
 		$ret = parent::_get_css();
106 106
 		// color to use
107
-		$color = str_replace('custom',$GLOBALS['egw_info']['user']['preferences']['common']['template_custom_color'],
107
+		$color = str_replace('custom', $GLOBALS['egw_info']['user']['preferences']['common']['template_custom_color'],
108 108
 			$GLOBALS['egw_info']['user']['preferences']['common']['template_color']);
109 109
 
110 110
 		// Create a dark variant of the color
111
-		$color_darker = empty($color) ? '' :$this->_color_shader($color, -30);
111
+		$color_darker = empty($color) ? '' : $this->_color_shader($color, -30);
112 112
 
113 113
 		if (preg_match('/^(#[0-9A-F]+|[A-Z]+)$/i', $GLOBALS['egw_info']['user']['preferences']['common']['sidebox_custom_color']))
114 114
 		{
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 			$loginbox_color = $color_darker;
130 130
 		}
131 131
 
132
-		if (preg_match('/^(#[0-9A-F]+|[A-Z]+)$/i',$color) || preg_match('/^(#[0-9A-F]+|[A-Z]+)$/i',$loginbox_color))	// a little xss check
132
+		if (preg_match('/^(#[0-9A-F]+|[A-Z]+)$/i', $color) || preg_match('/^(#[0-9A-F]+|[A-Z]+)$/i', $loginbox_color))	// a little xss check
133 133
 		{
134 134
 			if (!Api\Header\UserAgent::mobile())
135 135
 			{
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	 * @param string $extra_vars for login url
205 205
 	 * @param string $change_passwd =null string with message to render input fields for password change
206 206
 	 */
207
-	function login_screen($extra_vars, $change_passwd=null)
207
+	function login_screen($extra_vars, $change_passwd = null)
208 208
 	{
209 209
 		if (empty($GLOBALS['loginscreenmessage']))
210 210
 		{
Please login to merge, or discard this patch.