@@ -20,7 +20,7 @@ |
||
20 | 20 | 'name' => 'Ralf Becker', |
21 | 21 | 'email' => '[email protected]' |
22 | 22 | ); |
23 | -$setup_info['filemanager']['license'] = 'GPL'; |
|
23 | +$setup_info['filemanager']['license'] = 'GPL'; |
|
24 | 24 | |
25 | 25 | /* The hooks this app includes, needed for hooks registration */ |
26 | 26 | $setup_info['filemanager']['hooks']['settings'] = 'filemanager_hooks::settings'; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $readonlys = null; |
90 | 90 | $total = Sharing::so()->get_rows($query, $rows, $readonlys); |
91 | 91 | |
92 | - foreach($rows as &$row) |
|
92 | + foreach ($rows as &$row) |
|
93 | 93 | { |
94 | 94 | if (substr($row['share_path'], 0, strlen(self::$tmp_dir)) === self::$tmp_dir) |
95 | 95 | { |
@@ -130,21 +130,21 @@ discard block |
||
130 | 130 | * @param array $content=null |
131 | 131 | * @param string $msg='' |
132 | 132 | */ |
133 | - public function index(array $content=null) |
|
133 | + public function index(array $content = null) |
|
134 | 134 | { |
135 | 135 | if (!is_array($content)) |
136 | 136 | { |
137 | 137 | $content = array( |
138 | 138 | 'nm' => array( |
139 | - 'get_rows' => 'filemanager.filemanager_shares.get_rows', // I method/callback to request the data for the rows eg. 'notes.bo.get_rows' |
|
140 | - 'no_filter' => True, // current dir only |
|
141 | - 'no_filter2' => True, // I disable the 2. filter (params are the same as for filter) |
|
142 | - 'no_cat' => True, // I disable the cat-selectbox |
|
143 | - 'lettersearch' => false, // I show a lettersearch |
|
144 | - 'searchletter' => false, // I0 active letter of the lettersearch or false for [all] |
|
145 | - 'start' => 0, // IO position in list |
|
146 | - 'order' => 'share_created', // IO name of the column to sort after (optional for the sortheaders) |
|
147 | - 'sort' => 'DESC', // IO direction of the sort: 'ASC' or 'DESC' |
|
139 | + 'get_rows' => 'filemanager.filemanager_shares.get_rows', // I method/callback to request the data for the rows eg. 'notes.bo.get_rows' |
|
140 | + 'no_filter' => True, // current dir only |
|
141 | + 'no_filter2' => True, // I disable the 2. filter (params are the same as for filter) |
|
142 | + 'no_cat' => True, // I disable the cat-selectbox |
|
143 | + 'lettersearch' => false, // I show a lettersearch |
|
144 | + 'searchletter' => false, // I0 active letter of the lettersearch or false for [all] |
|
145 | + 'start' => 0, // IO position in list |
|
146 | + 'order' => 'share_created', // IO name of the column to sort after (optional for the sortheaders) |
|
147 | + 'sort' => 'DESC', // IO direction of the sort: 'ASC' or 'DESC' |
|
148 | 148 | //'default_cols' => '!', // I columns to use if there's no user or default pref (! as first char uses all but the named columns), default all columns |
149 | 149 | 'csv_fields' => false, // I false=disable csv export, true or unset=enable it with auto-detected fieldnames, |
150 | 150 | //or array with name=>label or name=>array('label'=>label,'type'=>type) pairs (type is a eT widget-type) |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | elseif ($content['nm']['action']) |
158 | 158 | { |
159 | - switch($content['nm']['action']) |
|
159 | + switch ($content['nm']['action']) |
|
160 | 160 | { |
161 | 161 | case 'delete': |
162 | 162 | $where = array('share_owner' => $GLOBALS['egw_info']['user']['account_id']); |
@@ -15,7 +15,7 @@ |
||
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'] = |
@@ -24,7 +24,7 @@ discard block |
||
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 |
||
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 |
||
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', |
@@ -24,7 +24,7 @@ |
||
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 | } |
@@ -29,24 +29,24 @@ |
||
29 | 29 | * @param string $cname |
30 | 30 | * @param array $expand values for keys 'c', 'row', 'c_', 'row_', 'cont' |
31 | 31 | */ |
32 | - public function beforeSendToClient($cname, array $expand=null) |
|
32 | + public function beforeSendToClient($cname, array $expand = null) |
|
33 | 33 | { |
34 | 34 | $form_name = self::form_name($cname, $this->id, $expand); |
35 | - $value =& self::get_array(self::$request->content, $form_name, true); |
|
36 | - if(!is_array($value)) $value = array(); |
|
35 | + $value = & self::get_array(self::$request->content, $form_name, true); |
|
36 | + if (!is_array($value)) $value = array(); |
|
37 | 37 | |
38 | - foreach($value as &$events) |
|
38 | + foreach ($value as &$events) |
|
39 | 39 | { |
40 | - if(!is_array($events)) |
|
40 | + if (!is_array($events)) |
|
41 | 41 | { |
42 | 42 | continue; |
43 | 43 | } |
44 | - foreach($events as &$event) |
|
44 | + foreach ($events as &$event) |
|
45 | 45 | { |
46 | - if(!is_array($event)) continue; |
|
47 | - foreach(array('start','end') as $date) |
|
46 | + if (!is_array($event)) continue; |
|
47 | + foreach (array('start', 'end') as $date) |
|
48 | 48 | { |
49 | - $event[$date] = Api\DateTime::to($event[$date],'Y-m-d\TH:i:s\Z'); |
|
49 | + $event[$date] = Api\DateTime::to($event[$date], 'Y-m-d\TH:i:s\Z'); |
|
50 | 50 | } |
51 | 51 | } |
52 | 52 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | use EGroupware\Api\Asyncservice; |
16 | 16 | |
17 | 17 | if (!isset($_REQUEST['domain'])) $_REQUEST['domain'] = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : 'default'; |
18 | -$path_to_egroupware = realpath(__DIR__.'/..'); // need to be adapted if this script is moved somewhere else |
|
18 | +$path_to_egroupware = realpath(__DIR__.'/..'); // need to be adapted if this script is moved somewhere else |
|
19 | 19 | |
20 | 20 | // remove the comment from one of the following lines to enable loging |
21 | 21 | // define('ASYNC_LOG','C:\\async.log'); // Windows |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | if (defined('ASYNC_LOG')) |
26 | 26 | { |
27 | 27 | $msg = date('Y/m/d H:i:s ').$_REQUEST['domain'].": asyncservice started\n"; |
28 | - $f = fopen(ASYNC_LOG,'a+'); |
|
29 | - fwrite($f,$msg); |
|
28 | + $f = fopen(ASYNC_LOG, 'a+'); |
|
29 | + fwrite($f, $msg); |
|
30 | 30 | fclose($f); |
31 | 31 | } |
32 | 32 | $GLOBALS['egw_info']['flags'] = array( |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | } |
44 | 44 | if (defined('ASYNC_LOG')) |
45 | 45 | { |
46 | - $f = fopen(ASYNC_LOG,'a+'); |
|
47 | - fwrite($f,$msg); |
|
46 | + $f = fopen(ASYNC_LOG, 'a+'); |
|
47 | + fwrite($f, $msg); |
|
48 | 48 | fclose($f); |
49 | 49 | } |
50 | 50 | die($msg); |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | } |
64 | 64 | if (defined('ASYNC_LOG')) |
65 | 65 | { |
66 | - $f = fopen(ASYNC_LOG,'a+'); |
|
67 | - fwrite($f,$msg); |
|
66 | + $f = fopen(ASYNC_LOG, 'a+'); |
|
67 | + fwrite($f, $msg); |
|
68 | 68 | fclose($f); |
69 | 69 | } |
70 | 70 | die($msg); |
@@ -75,8 +75,7 @@ discard block |
||
75 | 75 | $async = new Asyncservice(); |
76 | 76 | $num = $async->check_run(isset($_REQUEST['run_by']) ? $_REQUEST['run_by'] : 'crontab'); |
77 | 77 | |
78 | -$msg = date('Y/m/d H:i:s ').$_REQUEST['domain'].': '.($num === false ? 'An error occured: can not obtain semaphore!' : |
|
79 | - ($num ? "$num job(s) executed" : 'Nothing to execute'))."\n\n"; |
|
78 | +$msg = date('Y/m/d H:i:s ').$_REQUEST['domain'].': '.($num === false ? 'An error occured: can not obtain semaphore!' : ($num ? "$num job(s) executed" : 'Nothing to execute'))."\n\n"; |
|
80 | 79 | |
81 | 80 | if (isset($_SERVER['HTTP_HOST'])) |
82 | 81 | { |
@@ -87,7 +86,7 @@ discard block |
||
87 | 86 | |
88 | 87 | if (defined('ASYNC_LOG')) |
89 | 88 | { |
90 | - $f = fopen(ASYNC_LOG,'a+'); |
|
91 | - fwrite($f,$msg); |
|
89 | + $f = fopen(ASYNC_LOG, 'a+'); |
|
90 | + fwrite($f, $msg); |
|
92 | 91 | fclose($f); |
93 | 92 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * - function-name like set_var to get eg. all assignments or |
33 | 33 | * - handle- / variable-names - if you are only interested in some variables ;-) |
34 | 34 | */ |
35 | - var $debug = False; // array('cat_list','cat_list_t'); |
|
35 | + var $debug = False; // array('cat_list','cat_list_t'); |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * $file[handle] = 'filename'; |
@@ -128,9 +128,9 @@ discard block |
||
128 | 128 | */ |
129 | 129 | function set_file($handle, $filename = '') |
130 | 130 | { |
131 | - if ($this->debug && $this->check_debug('set_file',$handle,$filename)) |
|
131 | + if ($this->debug && $this->check_debug('set_file', $handle, $filename)) |
|
132 | 132 | { |
133 | - echo "<p>Template::set_file('".print_r($handle,true)."','$filename')</p>\n"; |
|
133 | + echo "<p>Template::set_file('".print_r($handle, true)."','$filename')</p>\n"; |
|
134 | 134 | } |
135 | 135 | if (!is_array($handle)) |
136 | 136 | { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | else |
145 | 145 | { |
146 | - foreach($handle as $h => $f) |
|
146 | + foreach ($handle as $h => $f) |
|
147 | 147 | { |
148 | 148 | $this->file[$h] = $this->filename($f); |
149 | 149 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | */ |
161 | 161 | function set_block($parent, $handle, $name = '') |
162 | 162 | { |
163 | - if ($this->debug && $this->check_debug('set_block',$parent,$handle,$name)) |
|
163 | + if ($this->debug && $this->check_debug('set_block', $parent, $handle, $name)) |
|
164 | 164 | { |
165 | 165 | echo "<p>Template::set_block('$parent','$handle','$name')</p>\n"; |
166 | 166 | } |
@@ -177,14 +177,14 @@ discard block |
||
177 | 177 | $qhandle = preg_quote($handle); |
178 | 178 | $reg = "/<!--\\s+BEGIN $qhandle\\s+-->(.*)\n\\s*<!--\\s+END $qhandle\\s+-->/s"; |
179 | 179 | $match = null; |
180 | - if (!preg_match($reg,$str,$match)) |
|
180 | + if (!preg_match($reg, $str, $match)) |
|
181 | 181 | { |
182 | 182 | // unfortunaly some apps set non-existing blocks, therefor I have to disable this diagnostics again for now |
183 | 183 | $this->halt("set_block: unable to find block '$handle' in '$parent'=<pre>".htmlspecialchars($str)."</pre> this->root=$this->root"); |
184 | 184 | // return False; |
185 | 185 | } |
186 | - $this->set_var($handle,$match[1]); |
|
187 | - $this->set_var($parent,preg_replace($reg, '{' . "$name}",$str)); |
|
186 | + $this->set_var($handle, $match[1]); |
|
187 | + $this->set_var($parent, preg_replace($reg, '{'."$name}", $str)); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | /* public: set_var(array $values) |
@@ -205,18 +205,18 @@ discard block |
||
205 | 205 | $varname => $value |
206 | 206 | ); |
207 | 207 | } |
208 | - foreach($varname as $k => $v) |
|
208 | + foreach ($varname as $k => $v) |
|
209 | 209 | { |
210 | 210 | if (!empty($k)) |
211 | 211 | { |
212 | - if ($this->debug && $this->check_debug('set_var',$k)) |
|
212 | + if ($this->debug && $this->check_debug('set_var', $k)) |
|
213 | 213 | { |
214 | 214 | echo "<p>Template::set_var('$k','$v')</p>\n"; |
215 | 215 | } |
216 | 216 | $this->varkeys[$k] = $this->varname($k); |
217 | 217 | $this->varvals[$k] = $this->egroupware_hack ? str_replace( |
218 | - array('phpGroupWare','www.phpgroupware.org'), |
|
219 | - array('eGroupWare','www.eGroupWare.org'),$v |
|
218 | + array('phpGroupWare', 'www.phpgroupware.org'), |
|
219 | + array('eGroupWare', 'www.eGroupWare.org'), $v |
|
220 | 220 | ) : $v; |
221 | 221 | } |
222 | 222 | } |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | */ |
231 | 231 | function subst($handle) |
232 | 232 | { |
233 | - if ($this->debug && $this->check_debug('subst',$handle)) |
|
233 | + if ($this->debug && $this->check_debug('subst', $handle)) |
|
234 | 234 | { |
235 | 235 | echo "<p>Template::subst('$handle')</p>\n"; |
236 | 236 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | $str = $this->get_var($handle); |
244 | - foreach($this->varkeys as $k => $v) |
|
244 | + foreach ($this->varkeys as $k => $v) |
|
245 | 245 | { |
246 | 246 | $str = str_replace($v, $this->varvals[$k], $str); |
247 | 247 | } |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | $str = $this->subst($handle); |
277 | 277 | if ($append) |
278 | 278 | { |
279 | - $this->set_var($target, $this->get_var($target) . $str); |
|
279 | + $this->set_var($target, $this->get_var($target).$str); |
|
280 | 280 | } |
281 | 281 | else |
282 | 282 | { |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | } |
286 | 286 | else |
287 | 287 | { |
288 | - foreach($handle as $h) |
|
288 | + foreach ($handle as $h) |
|
289 | 289 | { |
290 | 290 | $str = $this->subst($h); |
291 | 291 | $this->set_var($target, $str); |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | */ |
333 | 333 | function get_vars() |
334 | 334 | { |
335 | - foreach(array_keys($this->varkeys) as $k) |
|
335 | + foreach (array_keys($this->varkeys) as $k) |
|
336 | 336 | { |
337 | 337 | $result[$k] = $this->varvals[$k]; |
338 | 338 | } |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | } |
354 | 354 | else |
355 | 355 | { |
356 | - foreach(array_keys($varname) as $k) |
|
356 | + foreach (array_keys($varname) as $k) |
|
357 | 357 | { |
358 | 358 | $result[$k] = $this->varvals[$k]; |
359 | 359 | } |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | { |
383 | 383 | return false; |
384 | 384 | } |
385 | - foreach($m as $v) |
|
385 | + foreach ($m as $v) |
|
386 | 386 | { |
387 | 387 | if (!isset($this->varkeys[$v])) |
388 | 388 | { |
@@ -448,15 +448,15 @@ discard block |
||
448 | 448 | * @param string $root ='' default $this->root |
449 | 449 | * @param int $time =1 |
450 | 450 | */ |
451 | - protected function filename($filename,$root='',$time=1) |
|
451 | + protected function filename($filename, $root = '', $time = 1) |
|
452 | 452 | { |
453 | - if($root == '') |
|
453 | + if ($root == '') |
|
454 | 454 | { |
455 | 455 | $root = $this->root; |
456 | 456 | } |
457 | - if(substr($filename, 0, 1) != '/') |
|
457 | + if (substr($filename, 0, 1) != '/') |
|
458 | 458 | { |
459 | - $new_filename = $root . '/' . $filename; |
|
459 | + $new_filename = $root.'/'.$filename; |
|
460 | 460 | } |
461 | 461 | else |
462 | 462 | { |
@@ -465,14 +465,14 @@ discard block |
||
465 | 465 | |
466 | 466 | if (!file_exists($new_filename)) |
467 | 467 | { |
468 | - if($time==2) |
|
468 | + if ($time == 2) |
|
469 | 469 | { |
470 | 470 | $this->halt("filename: file $new_filename does not exist."); |
471 | 471 | } |
472 | 472 | else |
473 | 473 | { |
474 | - $new_root = dirname($root) . DIRECTORY_SEPARATOR . 'default'; |
|
475 | - $new_filename = $this->filename(str_replace($root.'/','',$new_filename),$new_root,2); |
|
474 | + $new_root = dirname($root).DIRECTORY_SEPARATOR.'default'; |
|
475 | + $new_filename = $this->filename(str_replace($root.'/', '', $new_filename), $new_root, 2); |
|
476 | 476 | } |
477 | 477 | } |
478 | 478 | return $new_filename; |
@@ -491,9 +491,9 @@ discard block |
||
491 | 491 | */ |
492 | 492 | function loadfile($handle) |
493 | 493 | { |
494 | - if ($this->debug && $this->check_debug('loadfile',$handle)) |
|
494 | + if ($this->debug && $this->check_debug('loadfile', $handle)) |
|
495 | 495 | { |
496 | - echo "<p>Template::loadfile('$handle') file=<pre>\n".print_r($this->file,True)."</pre>\n"; |
|
496 | + echo "<p>Template::loadfile('$handle') file=<pre>\n".print_r($this->file, True)."</pre>\n"; |
|
497 | 497 | echo "<p>backtrace: ".function_backtrace()."</p>\n"; |
498 | 498 | } |
499 | 499 | if (isset($this->varkeys[$handle]) && !empty($this->varvals[$handle])) |
@@ -502,9 +502,9 @@ discard block |
||
502 | 502 | } |
503 | 503 | if (!isset($this->file[$handle])) |
504 | 504 | { |
505 | - if ($this->debug && $this->check_debug('loadfile',$handle)) |
|
505 | + if ($this->debug && $this->check_debug('loadfile', $handle)) |
|
506 | 506 | { |
507 | - echo "varkeys =<pre>".print_r($this->varkeys,True)."</pre>varvals =<pre>".print_r($this->varvals,True)."</pre>\n"; |
|
507 | + echo "varkeys =<pre>".print_r($this->varkeys, True)."</pre>varvals =<pre>".print_r($this->varvals, True)."</pre>\n"; |
|
508 | 508 | } |
509 | 509 | $this->halt("loadfile: $handle is not a valid handle."); |
510 | 510 | return false; |
@@ -549,10 +549,10 @@ discard block |
||
549 | 549 | { |
550 | 550 | if (!$this->debug) return False; |
551 | 551 | |
552 | - foreach(func_get_args() as $arg) |
|
552 | + foreach (func_get_args() as $arg) |
|
553 | 553 | { |
554 | 554 | if (!is_array($this->debug) && $this->debug === $arg || |
555 | - (is_array($this->debug) && (@$this->debug[$arg] || in_array($arg,$this->debug,True)))) |
|
555 | + (is_array($this->debug) && (@$this->debug[$arg] || in_array($arg, $this->debug, True)))) |
|
556 | 556 | { |
557 | 557 | return True; |
558 | 558 | } |
@@ -601,8 +601,8 @@ discard block |
||
601 | 601 | { |
602 | 602 | $GLOBALS['egw_info']['server']['template_set'] = 'idots'; |
603 | 603 | } |
604 | - $tpldir = EGW_SERVER_ROOT . '/' . $appname . '/templates/' . $GLOBALS['egw_info']['server']['template_set']; |
|
605 | - $tpldir_default = EGW_SERVER_ROOT . '/' . $appname . '/templates/default'; |
|
604 | + $tpldir = EGW_SERVER_ROOT.'/'.$appname.'/templates/'.$GLOBALS['egw_info']['server']['template_set']; |
|
605 | + $tpldir_default = EGW_SERVER_ROOT.'/'.$appname.'/templates/default'; |
|
606 | 606 | |
607 | 607 | if (@is_dir($tpldir)) |
608 | 608 | { |
@@ -54,12 +54,12 @@ discard block |
||
54 | 54 | * @param string $with =null |
55 | 55 | * @param string $msg_type =null 'error', 'warning' or 'success' (default) |
56 | 56 | */ |
57 | - public static function refresh_opener($msg, $app, $id=null, $type=null, $targetapp=null, $replace=null, $with=null, $msg_type=null) |
|
57 | + public static function refresh_opener($msg, $app, $id = null, $type = null, $targetapp = null, $replace = null, $with = null, $msg_type = null) |
|
58 | 58 | { |
59 | 59 | //error_log(__METHOD__.'('.array2string(func_get_args()).')'); |
60 | 60 | self::$extra['refresh-opener'] = func_get_args(); |
61 | 61 | |
62 | - unset($msg, $app, $id, $type, $targetapp, $replace, $with, $msg_type); // used only via func_get_args(); |
|
62 | + unset($msg, $app, $id, $type, $targetapp, $replace, $with, $msg_type); // used only via func_get_args(); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -70,11 +70,11 @@ discard block |
||
70 | 70 | * @param string $msg message to show |
71 | 71 | * @param string $type ='success' 'error', 'warning' or 'success' (default) |
72 | 72 | */ |
73 | - public static function message($msg, $type='success') |
|
73 | + public static function message($msg, $type = 'success') |
|
74 | 74 | { |
75 | 75 | self::$extra['message'] = func_get_args(); |
76 | 76 | |
77 | - unset($msg, $type); // used only via func_get_args(); |
|
77 | + unset($msg, $type); // used only via func_get_args(); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -84,12 +84,12 @@ discard block |
||
84 | 84 | * @param string $target |
85 | 85 | * @param string $popup |
86 | 86 | */ |
87 | - public static function popup($link, $target='_blank', $popup='640x480') |
|
87 | + public static function popup($link, $target = '_blank', $popup = '640x480') |
|
88 | 88 | { |
89 | 89 | // default params are not returned by func_get_args! |
90 | - $args = func_get_args()+array(null, '_blank', '640x480'); |
|
90 | + $args = func_get_args() + array(null, '_blank', '640x480'); |
|
91 | 91 | |
92 | - unset($link, $target, $popup); // used only via func_get_args() |
|
92 | + unset($link, $target, $popup); // used only via func_get_args() |
|
93 | 93 | |
94 | 94 | if (Json\Request::isJSONRequest()) |
95 | 95 | { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * |
107 | 107 | * @param string $alert_msg ='' optional message to display as alert, before closing the window |
108 | 108 | */ |
109 | - public static function window_close($alert_msg='') |
|
109 | + public static function window_close($alert_msg = '') |
|
110 | 110 | { |
111 | 111 | //error_log(__METHOD__."()"); |
112 | 112 | self::$extra['window-close'] = $alert_msg ? $alert_msg : true; |
@@ -163,12 +163,12 @@ discard block |
||
163 | 163 | public static function get_extra() |
164 | 164 | { |
165 | 165 | // adding links of refreshed entry, to give others apps more information about necessity to refresh |
166 | - if (isset(self::$extra['refresh-opener']) && count(self::$extra['refresh-opener']) <= 8 && // do not run twice |
|
166 | + if (isset(self::$extra['refresh-opener']) && count(self::$extra['refresh-opener']) <= 8 && // do not run twice |
|
167 | 167 | !empty(self::$extra['refresh-opener'][1]) && !empty(self::$extra['refresh-opener'][2])) // app/id given |
168 | 168 | { |
169 | 169 | $links = Link::get_links(self::$extra['refresh-opener'][1], self::$extra['refresh-opener'][2]); |
170 | 170 | $apps = array(); |
171 | - foreach($links as $link) |
|
171 | + foreach ($links as $link) |
|
172 | 172 | { |
173 | 173 | $apps[$link['app']][] = $link['id']; |
174 | 174 | } |