Completed
Push — 16.1 ( 2b6741...abc73d )
by Nathan
50:22 queued 36:36
created
filemanager/inc/class.filemanager_merge.inc.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
 		}
124 124
 		// Custom fields
125 125
 		if($content && strpos($content, '#') !== 0)
126
-                {
126
+				{
127 127
 			// Expand link-to custom fields
128 128
 			 $this->cf_link_to_expand($file, $content, $info);
129 129
 
Please login to merge, or discard this patch.
Braces   +21 added lines, -7 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 		}
124 124
 		// Custom fields
125 125
 		if($content && strpos($content, '#') !== 0)
126
-                {
126
+		{
127 127
 			// Expand link-to custom fields
128 128
 			 $this->cf_link_to_expand($file, $content, $info);
129 129
 
@@ -151,12 +151,14 @@  discard block
 block discarded – undo
151 151
 			// Try this first - a normal path /apps/appname/id/file
152 152
 			list($app, $app_id) = explode('/', substr($file['path'], strpos($file['path'], 'apps/')+5));
153 153
 			// Symlink?
154
-			if(!$app || !(int)$app_id || !array_key_exists($app, $GLOBALS['egw_info']['user']['apps'])) {
154
+			if(!$app || !(int)$app_id || !array_key_exists($app, $GLOBALS['egw_info']['user']['apps']))
155
+			{
155 156
 				// Try resolving just app + ID - /apps/App Name/Record Title/file
156 157
 				$resolved = Vfs::resolve_url_symlinks(implode('/',array_slice(explode('/',$file['dir']),0,4)));
157 158
 				list($app, $app_id) = explode('/', substr($resolved, strpos($resolved, 'apps/')+5));
158 159
 
159
-				if(!$app || !(int)$app_id || !array_key_exists($app, $GLOBALS['egw_info']['user']['apps'])) {
160
+				if(!$app || !(int)$app_id || !array_key_exists($app, $GLOBALS['egw_info']['user']['apps']))
161
+				{
160 162
 					// Get rid of any virtual folders (eg: All$) and symlinks
161 163
 					$resolved = Vfs::resolve_url_symlinks($file['path']);
162 164
 					list($app, $app_id) = explode('/', substr($resolved, strpos($resolved, 'apps/')+5));
@@ -190,7 +192,10 @@  discard block
 block discarded – undo
190 192
 		if(is_array($link))
191 193
 		{
192 194
 			// Directories have their internal protocol in path here
193
-			if($link['path'] && strpos($link['path'], '://') !== false) $link['path'] = $file['path'];
195
+			if($link['path'] && strpos($link['path'], '://') !== false)
196
+			{
197
+				$link['path'] = $file['path'];
198
+			}
194 199
 			$link = Api\Session::link('/index.php', $link);
195 200
 		}
196 201
 		else
@@ -211,7 +216,10 @@  discard block
 block discarded – undo
211 216
 		// Add markers
212 217
 		foreach($file as $key => &$value)
213 218
 		{
214
-			if(!$value) $value = '';
219
+			if(!$value)
220
+			{
221
+				$value = '';
222
+			}
215 223
 			$info['$$'.($prefix ? $prefix.'/':'').$key.'$$'] = $value;
216 224
 		}
217 225
 		if($app_placeholders)
@@ -252,9 +260,15 @@  discard block
 block discarded – undo
252 260
 		);
253 261
 		foreach($fields as $name => $label)
254 262
 		{
255
-			if (!($n&1)) echo '<tr>';
263
+			if (!($n&1))
264
+			{
265
+				echo '<tr>';
266
+			}
256 267
 			echo '<td>{{'.$name.'}}</td><td>'.lang($label).'</td>';
257
-			if ($n&1) echo "</tr>\n";
268
+			if ($n&1)
269
+			{
270
+				echo "</tr>\n";
271
+			}
258 272
 			$n++;
259 273
 		}
260 274
 
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	{
61 61
 		parent::__construct();
62 62
 
63
-		if($_dir)
63
+		if ($_dir)
64 64
 		{
65 65
 			$this->dir = $_dir;
66 66
 		}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @param string &$content=null content to create some replacements only if they are use
77 77
 	 * @return array|boolean
78 78
 	 */
79
-	protected function get_replacements($id,&$content=null)
79
+	protected function get_replacements($id, &$content = null)
80 80
 	{
81 81
 		if (!($replacements = $this->filemanager_replacements($id, '', $content)))
82 82
 		{
@@ -92,27 +92,27 @@  discard block
 block discarded – undo
92 92
 	 * @param string $prefix='' prefix like eg. 'erole'
93 93
 	 * @return array|boolean
94 94
 	 */
95
-	public function filemanager_replacements($id,$prefix='', &$content = null)
95
+	public function filemanager_replacements($id, $prefix = '', &$content = null)
96 96
 	{
97 97
 		$info = array();
98
-		$file = Vfs::lstat($id,true);
98
+		$file = Vfs::lstat($id, true);
99 99
 
100 100
 		$file['mtime'] = Api\DateTime::to($file['mtime']);
101 101
 		$file['ctime'] = Api\DateTime::to($file['ctime']);
102 102
 
103 103
 		$file['name'] = Vfs::basename($id);
104 104
 		$file['dir'] = ($dir = Vfs::dirname($id)) ? Vfs::decodePath($dir) : '';
105
-		$dirlist = explode('/',$file['dir']);
105
+		$dirlist = explode('/', $file['dir']);
106 106
 		$file['folder'] = array_pop($dirlist);
107
-		$file['folder_file'] = $file['folder'] . '/'.$file['name'];
107
+		$file['folder_file'] = $file['folder'].'/'.$file['name'];
108 108
 		$file['path'] = $id;
109 109
 		$file['rel_path'] = str_replace($this->dir.'/', '', $id);
110 110
 		$file['hsize'] = Vfs::hsize($file['size']);
111 111
 		$file['mime'] = Vfs::mime_content_type($id);
112
-		$file['gid'] *= -1;  // our widgets use negative gid's
112
+		$file['gid'] *= -1; // our widgets use negative gid's
113 113
 		if (($props = Vfs::propfind($id)))
114 114
 		{
115
-			foreach($props as $prop)
115
+			foreach ($props as $prop)
116 116
 			{
117 117
 				$file[$prop['name']] = $prop['val'];
118 118
 			}
@@ -122,22 +122,22 @@  discard block
 block discarded – undo
122 122
 			$file['symlink'] = Vfs::readlink($id);
123 123
 		}
124 124
 		// Custom fields
125
-		if($content && strpos($content, '#') !== 0)
125
+		if ($content && strpos($content, '#') !== 0)
126 126
                 {
127 127
 			// Expand link-to custom fields
128 128
 			 $this->cf_link_to_expand($file, $content, $info);
129 129
 
130
-			foreach(Api\Storage\Customfields::get('filemanager') as $name => $field)
130
+			foreach (Api\Storage\Customfields::get('filemanager') as $name => $field)
131 131
 			{
132 132
 				// Set any missing custom fields, or the marker will stay
133
-				if(!$file['#'.$name])
133
+				if (!$file['#'.$name])
134 134
 				{
135 135
 					$file['#'.$name] = '';
136 136
 					continue;
137 137
 				}
138 138
 
139 139
 				// Format date cfs per user Api\Preferences
140
-				if($field['type'] == 'date' || $field['type'] == 'date-time')
140
+				if ($field['type'] == 'date' || $field['type'] == 'date-time')
141 141
 				{
142 142
 					$this->date_fields[] = '#'.$name;
143 143
 					$file['#'.$name] = Api\DateTime::to($file['#'.$name], $field['type'] == 'date' ? true : '');
@@ -146,51 +146,51 @@  discard block
 block discarded – undo
146 146
 		}
147 147
 
148 148
 		// If in apps folder, try for app-specific placeholders
149
-		if($dirlist[1] == 'apps' && count($dirlist) > 1)
149
+		if ($dirlist[1] == 'apps' && count($dirlist) > 1)
150 150
 		{
151 151
 			// Try this first - a normal path /apps/appname/id/file
152
-			list($app, $app_id) = explode('/', substr($file['path'], strpos($file['path'], 'apps/')+5));
152
+			list($app, $app_id) = explode('/', substr($file['path'], strpos($file['path'], 'apps/') + 5));
153 153
 			// Symlink?
154
-			if(!$app || !(int)$app_id || !array_key_exists($app, $GLOBALS['egw_info']['user']['apps'])) {
154
+			if (!$app || !(int)$app_id || !array_key_exists($app, $GLOBALS['egw_info']['user']['apps'])) {
155 155
 				// Try resolving just app + ID - /apps/App Name/Record Title/file
156
-				$resolved = Vfs::resolve_url_symlinks(implode('/',array_slice(explode('/',$file['dir']),0,4)));
157
-				list($app, $app_id) = explode('/', substr($resolved, strpos($resolved, 'apps/')+5));
156
+				$resolved = Vfs::resolve_url_symlinks(implode('/', array_slice(explode('/', $file['dir']), 0, 4)));
157
+				list($app, $app_id) = explode('/', substr($resolved, strpos($resolved, 'apps/') + 5));
158 158
 
159
-				if(!$app || !(int)$app_id || !array_key_exists($app, $GLOBALS['egw_info']['user']['apps'])) {
159
+				if (!$app || !(int)$app_id || !array_key_exists($app, $GLOBALS['egw_info']['user']['apps'])) {
160 160
 					// Get rid of any virtual folders (eg: All$) and symlinks
161 161
 					$resolved = Vfs::resolve_url_symlinks($file['path']);
162
-					list($app, $app_id) = explode('/', substr($resolved, strpos($resolved, 'apps/')+5));
162
+					list($app, $app_id) = explode('/', substr($resolved, strpos($resolved, 'apps/') + 5));
163 163
 				}
164 164
 			}
165
-			if($app && $app_id)
165
+			if ($app && $app_id)
166 166
 			{
167
-				if($app && $GLOBALS['egw_info']['user']['apps'][$app])
167
+				if ($app && $GLOBALS['egw_info']['user']['apps'][$app])
168 168
 				{
169 169
 					$app_merge = null;
170 170
 					try
171 171
 					{
172
-						$classname = $app .'_merge';
173
-						if(class_exists($classname))
172
+						$classname = $app.'_merge';
173
+						if (class_exists($classname))
174 174
 						{
175 175
 							$app_merge = new $classname();
176
-							if($app_merge && method_exists($app_merge, 'get_replacements'))
176
+							if ($app_merge && method_exists($app_merge, 'get_replacements'))
177 177
 							{
178 178
 								$app_placeholders = $app_merge->get_replacements($app_id, $content);
179 179
 							}
180 180
 						}
181 181
 					}
182 182
 					// Silently discard & continue
183
-					catch(Exception $e) {
184
-						unset($e);	// not used
183
+					catch (Exception $e) {
184
+						unset($e); // not used
185 185
 					}
186 186
 				}
187 187
 			}
188 188
 		}
189 189
 		$link = Link::mime_open($file['url'], $file['mime']);
190
-		if(is_array($link))
190
+		if (is_array($link))
191 191
 		{
192 192
 			// Directories have their internal protocol in path here
193
-			if($link['path'] && strpos($link['path'], '://') !== false) $link['path'] = $file['path'];
193
+			if ($link['path'] && strpos($link['path'], '://') !== false) $link['path'] = $file['path'];
194 194
 			$link = Api\Session::link('/index.php', $link);
195 195
 		}
196 196
 		else
@@ -209,12 +209,12 @@  discard block
 block discarded – undo
209 209
 		$file['url'] = $link;
210 210
 
211 211
 		// Add markers
212
-		foreach($file as $key => &$value)
212
+		foreach ($file as $key => &$value)
213 213
 		{
214
-			if(!$value) $value = '';
215
-			$info['$$'.($prefix ? $prefix.'/':'').$key.'$$'] = $value;
214
+			if (!$value) $value = '';
215
+			$info['$$'.($prefix ? $prefix.'/' : '').$key.'$$'] = $value;
216 216
 		}
217
-		if($app_placeholders)
217
+		if ($app_placeholders)
218 218
 		{
219 219
 			$info = array_merge($app_placeholders, $info);
220 220
 		}
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 			'hsize' => 'Size',
251 251
 			'size' => 'Size (in bytes)',
252 252
 		);
253
-		foreach($fields as $name => $label)
253
+		foreach ($fields as $name => $label)
254 254
 		{
255 255
 			if (!($n&1)) echo '<tr>';
256 256
 			echo '<td>{{'.$name.'}}</td><td>'.lang($label).'</td>';
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 		}
260 260
 
261 261
 		echo '<tr><td colspan="4"><h3>'.lang('Custom fields').":</h3></td></tr>";
262
-		foreach(Api\Storage\Customfields::get('filemanager') as $name => $field)
262
+		foreach (Api\Storage\Customfields::get('filemanager') as $name => $field)
263 263
 		{
264 264
 			echo '<tr><td>{{#'.$name.'}}</td><td colspan="3">'.$field['label']."</td></tr>\n";
265 265
 		}
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 		echo '<tr><td colspan="4">'.lang('For files linked to an application entry (inside /apps/appname/id/) the placeholders for that application are also available.  See the specific application for a list of available placeholders.').'</td></tr>';
269 269
 
270 270
 		echo '<tr><td colspan="4"><h3>'.lang('General fields:')."</h3></td></tr>";
271
-		foreach(array(
271
+		foreach (array(
272 272
 			'date' => lang('Date'),
273 273
 			'user/n_fn' => lang('Name of current user, all other contact fields are valid too'),
274 274
 			'user/account_lid' => lang('Username'),
Please login to merge, or discard this patch.
filemanager/test.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
 );
19 19
 include('../header.inc.php');
20 20
 
21
-if (!($path = Api\Cache::getSession('filemanger','test')))
21
+if (!($path = Api\Cache::getSession('filemanger', 'test')))
22 22
 {
23 23
 	$path = '/home/'.$GLOBALS['egw_info']['user']['account_lid'];
24 24
 }
25 25
 if (isset($_REQUEST['path'])) $path = $_REQUEST['path'];
26
-echo Api\Html::form("<p>Path: ".Api\Html::input('path',$path,'text','size="40"').
27
-	Api\Html::submit_button('',lang('Submit'))."</p>\n",array(),'','','','','GET');
26
+echo Api\Html::form("<p>Path: ".Api\Html::input('path', $path, 'text', 'size="40"').
27
+	Api\Html::submit_button('', lang('Submit'))."</p>\n", array(), '', '', '', '', 'GET');
28 28
 
29 29
 if (isset($path) && !empty($path))
30 30
 {
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
 	{
33 33
 		throw new Api\Exception\WrongUserinput('Not an absolute path!');
34 34
 	}
35
-	Api\Cache::setSession('filemanger','test',$path);
35
+	Api\Cache::setSession('filemanger', 'test', $path);
36 36
 
37 37
 	echo "<h2>";
38
-	foreach(explode('/',$path) as $n => $part)
38
+	foreach (explode('/', $path) as $n => $part)
39 39
 	{
40 40
 		$p .= ($p != '/' ? '/' : '').$part;
41
-		echo ($n > 1 ? ' / ' : '').Api\Html::a_href($n ? $part : ' / ','/filemanager/test.php',array('path'=>$p));
41
+		echo ($n > 1 ? ' / ' : '').Api\Html::a_href($n ? $part : ' / ', '/filemanager/test.php', array('path'=>$p));
42 42
 	}
43 43
 	echo "</h2>\n";
44 44
 
@@ -50,29 +50,29 @@  discard block
 block discarded – undo
50 50
 
51 51
 	$time = microtime(true);
52 52
 	$stat = Vfs::stat($path);
53
-	$stime = number_format(1000*(microtime(true)-$time),1);
53
+	$stime = number_format(1000 * (microtime(true) - $time), 1);
54 54
 
55 55
 	$time2 = microtime(true);
56 56
 	if ($is_dir)// && ($d = Vfs::opendir($path)))
57 57
 	{
58 58
 		$files = array();
59 59
 		//while(($file = readdir($d)))
60
-		foreach(Vfs::scandir($path) as $file)
60
+		foreach (Vfs::scandir($path) as $file)
61 61
 		{
62
-			if (Vfs::is_readable($fpath=Vfs::concat($path,$file)))
62
+			if (Vfs::is_readable($fpath = Vfs::concat($path, $file)))
63 63
 			{
64
-				$file = Api\Html::a_href($file,'/filemanager/test.php',array('path'=>$fpath));
64
+				$file = Api\Html::a_href($file, '/filemanager/test.php', array('path'=>$fpath));
65 65
 			}
66 66
 			$file .= ' ('.Vfs::mime_content_type($fpath).')';
67 67
 			$files[] = $file;
68 68
 		}
69 69
 		//closedir($d);
70
-		$time2f = number_format(1000*(microtime(true)-$time2),1);
70
+		$time2f = number_format(1000 * (microtime(true) - $time2), 1);
71 71
 		echo "<p>".($files ? 'Directory' : 'Empty directory')." took $time2f ms</p>\n";
72
-		if($files) echo '<ol><li>'.implode("</li>\n<li>",$files).'</ol>'."\n";
72
+		if ($files) echo '<ol><li>'.implode("</li>\n<li>", $files).'</ol>'."\n";
73 73
 	}
74 74
 
75
-	echo "<p><b>stat('$path')</b> took $stime ms (mode = ".(isset($stat['mode'])?sprintf('%o',$stat['mode']).' = '.Vfs::int2mode($stat['mode']):'NULL').')';
75
+	echo "<p><b>stat('$path')</b> took $stime ms (mode = ".(isset($stat['mode']) ? sprintf('%o', $stat['mode']).' = '.Vfs::int2mode($stat['mode']) : 'NULL').')';
76 76
 	if (is_array($stat))
77 77
 	{
78 78
 		_debug_array($stat);
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
 	echo "<p><b>readlink('$path')</b>=".array2string(Vfs::readlink($path))."</p>\n";
90 90
 	$time3 = microtime(true);
91 91
 	$lstat = Vfs::lstat($path);
92
-	$time3f = number_format(1000*(microtime(true)-$time3),1);
93
-	echo "<p><b>lstat('$path')</b> took $time3f ms (mode = ".(isset($lstat['mode'])?sprintf('%o',$lstat['mode']).' = '.Vfs::int2mode($lstat['mode']):'NULL').')';
92
+	$time3f = number_format(1000 * (microtime(true) - $time3), 1);
93
+	echo "<p><b>lstat('$path')</b> took $time3f ms (mode = ".(isset($lstat['mode']) ? sprintf('%o', $lstat['mode']).' = '.Vfs::int2mode($lstat['mode']) : 'NULL').')';
94 94
 	if (is_array($lstat))
95 95
 	{
96 96
 		_debug_array($lstat);
Please login to merge, or discard this patch.
Braces   +12 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,10 @@  discard block
 block discarded – undo
22 22
 {
23 23
 	$path = '/home/'.$GLOBALS['egw_info']['user']['account_lid'];
24 24
 }
25
-if (isset($_REQUEST['path'])) $path = $_REQUEST['path'];
25
+if (isset($_REQUEST['path']))
26
+{
27
+	$path = $_REQUEST['path'];
28
+}
26 29
 echo Api\Html::form("<p>Path: ".Api\Html::input('path',$path,'text','size="40"').
27 30
 	Api\Html::submit_button('',lang('Submit'))."</p>\n",array(),'','','','','GET');
28 31
 
@@ -53,9 +56,12 @@  discard block
 block discarded – undo
53 56
 	$stime = number_format(1000*(microtime(true)-$time),1);
54 57
 
55 58
 	$time2 = microtime(true);
56
-	if ($is_dir)// && ($d = Vfs::opendir($path)))
59
+	if ($is_dir)
60
+	{
61
+		// && ($d = Vfs::opendir($path)))
57 62
 	{
58 63
 		$files = array();
64
+	}
59 65
 		//while(($file = readdir($d)))
60 66
 		foreach(Vfs::scandir($path) as $file)
61 67
 		{
@@ -69,7 +75,10 @@  discard block
 block discarded – undo
69 75
 		//closedir($d);
70 76
 		$time2f = number_format(1000*(microtime(true)-$time2),1);
71 77
 		echo "<p>".($files ? 'Directory' : 'Empty directory')." took $time2f ms</p>\n";
72
-		if($files) echo '<ol><li>'.implode("</li>\n<li>",$files).'</ol>'."\n";
78
+		if($files)
79
+		{
80
+			echo '<ol><li>'.implode("</li>\n<li>",$files).'</ol>'."\n";
81
+		}
73 82
 	}
74 83
 
75 84
 	echo "<p><b>stat('$path')</b> took $stime ms (mode = ".(isset($stat['mode'])?sprintf('%o',$stat['mode']).' = '.Vfs::int2mode($stat['mode']):'NULL').')';
Please login to merge, or discard this patch.
updateGruntfile.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
 }
37 37
 //print_r($config); exit;
38 38
 
39
-$uglify =& $config['uglify'];
39
+$uglify = & $config['uglify'];
40 40
 
41
-foreach(Bundle::all() as $name => $files)
41
+foreach (Bundle::all() as $name => $files)
42 42
 {
43
-	if ($name == '.ts') continue;	// ignore timestamp
43
+	if ($name == '.ts') continue; // ignore timestamp
44 44
 
45 45
 	// remove leading / from file-names
46 46
 	array_walk($files, function(&$path)
@@ -79,16 +79,16 @@  discard block
 block discarded – undo
79 79
 }
80 80
 
81 81
 // add css for all templates and themes
82
-$cssmin =& $config['cssmin'];
83
-$GLOBALS['egw_info']['flags']['currentapp'] = '*grunt*';	// to no find any app.css files
84
-$GLOBALS['egw_info']['server']['debug_minify'] = 'True';	// otherwise we would only get minified file
85
-foreach(array('pixelegg','jdots')/*array_keys(Framework::list_templates())*/ as $template)
82
+$cssmin = & $config['cssmin'];
83
+$GLOBALS['egw_info']['flags']['currentapp'] = '*grunt*'; // to no find any app.css files
84
+$GLOBALS['egw_info']['server']['debug_minify'] = 'True'; // otherwise we would only get minified file
85
+foreach (array('pixelegg', 'jdots')/*array_keys(Framework::list_templates())*/ as $template)
86 86
 {
87 87
 	$GLOBALS['egw_info']['server']['template_set'] = $template;
88 88
 	$tpl = Framework::factory();
89 89
 	$themes = $tpl->list_themes();
90
-	if ($template == 'pixelegg') $themes[] = 'fw_mobile';	// this is for mobile devices
91
-	foreach($themes as $theme)
90
+	if ($template == 'pixelegg') $themes[] = 'fw_mobile'; // this is for mobile devices
91
+	foreach ($themes as $theme)
92 92
 	{
93 93
 		// skip not working cssmin of pixelegg/traditional: Broken @import declaration of "../../etemplate/templates/default/etemplate2.css"
94 94
 		if ($template == 'pixelegg' && $theme == 'traditional') continue;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 $new_json = str_replace("\n", "\n\t",
115 115
 	preg_replace_callback('/^( *)/m', function($matches)
116 116
 	{
117
-		return str_repeat("\t", strlen($matches[1])/4);
117
+		return str_repeat("\t", strlen($matches[1]) / 4);
118 118
 	}, json_encode($config, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES)));
119 119
 
120 120
 $new_content = preg_replace('/^(\s*)"([a-z0-9]+)":/mi', '$1$2:', $new_json);
Please login to merge, or discard this patch.
Braces   +22 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,10 @@  discard block
 block discarded – undo
13 13
 use EGroupware\Api\Framework;
14 14
 use EGroupware\Api\Framework\Bundle;
15 15
 
16
-if (php_sapi_name() !== 'cli') die("This is a commandline ONLY tool!\n");
16
+if (php_sapi_name() !== 'cli')
17
+{
18
+	die("This is a commandline ONLY tool!\n");
19
+}
17 20
 
18 21
 $GLOBALS['egw_info'] = array(
19 22
 	'flags' => array(
@@ -40,12 +43,19 @@  discard block
 block discarded – undo
40 43
 
41 44
 foreach(Bundle::all() as $name => $files)
42 45
 {
43
-	if ($name == '.ts') continue;	// ignore timestamp
46
+	if ($name == '.ts')
47
+	{
48
+		continue;
49
+	}
50
+	// ignore timestamp
44 51
 
45 52
 	// remove leading / from file-names
46 53
 	array_walk($files, function(&$path)
47 54
 	{
48
-		if ($path[0] == '/') $path = substr($path, 1);
55
+		if ($path[0] == '/')
56
+		{
57
+			$path = substr($path, 1);
58
+		}
49 59
 	});
50 60
 
51 61
 	// api/js/jsapi/egw.js loaded via own tag, and we must not load it twice!
@@ -87,11 +97,18 @@  discard block
 block discarded – undo
87 97
 	$GLOBALS['egw_info']['server']['template_set'] = $template;
88 98
 	$tpl = Framework::factory();
89 99
 	$themes = $tpl->list_themes();
90
-	if ($template == 'pixelegg') $themes[] = 'fw_mobile';	// this is for mobile devices
100
+	if ($template == 'pixelegg')
101
+	{
102
+		$themes[] = 'fw_mobile';
103
+	}
104
+	// this is for mobile devices
91 105
 	foreach($themes as $theme)
92 106
 	{
93 107
 		// skip not working cssmin of pixelegg/traditional: Broken @import declaration of "../../etemplate/templates/default/etemplate2.css"
94
-		if ($template == 'pixelegg' && $theme == 'traditional') continue;
108
+		if ($template == 'pixelegg' && $theme == 'traditional')
109
+		{
110
+			continue;
111
+		}
95 112
 		$GLOBALS['egw_info']['user']['preferences']['common']['theme'] = $theme;
96 113
 		// empty include list by not-existing file plus last true
97 114
 		Framework\CssIncludes::add('*grunt*', null, true, true);
Please login to merge, or discard this patch.
calendar/sitemgr/class.module_calendar_month.inc.php 3 patches
Spacing   +29 added lines, -30 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 			'category' => array(
56 56
 				'type' => 'select',
57 57
 				'label' => lang('Choose a category'),
58
-				'options' => array(),	// specification of options is postponed into the get_user_interface function
58
+				'options' => array(), // specification of options is postponed into the get_user_interface function
59 59
 				'multiple' => true,
60 60
 			),
61 61
 			'numWeeks' => array(
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 	function get_user_interface()
108 108
 	{
109 109
 		// copied from bookmarks module.
110
-		$cat = createobject('phpgwapi.categories','','calendar');
111
-		$cats = $cat->return_array('all',0,False,'','cat_name','',True);
110
+		$cat = createobject('phpgwapi.categories', '', 'calendar');
111
+		$cats = $cat->return_array('all', 0, False, '', 'cat_name', '', True);
112 112
 		$cat_ids = array();
113 113
 		while (list(,$category) = @each($cats))
114 114
 		{
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
 			$this->arguments['category']['multiple'] = 5;
120 120
 		}
121 121
 
122
-		if (! isset($GLOBALS['egw']->accounts))
122
+		if (!isset($GLOBALS['egw']->accounts))
123 123
 		{
124 124
 			$GLOBALS['egw']->accounts = new Api\Accounts();
125 125
 		}
126
-		$this->accounts =& $GLOBALS['egw']->accounts;
127
-		$search_params=array(
126
+		$this->accounts = & $GLOBALS['egw']->accounts;
127
+		$search_params = array(
128 128
 			'type' => 'both',
129 129
 			'app' => 'calendar',
130 130
 		);
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 		// sort users and groups separately.
135 135
 		if (isset($GLOBALS['sitemgr_info']['anonymous_user']))
136 136
 		{
137
-			$anon_user = $this->accounts->name2id($GLOBALS['sitemgr_info']['anonymous_user'],'account_lid','u');
137
+			$anon_user = $this->accounts->name2id($GLOBALS['sitemgr_info']['anonymous_user'], 'account_lid', 'u');
138 138
 		}
139 139
 		else
140 140
 		{
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 			 * Get possible sitemgr paths from the HTTP_REFERRER in order to unreveal the
144 144
 			 * anonymous user for the correct site.
145 145
 			 */
146
-			$sitemgr_path = preg_replace('/^[^\/]+:\/\/[^\/]+\/([^\?]*)(\?.*)*$/',"/\${1}",$_SERVER['HTTP_REFERER']);
146
+			$sitemgr_path = preg_replace('/^[^\/]+:\/\/[^\/]+\/([^\?]*)(\?.*)*$/', "/\${1}", $_SERVER['HTTP_REFERER']);
147 147
 			// Remove the trailing file- / pathname if any
148 148
 			$sitemgr_path = preg_replace('/[^\/]*$/', '', $sitemgr_path);
149 149
 			// Add leading slash if it has been lost.
@@ -155,14 +155,14 @@  discard block
 block discarded – undo
155 155
 			// Code adapted from sitemgr-site/index.php
156 156
 			$site_urls = array();
157 157
 			$site_urls[] = $sitemgr_path;
158
-			$site_urls[] = ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['SERVER_ADDR'] . $sitemgr_path;
159
-			$site_urls[] = $site_url = ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . $sitemgr_path;
158
+			$site_urls[] = ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['SERVER_ADDR'].$sitemgr_path;
159
+			$site_urls[] = $site_url = ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].$sitemgr_path;
160 160
 
161
-			$anon_user = $this->accounts->name2id($GLOBALS['egw']->db->select('egw_sitemgr_sites','anonymous_user,anonymous_passwd,site_id',
162
-				array('site_url' => $site_urls),__LINE__,__FILE__,false,'','sitemgr')->fetchColumn(),'account_lid','u');
161
+			$anon_user = $this->accounts->name2id($GLOBALS['egw']->db->select('egw_sitemgr_sites', 'anonymous_user,anonymous_passwd,site_id',
162
+				array('site_url' => $site_urls), __LINE__, __FILE__, false, '', 'sitemgr')->fetchColumn(), 'account_lid', 'u');
163 163
 		}
164 164
 
165
-		$anon_groups = $this->accounts->memberships($anon_user,true);
165
+		$anon_groups = $this->accounts->memberships($anon_user, true);
166 166
 		foreach ($accounts as $entry)
167 167
 		{
168 168
 			$is_group = false;
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
 			$acl = new Acl($entry['account_id']);
171 171
 			$acl->read_repository();
172 172
 			// get the rights for each account to check whether the anon user has read permissions.
173
-			$rights = $acl->get_rights($anon_user,'calendar');
173
+			$rights = $acl->get_rights($anon_user, 'calendar');
174 174
 			// also add the anon user if it's his own calendar.
175
-			if (($rights & Acl::READ) || ($entry['account_id'] == $anon_user))
175
+			if (($rights&Acl::READ) || ($entry['account_id'] == $anon_user))
176 176
 			{
177 177
 				$has_read_permissions = true;
178 178
 			}
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
 				// or ass permissions if this is the anon group's calendar.
183 183
 				foreach ($anon_groups as $parent_group)
184 184
 				{
185
-					$rights = $acl->get_rights($parent_group,'calendar');
186
-					if (($rights & Acl::READ) || ($entry['account_id'] == $parent_group))
185
+					$rights = $acl->get_rights($parent_group, 'calendar');
186
+					if (($rights&Acl::READ) || ($entry['account_id'] == $parent_group))
187 187
 					{
188 188
 						$has_read_permissions = true;
189 189
 						break;
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 				}
200 200
 				else
201 201
 				{
202
-					$users[$entry['account_id']] = Api\Accounts::format_username($entry['account_lid'],$entry['account_firstname'],$entry['account_lastname']);
202
+					$users[$entry['account_id']] = Api\Accounts::format_username($entry['account_lid'], $entry['account_firstname'], $entry['account_lastname']);
203 203
 				}
204 204
 			}
205 205
 		}
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 		return parent::get_user_interface();
220 220
 	}
221 221
 
222
-	function get_content(&$arguments,$properties)
222
+	function get_content(&$arguments, $properties)
223 223
 	{
224 224
 		$html = "";
225 225
 		Api\Translation::add_app('calendar');
@@ -227,33 +227,32 @@  discard block
 block discarded – undo
227 227
 		$this->ui->allowEdit = false;
228 228
 		$this->ui->use_time_grid = isset($arguments['grid']) ? $arguments['grid'] : false;
229 229
 
230
-		$weeks = $arguments['numWeeks'] ? (int) $arguments['numWeeks'] : 2;
230
+		$weeks = $arguments['numWeeks'] ? (int)$arguments['numWeeks'] : 2;
231 231
 
232
-		if (($arguments['acceptDateParam']) && (get_var('date',array('POST','GET'))))
232
+		if (($arguments['acceptDateParam']) && (get_var('date', array('POST', 'GET'))))
233 233
 		{
234
-			$start = (int) (strtotime(get_var('date',array('POST','GET'))) +
234
+			$start = (int)(strtotime(get_var('date', array('POST', 'GET'))) +
235 235
 					(60 * 60 * 24 * 7 * $dateOffset));
236 236
 		}
237 237
 		else
238 238
 		{
239
-			$start = (int) ($this->bo->now_su +
239
+			$start = (int)($this->bo->now_su +
240 240
 					(60 * 60 * 24 * 7 * $dateOffset));
241 241
 		}
242 242
 		$start = new Api\DateTime($start);
243 243
 		$start->setWeekstart();
244 244
 		$first = $start->format('ts');
245
-		$last = strtotime("+$weeks weeks",$first) - 1;
245
+		$last = strtotime("+$weeks weeks", $first) - 1;
246 246
 
247 247
 		if ($arguments['showTitle'])
248 248
 		{
249 249
 			$html .= '<div id="divAppboxHeader">'.$GLOBALS['egw_info']['apps']['calendar']['title'].' - '.lang('Weekview').": ";
250
-			$html .= lang('After %1',$this->bo->long_date($first));
250
+			$html .= lang('After %1', $this->bo->long_date($first));
251 251
 			$html .= "</div>";
252 252
 		}
253 253
 
254 254
 		// set the search parameters
255
-		$search_params = Array
256
-		(
255
+		$search_params = Array(
257 256
 			'offset' => false,
258 257
 			'order' => 'cal_start ASC',
259 258
 			'start' => $first,
@@ -288,19 +287,19 @@  discard block
 block discarded – undo
288 287
 		$html .= '<!-- END Calendar info -->'."\n";
289 288
 		unset($css_file);
290 289
 		// we add DAY_s/2 to $this->first (using 12h), to deal with daylight saving changes
291
-		for ($week_start = $first; $week_start < $last; $week_start = strtotime("+1 week",$week_start))
290
+		for ($week_start = $first; $week_start < $last; $week_start = strtotime("+1 week", $week_start))
292 291
 		{
293 292
 			$week = array();
294 293
 			for ($i = 0; $i < 7; ++$i)
295 294
 			{
296
-				$day_ymd = $this->bo->date2string($i ? strtotime("+$i days",$week_start) : $week_start);
295
+				$day_ymd = $this->bo->date2string($i ? strtotime("+$i days", $week_start) : $week_start);
297 296
 				$week[$day_ymd] = array_shift($rows);
298 297
 			}
299 298
 			$week_view = array(
300 299
 				'menuaction' => false,
301 300
 				'date' => $this->bo->date2string($week_start),
302 301
 			);
303
-			$title = lang('Wk').' '.adodb_date('W',$week_start);
302
+			$title = lang('Wk').' '.adodb_date('W', $week_start);
304 303
 			if (!isset($GLOBALS['egw']->template))
305 304
 			{
306 305
 				$GLOBALS['egw']->template = new Framework\Template;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,8 @@
 block discarded – undo
115 115
 			$cat_ids[$category['id']] = $GLOBALS['egw']->strip_html($category['name']);
116 116
 		}
117 117
 		$this->arguments['category']['options'] = $cat_ids;
118
-		if (count($cat_ids) > 5) {
118
+		if (count($cat_ids) > 5)
119
+		{
119 120
 			$this->arguments['category']['multiple'] = 5;
120 121
 		}
121 122
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
 		}
253 253
 
254 254
 		// set the search parameters
255
-		$search_params = Array
255
+		$search_params = array
256 256
 		(
257 257
 			'offset' => false,
258 258
 			'order' => 'cal_start ASC',
Please login to merge, or discard this patch.
calendar/setup/setup.inc.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 $setup_info['calendar']['enable']  = 1;
16 16
 $setup_info['calendar']['index']   = 'calendar.calendar_uiviews.index&ajax=true';
17 17
 
18
-$setup_info['calendar']['license']  = 'GPL';
18
+$setup_info['calendar']['license'] = 'GPL';
19 19
 $setup_info['calendar']['description'] =
20 20
 	'Powerful group calendar with meeting request system and ACL security.';
21 21
 $setup_info['calendar']['note'] =
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,5 +50,5 @@
 block discarded – undo
50 50
 /* Dependencies for this app to work */
51 51
 $setup_info['calendar']['depends'][] = array(
52 52
 	 'appname' => 'api',
53
-	 'versions' => Array('16.1')
53
+	 'versions' => array('16.1')
54 54
 );
Please login to merge, or discard this patch.
calendar/setup/tz_aliases.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	'Arab Standard Time' => 'Asia/Riyadh',
25 25
 	'Arabian Standard Time' => 'Asia/Dubai',
26 26
 	'Arabic Standard Time' => 'Asia/Baghdad',
27
-	'Argentina Standard Time' => 'America/Argentina/Buenos_Aires',	// was 'America/Buenos_Aires',
27
+	'Argentina Standard Time' => 'America/Argentina/Buenos_Aires', // was 'America/Buenos_Aires',
28 28
 	'Atlantic Standard Time' => 'America/Halifax',
29 29
 	'Azerbaijan Standard Time' => 'Asia/Baku',
30 30
 	'Azores Standard Time' => 'Atlantic/Azores',
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	'Greenland Standard Time' => 'America/Godthab',
60 60
 	'Greenwich Standard Time' => 'Atlantic/Reykjavik',
61 61
 	'Hawaiian Standard Time' => 'Pacific/Honolulu',
62
-	'India Standard Time' => 'Asia/Kolkata',	// Asia/Calcutta is an alias to Asia/Kolkata
62
+	'India Standard Time' => 'Asia/Kolkata', // Asia/Calcutta is an alias to Asia/Kolkata
63 63
 	'Iran Standard Time' => 'Asia/Tehran',
64 64
 	'Israel Standard Time' => 'Asia/Jerusalem',
65 65
 	'Jordan Standard Time' => 'Asia/Amman',
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	'Eniwetok, Kwajalein, Dateline Time' => 'Pacific/Kwajalein',
199 199
 
200 200
 	// various aliases collected over time
201
-	'America/Creston' => 'America/Dawson_Creek',	// not in sqlight DB of Thunderbird version 1.2011n, Dawson Creek is also UTC-7 without DS
201
+	'America/Creston' => 'America/Dawson_Creek', // not in sqlight DB of Thunderbird version 1.2011n, Dawson Creek is also UTC-7 without DS
202 202
 	'Armenian Standard Time' => 'Asia/Yerevan',
203 203
 	'Asia/Katmandu' => 'Asia/Kathmandu',
204 204
 	'Asia/Calcutta' => 'Asia/Kolkata',
Please login to merge, or discard this patch.
calendar/setup/default_records.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@
 block discarded – undo
10 10
  */
11 11
 
12 12
 // enable auto-loading of holidays from localhost by default
13
-foreach(array(
13
+foreach (array(
14 14
 	'auto_load_holidays' => 'True',
15 15
 	'holidays_url_path'  => 'localhost',
16 16
 ) as $name => $value)
17 17
 {
18
-	$oProc->insert($GLOBALS['egw_setup']->config_table,array(
18
+	$oProc->insert($GLOBALS['egw_setup']->config_table, array(
19 19
 		'config_value' => $value,
20
-	),array(
20
+	), array(
21 21
 		'config_app' => 'phpgwapi',
22 22
 		'config_name' => $name,
23
-	),__FILE__,__LINE__);
23
+	), __FILE__, __LINE__);
24 24
 }
25 25
 
26 26
 // import timezone data
Please login to merge, or discard this patch.
calendar/freebusy.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -41,23 +41,23 @@  discard block
 block discarded – undo
41 41
 	$GLOBALS['egw_info']['flags']['currentapp'] = 'calendar';
42 42
 }
43 43
 // fix for SOGo connector, which does not decode the = in our f/b url
44
-if (strpos($_SERVER['QUERY_STRING'],'=3D') !== false && substr($_GET['user'],0,2) == '3D')
44
+if (strpos($_SERVER['QUERY_STRING'], '=3D') !== false && substr($_GET['user'], 0, 2) == '3D')
45 45
 {
46
-	$_GET['user'] = substr($_GET['user'],2);
47
-	if (isset($_GET['password'])) $_GET['password'] = substr($_GET['password'],2);
48
-	if (isset($_GET['cred'])) $_GET['cred'] = substr($_GET['cred'],2);
46
+	$_GET['user'] = substr($_GET['user'], 2);
47
+	if (isset($_GET['password'])) $_GET['password'] = substr($_GET['password'], 2);
48
+	if (isset($_GET['cred'])) $_GET['cred'] = substr($_GET['cred'], 2);
49 49
 }
50 50
 if (!is_numeric($user = $_GET['user']))
51 51
 {
52 52
 	// check if user contains the current domain --> remove it
53
-	list(,$domain) = explode('@',$user);
53
+	list(,$domain) = explode('@', $user);
54 54
 	if ($domain === $GLOBALS['egw_info']['user']['domain'])
55
-	list($user) = explode('@',$user);
56
-	$user = $GLOBALS['egw']->accounts->name2id($user,'account_lid','u');
55
+	list($user) = explode('@', $user);
56
+	$user = $GLOBALS['egw']->accounts->name2id($user, 'account_lid', 'u');
57 57
 }
58 58
 if ($user === false || !($username = $GLOBALS['egw']->accounts->id2name($user)))
59 59
 {
60
-	fail_exit(lang("freebusy: Unknow user '%1', wrong password or not availible to not loged in users !!!"." $username($user)",$_GET['user']));
60
+	fail_exit(lang("freebusy: Unknow user '%1', wrong password or not availible to not loged in users !!!"." $username($user)", $_GET['user']));
61 61
 }
62 62
 if (!$loged_in)
63 63
 {
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
 		if (strpos($authuser, '@') === false)
79 79
 		{
80 80
 			$domain = $GLOBALS['egw_info']['server']['default_domain'];
81
-			$authuser .= '@' . $domain;
81
+			$authuser .= '@'.$domain;
82 82
 		}
83 83
 		else
84 84
 		{
85
-			list(, $domain) = explode('@',$authuser, 2);
85
+			list(, $domain) = explode('@', $authuser, 2);
86 86
 		}
87 87
 		if (array_key_exists($domain, $GLOBALS['egw_domain']))
88 88
 		{
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
 			$GLOBALS['egw_info']['user']['domain'] = $domain;
93 93
 			$GLOBALS['egw_info']['flags']['currentapp'] = 'login';
94 94
 			$GLOBALS['egw_info']['flags']['noapi'] = false;
95
-			require_once(EGW_API_INC . '/functions.inc.php');
96
-			$loged_in =  $GLOBALS['egw']->session->create($authuser, $password, 'text');
95
+			require_once(EGW_API_INC.'/functions.inc.php');
96
+			$loged_in = $GLOBALS['egw']->session->create($authuser, $password, 'text');
97 97
 			session_unset();
98 98
 			session_destroy();
99 99
 		}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 }
110 110
 else
111 111
 {
112
-	Api\Header\Content::type('freebusy.ifb','text/calendar');
112
+	Api\Header\Content::type('freebusy.ifb', 'text/calendar');
113 113
 }
114 114
 $ical = new calendar_ical();
115 115
 echo $ical->freebusy($user, $_GET['end']);
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,15 +44,23 @@
 block discarded – undo
44 44
 if (strpos($_SERVER['QUERY_STRING'],'=3D') !== false && substr($_GET['user'],0,2) == '3D')
45 45
 {
46 46
 	$_GET['user'] = substr($_GET['user'],2);
47
-	if (isset($_GET['password'])) $_GET['password'] = substr($_GET['password'],2);
48
-	if (isset($_GET['cred'])) $_GET['cred'] = substr($_GET['cred'],2);
49
-}
47
+	if (isset($_GET['password']))
48
+	{
49
+		$_GET['password'] = substr($_GET['password'],2);
50
+	}
51
+	if (isset($_GET['cred']))
52
+	{
53
+		$_GET['cred'] = substr($_GET['cred'],2);
54
+	}
55
+	}
50 56
 if (!is_numeric($user = $_GET['user']))
51 57
 {
52 58
 	// check if user contains the current domain --> remove it
53 59
 	list(,$domain) = explode('@',$user);
54 60
 	if ($domain === $GLOBALS['egw_info']['user']['domain'])
55
-	list($user) = explode('@',$user);
61
+	{
62
+		list($user) = explode('@',$user);
63
+	}
56 64
 	$user = $GLOBALS['egw']->accounts->name2id($user,'account_lid','u');
57 65
 }
58 66
 if ($user === false || !($username = $GLOBALS['egw']->accounts->id2name($user)))
Please login to merge, or discard this patch.
calendar/inc/class.calendar_wizard_export_csv.inc.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 		unset($this->export_fields['participants-r']);
25 25
 
26 26
 		$custom = Api\Storage\Customfields::get('calendar', true);
27
-		foreach($custom as $name => $data) {
27
+		foreach ($custom as $name => $data) {
28 28
 			$this->export_fields['#'.$name] = $data['label'];
29 29
 		}
30 30
 	}
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,8 @@  discard block
 block discarded – undo
13 13
 
14 14
 class calendar_wizard_export_csv extends importexport_wizard_basic_export_csv
15 15
 {
16
-	public function __construct() {
16
+	public function __construct()
17
+	{
17 18
 		parent::__construct();
18 19
 		// Field mapping
19 20
 		$bo = new calendar_tracking();
@@ -24,7 +25,8 @@  discard block
 block discarded – undo
24 25
 		unset($this->export_fields['participants-r']);
25 26
 
26 27
 		$custom = Api\Storage\Customfields::get('calendar', true);
27
-		foreach($custom as $name => $data) {
28
+		foreach($custom as $name => $data)
29
+		{
28 30
 			$this->export_fields['#'.$name] = $data['label'];
29 31
 		}
30 32
 	}
Please login to merge, or discard this patch.