Completed
Push — 17.1 ( 8c3b94...29ee37 )
by Ralf
20:39 queued 11:58
created
api/src/Framework/CssIncludes.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,14 +107,20 @@
 block discarded – undo
107 107
 		$max_modified = 0;
108 108
 		//no more dynamic minifying: $debug_minify = $GLOBALS['egw_info']['server']['debug_minify'] === 'True';
109 109
 		$base_path = $GLOBALS['egw_info']['server']['webserver_url'];
110
-		if ($base_path[0] != '/') $base_path = parse_url($base_path, PHP_URL_PATH);
110
+		if ($base_path[0] != '/')
111
+		{
112
+			$base_path = parse_url($base_path, PHP_URL_PATH);
113
+		}
111 114
 		$css_files = '';
112 115
 		foreach(self::$files as $path)
113 116
 		{
114 117
 			foreach(self::resolve_css_includes($path) as $path)
115 118
 			{
116 119
 				list($file,$query) = explode('?',$path,2);
117
-				if (($mod = filemtime(EGW_SERVER_ROOT.$file)) > $max_modified) $max_modified = $mod;
120
+				if (($mod = filemtime(EGW_SERVER_ROOT.$file)) > $max_modified)
121
+				{
122
+					$max_modified = $mod;
123
+				}
118 124
 
119 125
 				// do NOT include app.css or categories.php, as it changes from app to app
120 126
 				//no more dynamic minifying: if ($debug_minify || substr($path, -8) == '/app.css' || substr($file,-14) == 'categories.php')
Please login to merge, or discard this patch.
api/src/Framework/About.php 1 patch
Braces   +53 added lines, -21 removed lines patch added patch discarded remove patch
@@ -168,7 +168,11 @@  discard block
 block discarded – undo
168 168
 				}
169 169
 			}
170 170
 		}
171
-		if (!isset($setup_info[$app]) || !is_array($setup_info[$app])) return null;	// app got eg. removed in filesystem
171
+		if (!isset($setup_info[$app]) || !is_array($setup_info[$app]))
172
+		{
173
+			return null;
174
+		}
175
+		// app got eg. removed in filesystem
172 176
 
173 177
 		$app_info  = array_merge($GLOBALS['egw_info']['apps'][$app], $setup_info[$app]);
174 178
 
@@ -191,7 +195,10 @@  discard block
 block discarded – undo
191 195
 		{
192 196
 			$ret['author'] = $this->_getHtmlPersonalInfo($setup_info[$app], 'author');
193 197
 			$ret['maintainer'] = $this->_getHtmlPersonalInfo($setup_info[$app], 'maintainer');
194
-			if ($app_info['version'] != $setup_info[$app]['version']) $ret['version'] .= ' ('.$setup_info[$app]['version'].')';
198
+			if ($app_info['version'] != $setup_info[$app]['version'])
199
+			{
200
+				$ret['version'] .= ' ('.$setup_info[$app]['version'].')';
201
+			}
195 202
 			$ret['license'] = $setup_info[$app]['license'];
196 203
 			$ret['description'] = $setup_info[$app]['description'];
197 204
 			$ret['note'] = $setup_info[$app]['note'];
@@ -216,39 +223,54 @@  discard block
 block discarded – undo
216 223
 	{
217 224
 		$authors = array();
218 225
 			// get the author(s)
219
-			if ($setup_info[$f]) {
226
+			if ($setup_info[$f])
227
+			{
220 228
 				// author is set
221
-				if (!is_array($setup_info[$f])) {
229
+				if (!is_array($setup_info[$f]))
230
+				{
222 231
 					// author is no array
223 232
 					$authors[0]['name'] = $setup_info[$f];
224
-					if ($setup_info[$f.'_email']) {
233
+					if ($setup_info[$f.'_email'])
234
+					{
225 235
 						$authors[0]['email'] = $setup_info[$f.'_email'];
226 236
 					}
227
-					if ($setup_info[$f.'_url']) {
237
+					if ($setup_info[$f.'_url'])
238
+					{
228 239
 						$authors[0]['url'] = $setup_info[$f.'_url'];
229 240
 					}
230 241
 
231
-				} else {
242
+				}
243
+				else
244
+				{
232 245
 					// author is array
233
-					if ($setup_info[$f]['name']) {
246
+					if ($setup_info[$f]['name'])
247
+					{
234 248
 						// only one author
235 249
 						$authors[0]['name'] = $setup_info[$f]['name'];
236
-						if ($setup_info[$f]['email']) {
250
+						if ($setup_info[$f]['email'])
251
+						{
237 252
 							$authors[0]['email'] = $setup_info[$f]['email'];
238 253
 						}
239
-						if ($setup_info[$f]['url']) {
254
+						if ($setup_info[$f]['url'])
255
+						{
240 256
 							$authors[0]['url'] = $setup_info[$f]['url'];
241 257
 						}
242
-					} else {
258
+					}
259
+					else
260
+					{
243 261
 						// may be more authors
244
-						foreach (array_keys($setup_info[$f]) as $number) {
245
-							if ($setup_info[$f][$number]['name']) {
262
+						foreach (array_keys($setup_info[$f]) as $number)
263
+						{
264
+							if ($setup_info[$f][$number]['name'])
265
+							{
246 266
 									$authors[$number]['name'] = $setup_info[$f][$number]['name'];
247 267
 							}
248
-							if ($setup_info[$f][$number]['email']) {
268
+							if ($setup_info[$f][$number]['email'])
269
+							{
249 270
 									$authors[$number]['email'] = $setup_info[$f][$number]['email'];
250 271
 							}
251
-							if ($setup_info[$f][$number]['url']) {
272
+							if ($setup_info[$f][$number]['url'])
273
+							{
252 274
 									$authors[$number]['url'] = $setup_info[$f][$number]['url'];
253 275
 							}
254 276
 						}
@@ -258,15 +280,19 @@  discard block
 block discarded – undo
258 280
 
259 281
 		// html format authors
260 282
 		$s = '';
261
-		foreach ($authors as $author) {
262
-			if ($s != '') {
283
+		foreach ($authors as $author)
284
+		{
285
+			if ($s != '')
286
+			{
263 287
 					$s .= '<br />';
264 288
 			}
265 289
 			$s .= lang('name').': '.$author['name'];
266
-			if ($author['email']) {
290
+			if ($author['email'])
291
+			{
267 292
 					$s .= '<br />'.lang('email').': <a href="mailto:'.$author['email'].'">'.$author['email'].'</a>';
268 293
 			}
269
-			if ($author['url']) {
294
+			if ($author['url'])
295
+			{
270 296
 					$s .= '<br />'.lang('url').': <a href="'.$author['url'].'" target="_blank">'.$author['url'].'</a>';
271 297
 			}
272 298
 		}
@@ -300,8 +326,14 @@  discard block
 block discarded – undo
300 326
 
301 327
 		if (isset(self::$knownLicenses[strtoupper($name)]))
302 328
 		{
303
-			if (empty($url)) $url = self::$knownLicenses[$name=strtoupper($name)][0];
304
-			if (empty($title)) $title = self::$knownLicenses[$name=strtoupper($name)][1];
329
+			if (empty($url))
330
+			{
331
+				$url = self::$knownLicenses[$name=strtoupper($name)][0];
332
+			}
333
+			if (empty($title))
334
+			{
335
+				$title = self::$knownLicenses[$name=strtoupper($name)][1];
336
+			}
305 337
 		}
306 338
 
307 339
 		return array(
Please login to merge, or discard this patch.
api/src/Framework/Bundle.php 1 patch
Braces   +22 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,7 +74,11 @@  discard block
 block discarded – undo
74 74
 		$query = null;
75 75
 		foreach($js_includes as $file)
76 76
 		{
77
-			if ($file == '/api/js/jsapi/egw.js') continue;	// loaded via own tag, and we must not load it twice!
77
+			if ($file == '/api/js/jsapi/egw.js')
78
+			{
79
+				continue;
80
+			}
81
+			// loaded via own tag, and we must not load it twice!
78 82
 
79 83
 			if (!isset($to_include[$file]))
80 84
 			{
@@ -133,17 +137,27 @@  discard block
 block discarded – undo
133 137
 	{
134 138
 		$debug_minify = $GLOBALS['egw_info']['server']['debug_minify'] === 'True';
135 139
 		// ignore not existing minurl
136
-		if (!empty($minurl) && !file_exists(EGW_SERVER_ROOT.$minurl)) $minurl = null;
140
+		if (!empty($minurl) && !file_exists(EGW_SERVER_ROOT.$minurl))
141
+		{
142
+			$minurl = null;
143
+		}
137 144
 		$to_include_first = $to_include = $to_minify = array();
138 145
 		$max_modified = 0;
139 146
 		$query = null;
140 147
 		foreach($js_includes as $path)
141 148
 		{
142
-			if ($path == '/api/js/jsapi/egw.js') continue; // Leave egw.js out of bundle
149
+			if ($path == '/api/js/jsapi/egw.js')
150
+			{
151
+				continue;
152
+			}
153
+			// Leave egw.js out of bundle
143 154
 			unset($query);
144 155
 			list($path,$query) = explode('?',$path,2);
145 156
 			$mod = filemtime(EGW_SERVER_ROOT.$path);
146
-			if ($mod > $max_modified) $max_modified = $mod;
157
+			if ($mod > $max_modified)
158
+			{
159
+				$max_modified = $mod;
160
+			}
147 161
 
148 162
 			// ckeditor must be included before bundled files, as they depend on it!
149 163
 			if (strpos($path,'/ckeditor/ckeditor.js') !== false)
@@ -182,7 +196,10 @@  discard block
 block discarded – undo
182 196
 			// need to include minified javascript before not minified stuff like jscalendar-setup, as it might depend on it
183 197
 			array_unshift($to_include, $path);
184 198
 		}
185
-		if ($to_include_first) $to_include = array_merge($to_include_first, $to_include);
199
+		if ($to_include_first)
200
+		{
201
+			$to_include = array_merge($to_include_first, $to_include);
202
+		}
186 203
 		//error_log(__METHOD__."("./*array2string($js_includes).*/", $max_modified, $minurl) returning ".array2string($to_include));
187 204
 		return $to_include;
188 205
 	}
Please login to merge, or discard this patch.
api/src/Framework/Extra.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,9 +164,12 @@
 block discarded – undo
164 164
 	{
165 165
 		// adding links of refreshed entry, to give others apps more information about necessity to refresh
166 166
 		if (isset(self::$extra['refresh-opener']) && count(self::$extra['refresh-opener']) <= 8 &&	// do not run twice
167
-			!empty(self::$extra['refresh-opener'][1]) && !empty(self::$extra['refresh-opener'][2]))	// app/id given
167
+			!empty(self::$extra['refresh-opener'][1]) && !empty(self::$extra['refresh-opener'][2]))
168
+		{
169
+			// app/id given
168 170
 		{
169 171
 			$links = Link::get_links(self::$extra['refresh-opener'][1], self::$extra['refresh-opener'][2]);
172
+		}
170 173
 			$apps = array();
171 174
 			foreach($links as $link)
172 175
 			{
Please login to merge, or discard this patch.
api/src/Framework/Minimal.php 1 patch
Braces   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,10 @@  discard block
 block discarded – undo
47 47
 	function header(array $extra=array())
48 48
 	{
49 49
 		// make sure header is output only once
50
-		if (self::$header_done) return '';
50
+		if (self::$header_done)
51
+		{
52
+			return '';
53
+		}
51 54
 		self::$header_done = true;
52 55
 
53 56
 		// js stuff is not needed by login page or in popups
@@ -135,7 +138,11 @@  discard block
 block discarded – undo
135 138
 	function footer()
136 139
 	{
137 140
 		static $footer_done=0;
138
-		if ($footer_done++) return;	// prevent multiple footers, not sure we still need this (RalfBecker)
141
+		if ($footer_done++)
142
+		{
143
+			return;
144
+		}
145
+		// prevent multiple footers, not sure we still need this (RalfBecker)
139 146
 
140 147
 		return "</body>\n</html>\n";	// close body and html tag, eg. for popups
141 148
 	}
Please login to merge, or discard this patch.
api/src/autoload.php 1 patch
Braces   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,11 @@  discard block
 block discarded – undo
37 37
 spl_autoload_register(function($class)
38 38
 {
39 39
 	$parts = explode('\\', $class);
40
-	if (array_shift($parts) != 'EGroupware') return;	// not our prefix
40
+	if (array_shift($parts) != 'EGroupware')
41
+	{
42
+		return;
43
+	}
44
+	// not our prefix
41 45
 
42 46
 	$app = lcfirst(array_shift($parts));
43 47
 	$base = EGW_INCLUDE_ROOT.'/'.$app.'/src/';
@@ -63,7 +67,10 @@  discard block
 block discarded – undo
63 67
 spl_autoload_register(function($class)
64 68
 {
65 69
 	// fixing warnings generated by php 5.3.8 is_a($obj) trying to autoload huge strings
66
-	if (strlen($class) > 64 || strpos($class, '.') !== false) return;
70
+	if (strlen($class) > 64 || strpos($class, '.') !== false)
71
+	{
72
+		return;
73
+	}
67 74
 
68 75
 	$components = explode('_',$class);
69 76
 	$app = array_shift($components);
Please login to merge, or discard this patch.
api/src/Ldap/ServerInfo.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,8 @@
 block discarded – undo
218 218
 					{
219 219
 						if(($info = ldap_get_entries($ds, $sr)))
220 220
 						{
221
-							if($info[0]['objectclasses']) {
221
+							if($info[0]['objectclasses'])
222
+							{
222 223
 								for($i=0; $i<$info[0]['objectclasses']['count']; $i++)
223 224
 								{
224 225
 									$matches = null;
Please login to merge, or discard this patch.
api/src/Json/Exception/InvalidName.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,4 +20,6 @@
 block discarded – undo
20 20
  *
21 21
  * As you get this only by an error in the code or during development, the message does not need to be translated
22 22
  */
23
-class InvalidName extends Exception\NoPermission { }
23
+class InvalidName extends Exception\NoPermission
24
+{
25
+}
Please login to merge, or discard this patch.
api/src/Json/Request.php 1 patch
Braces   +16 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,7 +42,10 @@  discard block
 block discarded – undo
42 42
 	public static function isJSONRequest($set=null)
43 43
 	{
44 44
 		$ret = self::$_hadJSONRequest;
45
-		if (isset($set)) self::$_hadJSONRequest = $set;
45
+		if (isset($set))
46
+		{
47
+			self::$_hadJSONRequest = $set;
48
+		}
46 49
 		return $ret;
47 50
 	}
48 51
 
@@ -60,7 +63,10 @@  discard block
 block discarded – undo
60 63
 		// Remember that we currently are in a JSON request - e.g. used in the redirect code
61 64
 		self::$_hadJSONRequest = true;
62 65
 
63
-		if (get_magic_quotes_gpc()) $input_data = stripslashes($input_data);
66
+		if (get_magic_quotes_gpc())
67
+		{
68
+			$input_data = stripslashes($input_data);
69
+		}
64 70
 
65 71
 		$json_data = json_decode($input_data,true);
66 72
 		if (is_array($json_data) && isset($json_data['request']) && isset($json_data['request']['parameters']) && is_array($json_data['request']['parameters']))
@@ -100,9 +106,12 @@  discard block
 block discarded – undo
100 106
 	 */
101 107
 	public function handleRequest($menuaction, array $parameters)
102 108
 	{
103
-		if (strpos($menuaction,'::') !== false && strpos($menuaction,'.') === false)	// static method name app_something::method
109
+		if (strpos($menuaction,'::') !== false && strpos($menuaction,'.') === false)
110
+		{
111
+			// static method name app_something::method
104 112
 		{
105 113
 			@list($className,$functionName,$handler) = explode('::',$menuaction);
114
+		}
106 115
 			if (substr($className, 0, 11) == 'EGroupware\\')
107 116
 			{
108 117
 				list(,$appName) = explode('\\', strtolower($className));
@@ -179,6 +188,9 @@  discard block
 block discarded – undo
179 188
 			Api\Translation::convert($parameters, 'utf-8'));
180 189
 
181 190
 		// check if we have push notifications, if notifications app available
182
-		if (class_exists('notifications_push')) notifications_push::get();
191
+		if (class_exists('notifications_push'))
192
+		{
193
+			notifications_push::get();
194
+		}
183 195
 	}
184 196
 }
Please login to merge, or discard this patch.