Completed
Push — 16.1 ( 895f95...82e441 )
by Nathan
27:10 queued 13:25
created
infolog/inc/class.infolog_hooks.inc.php 2 patches
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	static function not_enum_group_acls($location)
31 31
 	{
32
-		unset($location);	// not used, but part of hook signature
32
+		unset($location); // not used, but part of hook signature
33 33
 		$config = Api\Config::read('infolog');
34 34
 
35 35
 		return $config['group_owners'];
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	static function search_link($location)
45 45
 	{
46
-		unset($location);	// not used, but part of hook signature
46
+		unset($location); // not used, but part of hook signature
47 47
 
48 48
 		return array(
49 49
 			'query'      => 'infolog.infolog_bo.link_query',
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 			'add_id'     => 'action_id',
67 67
 			'add_popup'  => '760x570',
68 68
 			'file_access'=> 'infolog.infolog_bo.file_access',
69
-			'file_access_user' => true,	// file_access supports 4th parameter $user
69
+			'file_access_user' => true, // file_access supports 4th parameter $user
70 70
 			'edit'       => array(
71 71
 				'menuaction' => 'infolog.infolog_ui.edit',
72 72
 			),
@@ -93,46 +93,46 @@  discard block
 block discarded – undo
93 93
 			display_sidebox($appname, lang('Favorites'), Framework\Favorites::list_favorites($appname));
94 94
 
95 95
 			$file = array(
96
-				'infolog list' => Egw::link('/index.php',array(
96
+				'infolog list' => Egw::link('/index.php', array(
97 97
 					'menuaction' => 'infolog.infolog_ui.index',
98 98
 					'ajax' => 'true')),
99 99
 				array(
100
-					'text' => lang('Add %1',lang(Link::get_registry($appname, 'entry'))),
100
+					'text' => lang('Add %1', lang(Link::get_registry($appname, 'entry'))),
101 101
 					'no_lang' => true,
102 102
 					'link' => "javascript:app.infolog.add_link_sidemenu();"
103 103
 				),
104
-				'Placeholders' => Egw::link('/index.php','menuaction=infolog.infolog_merge.show_replacements')
104
+				'Placeholders' => Egw::link('/index.php', 'menuaction=infolog.infolog_merge.show_replacements')
105 105
 			);
106
-			display_sidebox($appname,$GLOBALS['egw_info']['apps']['infolog']['title'].' '.lang('Menu'),$file);
106
+			display_sidebox($appname, $GLOBALS['egw_info']['apps']['infolog']['title'].' '.lang('Menu'), $file);
107 107
 		}
108 108
 
109 109
 		if ($GLOBALS['egw_info']['user']['apps']['admin'] && !Api\Header\UserAgent::mobile())
110 110
 		{
111 111
 			$file = Array(
112
-				'Site configuration' => Egw::link('/index.php',array(
112
+				'Site configuration' => Egw::link('/index.php', array(
113 113
 					'menuaction' => 'infolog.infolog_ui.admin',
114 114
 					// As long as CKEditor needs CSP exceptions, this needs to
115 115
 					// load in an iframe
116 116
 					//'ajax' => 'true',
117 117
 				)),
118
-				'Global Categories'  => Egw::link('/index.php',array(
118
+				'Global Categories'  => Egw::link('/index.php', array(
119 119
 					'menuaction' => 'admin.admin_categories.index',
120 120
 					'appname'    => $appname,
121 121
 					'global_cats'=> True,
122 122
 					'ajax' => 'true',
123 123
 				)),
124
-				'Custom fields, type and status' => Egw::link('/index.php',array(
124
+				'Custom fields, type and status' => Egw::link('/index.php', array(
125 125
 					'menuaction' => 'infolog.infolog_customfields.index',
126 126
 					'ajax' => 'true',
127 127
 				)),
128 128
 			);
129 129
 			if ($location == 'admin')
130 130
 			{
131
-				display_section($appname,$file);
131
+				display_section($appname, $file);
132 132
 			}
133 133
 			else
134 134
 			{
135
-				display_sidebox($appname,lang('Admin'),$file);
135
+				display_sidebox($appname, lang('Admin'), $file);
136 136
 			}
137 137
 		}
138 138
 	}
@@ -145,19 +145,19 @@  discard block
 block discarded – undo
145 145
 	static function settings()
146 146
 	{
147 147
 		/* Setup some values to fill the array of this app's settings below */
148
-		$info = new infolog_bo();	// need some labels from
148
+		$info = new infolog_bo(); // need some labels from
149 149
 		$filters = $show_home = array();
150 150
 		$show_home[] = lang("DON'T show InfoLog");
151 151
 		$filters['none'] = $info->filters[''];
152
-		foreach($info->filters as $key => $label)
152
+		foreach ($info->filters as $key => $label)
153 153
 		{
154 154
 			$show_home[$key] = $filters[$key] = lang($label);
155 155
 		}
156 156
 
157 157
 		// migrage old filter-pref 1,2 to the filter one 'own-open-today'
158
-		if (isset($GLOBALS['type']) && in_array($GLOBALS['egw']->preferences->{$GLOBALS['type']}['homeShowEvents'],array('1','2')))
158
+		if (isset($GLOBALS['type']) && in_array($GLOBALS['egw']->preferences->{$GLOBALS['type']}['homeShowEvents'], array('1', '2')))
159 159
 		{
160
-			$GLOBALS['egw']->preferences->add('infolog','homeShowEvents','own-open-today',$GLOBALS['type']);
160
+			$GLOBALS['egw']->preferences->add('infolog', 'homeShowEvents', 'own-open-today', $GLOBALS['type']);
161 161
 			$GLOBALS['egw']->preferences->save_repository();
162 162
 		}
163 163
 		$show_links = array(
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 				'help'   => 'Should the Infolog list show a unique numerical Id, which can be used eg. as ticket Id.',
235 235
 				'xmlrpc' => True,
236 236
 				'admin'  => False,
237
-				'default'=> '1',	// Yes
237
+				'default'=> '1', // Yes
238 238
 			),
239 239
 			'listNoSubs' => array(
240 240
 				'type'   => 'select',
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 				'help'   => 'Should InfoLog show Subtasks, -calls or -notes in the normal view or not. You can always view the Subs via there parent.',
249 249
 				'xmlrpc' => True,
250 250
 				'admin'  => False,
251
-				'default'=> '0',	// Allways show them
251
+				'default'=> '0', // Allways show them
252 252
 			),
253 253
 			'show_links' => array(
254 254
 				'type'   => 'select',
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 				'help'   => 'Should the Infolog list show the percent done only for status ongoing or two separate icons.',
269 269
 				'xmlrpc' => True,
270 270
 				'admin'  => False,
271
-				'default'=> 1,	// Yes
271
+				'default'=> 1, // Yes
272 272
 			),
273 273
 			'limit_des_lines' => array(
274 274
 				'type'   => 'input',
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 			'help'   => 'Do you want a notification, if items you created get updated?',
298 298
 			'xmlrpc' => True,
299 299
 			'admin'  => False,
300
-			'default'=> '1',	// Yes
300
+			'default'=> '1', // Yes
301 301
 		);
302 302
 		$settings['notify_assigned'] = array(
303 303
 			'type'   => 'select',
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 			),
312 312
 			'xmlrpc' => True,
313 313
 			'admin'  => False,
314
-			'default'=> '1',	// Yes
314
+			'default'=> '1', // Yes
315 315
 		);
316 316
 
317 317
 		// to add options for more then 3 days back or in advance, you need to update soinfolog::users_with_open_entries()!
@@ -320,8 +320,8 @@  discard block
 block discarded – undo
320 320
 			'-1d' => lang('one day after'),
321 321
 			'0d'  => lang('same day'),
322 322
 			'1d'  => lang('one day in advance'),
323
-			'2d'  => lang('%1 days in advance',2),
324
-			'3d'  => lang('%1 days in advance',3),
323
+			'2d'  => lang('%1 days in advance', 2),
324
+			'3d'  => lang('%1 days in advance', 3),
325 325
 		);
326 326
 		$settings['notify_due_delegated'] = array(
327 327
 			'type'   => 'select',
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 			'values' => $options,
332 332
 			'xmlrpc' => True,
333 333
 			'admin'  => False,
334
-			'default'=> '0',	// No
334
+			'default'=> '0', // No
335 335
 		);
336 336
 		$settings['notify_due_responsible'] = array(
337 337
 			'type'   => 'select',
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 			'values' => $options,
342 342
 			'xmlrpc' => True,
343 343
 			'admin'  => False,
344
-			'default'=> '0d',	// Same day
344
+			'default'=> '0d', // Same day
345 345
 		);
346 346
 		$settings['notify_start_delegated'] = array(
347 347
 			'type'   => 'select',
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 			'values' => $options,
352 352
 			'xmlrpc' => True,
353 353
 			'admin'  => False,
354
-			'default'=> '0',	// No
354
+			'default'=> '0', // No
355 355
 		);
356 356
 		$settings['notify_start_responsible'] = array(
357 357
 			'type'   => 'select',
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 			'values' => $options,
362 362
 			'xmlrpc' => True,
363 363
 			'admin'  => False,
364
-			'default'=> '0d',	// Same day
364
+			'default'=> '0d', // Same day
365 365
 		);
366 366
 
367 367
 		// receive notification for items owned by groups you are part of
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
 			'help'   => 'Do you want a notification if items owned by groups you are part of get updated ?',
373 373
 			'xmlrpc' => True,
374 374
 			'admin'  => False,
375
-			'default'=> '0',	// No
375
+			'default'=> '0', // No
376 376
 		);
377 377
 
378 378
 		$settings[] = array(
@@ -391,8 +391,8 @@  discard block
 block discarded – undo
391 391
 				'size'   => 60,
392 392
 				'label'  => 'Default document to insert entries',
393 393
 				'name'   => 'default_document',
394
-				'help'   => lang('If you specify a document (full vfs path) here, %1 displays an extra document icon for each entry. That icon allows to download the specified document with the data inserted.',lang('infolog')).' '.
395
-					lang('The document can contain placeholder like {{%1}}, to be replaced with the data.','info_subject').' '.
394
+				'help'   => lang('If you specify a document (full vfs path) here, %1 displays an extra document icon for each entry. That icon allows to download the specified document with the data inserted.', lang('infolog')).' '.
395
+					lang('The document can contain placeholder like {{%1}}, to be replaced with the data.', 'info_subject').' '.
396 396
 					lang('The following document-types are supported:').'*.rtf, *.txt',
397 397
 				'run_lang' => false,
398 398
 				'xmlrpc' => True,
@@ -403,8 +403,8 @@  discard block
 block discarded – undo
403 403
 				'size'   => 60,
404 404
 				'label'  => 'Directory with documents to insert entries',
405 405
 				'name'   => 'document_dir',
406
-				'help'   => lang('If you specify a directory (full vfs path) here, %1 displays an action for each document. That action allows to download the specified document with the data inserted.',lang('infolog')).' '.
407
-					lang('The document can contain placeholder like {{%1}}, to be replaced with the data.','info_subject').' '.
406
+				'help'   => lang('If you specify a directory (full vfs path) here, %1 displays an action for each document. That action allows to download the specified document with the data inserted.', lang('infolog')).' '.
407
+					lang('The document can contain placeholder like {{%1}}, to be replaced with the data.', 'info_subject').' '.
408 408
 					lang('The following document-types are supported:').'*.rtf, *.txt',
409 409
 				'run_lang' => false,
410 410
 				'xmlrpc' => True,
@@ -493,12 +493,12 @@  discard block
 block discarded – undo
493 493
 	 */
494 494
 	private static function all_cats()
495 495
 	{
496
-		$categories = new Api\Categories('','infolog');
496
+		$categories = new Api\Categories('', 'infolog');
497 497
 		$accountId = $GLOBALS['egw_info']['user']['account_id'];
498 498
 
499
-		foreach((array)$categories->return_sorted_array(0,False,'','','',true) as $cat)
499
+		foreach ((array)$categories->return_sorted_array(0, False, '', '', '', true) as $cat)
500 500
 		{
501
-			$s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']);
501
+			$s = str_repeat(' ', $cat['level']).stripslashes($cat['name']);
502 502
 
503 503
 			if ($cat['app_name'] == 'phpgw' || $cat['owner'] == '-1')
504 504
 			{
@@ -506,13 +506,13 @@  discard block
 block discarded – undo
506 506
 			}
507 507
 			elseif ($cat['owner'] != $accountId)
508 508
 			{
509
-				$s .= '<' . $GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname') . '>';
509
+				$s .= '<'.$GLOBALS['egw']->accounts->id2name($cat['owner'], 'account_fullname').'>';
510 510
 			}
511 511
 			elseif ($cat['access'] == 'private')
512 512
 			{
513 513
 				$s .= ' ♥';
514 514
 			}
515
-			$sel_options[$cat['id']] = $s;	// 0.9.14 only
515
+			$sel_options[$cat['id']] = $s; // 0.9.14 only
516 516
 		}
517 517
 		return $sel_options;
518 518
 	}
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 
534 534
 			if (!$async->read('infolog-async-notification'))
535 535
 			{
536
-				$async->set_timer(array('hour' => 2),'infolog-async-notification','infolog.infolog_bo.async_notification',null);
536
+				$async->set_timer(array('hour' => 2), 'infolog-async-notification', 'infolog.infolog_bo.async_notification', null);
537 537
 			}
538 538
 		}
539 539
 	}
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 	 */
547 547
 	public static function acl_rights($params)
548 548
 	{
549
-		unset($params);	// not used, but default function signature for hooks
549
+		unset($params); // not used, but default function signature for hooks
550 550
 		return array(
551 551
 			Acl::READ    => 'read',
552 552
 			Acl::ADD     => 'add',
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 	 */
565 565
 	public static function categories($location)
566 566
 	{
567
-		unset($location);	// not used, but part of hook signature
567
+		unset($location); // not used, but part of hook signature
568 568
 		return true;
569 569
 	}
570 570
 
@@ -575,9 +575,9 @@  discard block
 block discarded – undo
575 575
 	 */
576 576
 	public static function mail_import($args)
577 577
 	{
578
-		unset($args);	// not used, but required by function signature
578
+		unset($args); // not used, but required by function signature
579 579
 
580
-		return array (
580
+		return array(
581 581
 			'menuaction' => 'infolog.infolog_ui.mail_import',
582 582
 			'popup' => Link::get_registry('infolog', 'edit_popup')
583 583
 		);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
 
109 109
 		if ($GLOBALS['egw_info']['user']['apps']['admin'] && !Api\Header\UserAgent::mobile())
110 110
 		{
111
-			$file = Array(
111
+			$file = array(
112 112
 				'Site configuration' => Egw::link('/index.php',array(
113 113
 					'menuaction' => 'infolog.infolog_ui.admin',
114 114
 					// As long as CKEditor needs CSP exceptions, this needs to
Please login to merge, or discard this patch.