Completed
Push — 14.2 ( e07840...cec2da )
by Ralf
83:18 queued 52:04
created
mail/profile.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 Header('Content-Type: application/json; charset=utf-8');
63 63
 echo json_encode($times, JSON_PRETTY_PRINT);
64 64
 
65
-function php_times($account, array &$times, $prefix='php_')
65
+function php_times($account, array &$times, $prefix = 'php_')
66 66
 {
67 67
 	$starttime = microtime(true);
68
-	switch($account->acc_imap_ssl & ~emailadmin_account::SSL_VERIFY)
68
+	switch ($account->acc_imap_ssl&~emailadmin_account::SSL_VERIFY)
69 69
 	{
70 70
 		case emailadmin_account::SSL_SSL:
71 71
 			$schema = 'ssl';
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 	$error_number = $error_string = null;
82 82
 	$stream = stream_socket_client(
83
-		$schema . '://' . $account->acc_imap_host . ':' . $account->acc_imap_port,
83
+		$schema.'://'.$account->acc_imap_host.':'.$account->acc_imap_port,
84 84
 		$error_number,
85 85
 		$error_string,
86 86
 		20,
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	$connect_response = fgets($stream);
99 99
 
100 100
 	// starttls (untested)
101
-	if ($stream && ($account->acc_imap_ssl & ~emailadmin_account::SSL_VERIFY) == emailadmin_account::SSL_STARTTLS)
101
+	if ($stream && ($account->acc_imap_ssl&~emailadmin_account::SSL_VERIFY) == emailadmin_account::SSL_STARTTLS)
102 102
 	{
103 103
 		fwrite($stream, "10 STARTTLS\r\n");
104 104
 		stream_socket_enable_crypto($stream, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	unset($connect_response, $starttls_response, $login_response, $error_number, $error_string);
129 129
 }
130 130
 
131
-function mail_times($acc_id, array &$times, $prefix='mail_')
131
+function mail_times($acc_id, array &$times, $prefix = 'mail_')
132 132
 {
133 133
 	global $cache;
134 134
 	$starttime = microtime(true);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	$mail_ui->mail_bo->icServer->logout();
184 184
 }
185 185
 
186
-function horde_times(emailadmin_account $account, array &$times, $prefix='horde_')
186
+function horde_times(emailadmin_account $account, array &$times, $prefix = 'horde_')
187 187
 {
188 188
 	$starttime = microtime(true);
189 189
 	$imap = $account->imapServer();
@@ -215,12 +215,12 @@  discard block
 block discarded – undo
215 215
 	$imap->logout();
216 216
 }
217 217
 
218
-function horde_fetch(Horde_Imap_Client_Socket $client, $mailbox='INBOX')
218
+function horde_fetch(Horde_Imap_Client_Socket $client, $mailbox = 'INBOX')
219 219
 {
220 220
 	$squery = new Horde_Imap_Client_Search_Query();
221 221
 	// using a date filter to limit returned uids, gives huge speed improvement on big mailboxes, because less uids returned
222 222
 	//$squery->dateSearch(new DateTime('-30days'), Horde_Imap_Client_Search_Query::DATE_SINCE, false, false);
223
-	$squery->flag('DELETED', $set=false);
223
+	$squery->flag('DELETED', $set = false);
224 224
 	$sorted = $client->search($mailbox, $squery, array(
225 225
 		'sort' => array(Horde_Imap_Client::SORT_REVERSE, Horde_Imap_Client::SORT_SEQUENCE),
226 226
 	));
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	$first20uids->add(array_slice($sorted['match']->ids, 0, 20));
230 230
 
231 231
 	$fquery = new Horde_Imap_Client_Fetch_Query();
232
-	$fquery->headers('headers', array('Subject', 'From', 'To', 'Cc', 'Date'), array('peek' => true,'cache' => true));
232
+	$fquery->headers('headers', array('Subject', 'From', 'To', 'Cc', 'Date'), array('peek' => true, 'cache' => true));
233 233
 	$fquery->structure();
234 234
 	$fquery->flags();
235 235
 	$fquery->imapDate();
Please login to merge, or discard this patch.
mail/setup/default_records.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 // if no rows/rights found, give Default group rights
25 25
 if (!$GLOBALS['egw_setup']->db->affected_rows())
26 26
 {
27
-	$defaultgroup = $GLOBALS['egw_setup']->add_account('Default','Default','Group',False,False);
28
-	$GLOBALS['egw_setup']->add_acl('mail','run',$defaultgroup);
27
+	$defaultgroup = $GLOBALS['egw_setup']->add_account('Default', 'Default', 'Group', False, False);
28
+	$GLOBALS['egw_setup']->add_acl('mail', 'run', $defaultgroup);
29 29
 }
30 30
 
31 31
 // change common/default_app pref to mail, if it was felamimail
Please login to merge, or discard this patch.
mail/inc/class.mail_acl.inc.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
 	 *
34 34
 	 */
35 35
 	var $aclRightsAbbrvs = array(
36
-		'lrs'		=> array('label'=>'readable','title'=>'Allows a user to read the contents of the mailbox.'),
37
-		'lprs'		=> array('label'=>'post','title'=>'Allows a user to read the mailbox and post to it through the delivery system by sending mail to the submission address of the mailbox.'),
38
-		'ilprs'		=> array('label'=>'append','title'=>'Allows a user to read the mailbox and append messages to it, either via IMAP or through the delivery system.'),
39
-		'ilprsw'	=> array('label'=>'write','title'=>'Allows a user to read the maibox, post to it, append messages to it, and delete messages or the mailbox itself. The only right not given is the right to change the ACL of the mailbox.'),
40
-		'aeiklprstwx'=> array('label'=>'all','title'=>'The user has all possible rights on the mailbox. This is usually granted to users only on the mailboxes they own.'),
41
-		'custom'	=> array('label'=>'custom','title'=>'User defined combination of rights for the ACL'),
36
+		'lrs'		=> array('label'=>'readable', 'title'=>'Allows a user to read the contents of the mailbox.'),
37
+		'lprs'		=> array('label'=>'post', 'title'=>'Allows a user to read the mailbox and post to it through the delivery system by sending mail to the submission address of the mailbox.'),
38
+		'ilprs'		=> array('label'=>'append', 'title'=>'Allows a user to read the mailbox and append messages to it, either via IMAP or through the delivery system.'),
39
+		'ilprsw'	=> array('label'=>'write', 'title'=>'Allows a user to read the maibox, post to it, append messages to it, and delete messages or the mailbox itself. The only right not given is the right to change the ACL of the mailbox.'),
40
+		'aeiklprstwx'=> array('label'=>'all', 'title'=>'The user has all possible rights on the mailbox. This is usually granted to users only on the mailboxes they own.'),
41
+		'custom'	=> array('label'=>'custom', 'title'=>'User defined combination of rights for the ACL'),
42 42
 	);
43 43
 
44 44
 	/**
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 	 * @param array $msg = ''
62 62
 	 *
63 63
 	 */
64
-	function edit(array $content=null ,$msg='')
64
+	function edit(array $content = null, $msg = '')
65 65
 	{
66 66
 		$tmpl = new Etemplate('mail.acl');
67 67
 		if (!is_array($content))
68 68
 		{
69
-			$acc_id = $_GET['acc_id']?$_GET['acc_id']:$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
69
+			$acc_id = $_GET['acc_id'] ? $_GET['acc_id'] : $GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
70 70
 			if (isset($_GET['account_id']) && !isset($GLOBALS['egw_info']['user']['apps']['admin']))
71 71
 			{
72 72
 				Framework::window_close(lang('Permission denied'));
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		$account = Mail\Account::read($acc_id, $account_id);
82 82
 		$this->imap = $account->imapServer(isset($account_id) ? (int)$account_id : false);
83 83
 
84
-		$mailbox = $_GET['mailbox']? base64_decode($_GET['mailbox']): $content['mailbox'][0];
84
+		$mailbox = $_GET['mailbox'] ? base64_decode($_GET['mailbox']) : $content['mailbox'][0];
85 85
 		if (empty($mailbox))
86 86
 		{
87 87
 			$mailbox = $this->imap->isAdminConnection ? $this->imap->getUserMailboxString($this->imap->isAdminConnection) : 'INBOX';
@@ -111,14 +111,14 @@  discard block
 block discarded – undo
111 111
 
112 112
 					foreach ($rights as $right)
113 113
 					{
114
-						$content['grid'][$n]['acl_'. $right] = true;
114
+						$content['grid'][$n]['acl_'.$right] = true;
115 115
 					}
116
-					$virtualD = array('e','t');
117
-					$content['grid'][$n]['acl_c'] = array_diff($virtuals['c'],array_intersect($rights,$virtuals['c']))? false: true; //c=kx more information rfc4314, Obsolote Rights
118
-					$content['grid'][$n]['acl_d'] = array_diff($virtualD,array_intersect($rights,$virtuals['d']))? false: true; //d=et more information rfc4314, Obsolote Rights
116
+					$virtualD = array('e', 't');
117
+					$content['grid'][$n]['acl_c'] = array_diff($virtuals['c'], array_intersect($rights, $virtuals['c'])) ? false : true; //c=kx more information rfc4314, Obsolote Rights
118
+					$content['grid'][$n]['acl_d'] = array_diff($virtualD, array_intersect($rights, $virtuals['d'])) ? false : true; //d=et more information rfc4314, Obsolote Rights
119 119
 
120 120
 					sort($rights);
121
-					$acl_abbrvs = implode('',$rights);
121
+					$acl_abbrvs = implode('', $rights);
122 122
 
123 123
 					if (array_key_exists($acl_abbrvs, $this->aclRightsAbbrvs))
124 124
 					{
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 				case 'apply':
160 160
 					if ($content)
161 161
 					{
162
-						$validation_err = $this->update_acl($content,$msg);
162
+						$validation_err = $this->update_acl($content, $msg);
163 163
 						if ($validation_err)
164 164
 						{
165 165
 							foreach ($validation_err as &$row)
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 					}
194 194
 					else
195 195
 					{
196
-						error_log(__METHOD__.__LINE__. "()" . "The remove_acl suppose to return an array back, something is wrong there");
196
+						error_log(__METHOD__.__LINE__."()"."The remove_acl suppose to return an array back, something is wrong there");
197 197
 					}
198 198
 					Framework::message($msg);
199 199
 			}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		$sel_options['acl'] = $this->aclRightsAbbrvs;
203 203
 
204 204
 		//Make the account owner's fields all readonly as owner has all rights and should not be able to change them
205
-		foreach($content['grid'] as $key => $fields)
205
+		foreach ($content['grid'] as $key => $fields)
206 206
 		{
207 207
 			if ($fields['acc_id'] == $this->imap->acc_imap_username ||
208 208
 					$fields['acc_id'][0] == $this->imap->acc_imap_username)
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			));
236 236
 		}
237 237
 
238
-		$tmpl->exec('mail.mail_acl.edit', $content, $sel_options, $readonlys, $preserv,2);
238
+		$tmpl->exec('mail.mail_acl.edit', $content, $sel_options, $readonlys, $preserv, 2);
239 239
 	}
240 240
 
241 241
 	/**
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		$mailbox = $imap->isAdminConnection ? $imap->getUserMailboxString($imap->isAdminConnection) : 'INBOX';
255 255
 
256 256
 		$folders = array();
257
-		foreach(self::getSubfolders($mailbox, $imap) as $folder)
257
+		foreach (self::getSubfolders($mailbox, $imap) as $folder)
258 258
 		{
259 259
 			if (stripos($folder, $_GET['query']) !== false)
260 260
 			{
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 	 * @param string $msg Message
283 283
 	 *
284 284
 	 */
285
-	function update_acl ($content, &$msg)
285
+	function update_acl($content, &$msg)
286 286
 	{
287 287
 		$validator = array();
288 288
 
@@ -298,14 +298,14 @@  discard block
 block discarded – undo
298 298
 			{
299 299
 				if ($value[$key] == true)
300 300
 				{
301
-					$right = explode("acl_" ,$key);
301
+					$right = explode("acl_", $key);
302 302
 					if ($right[1] === 'c') $right[1] = 'kx'; // c = kx , rfc 4314
303 303
 					if ($right[1] === 'd') $right[1] = 'et'; // d = et , rfc 4314
304
-					$options['rights'] .=  $right[1];
304
+					$options['rights'] .= $right[1];
305 305
 				}
306 306
 			}
307 307
 			$username = $content['grid'][$keys]['acc_id'] == $this->imap->acc_imap_username
308
-				?$content['grid'][$keys]['acc_id']:$content['grid'][$keys]['acc_id'][0];
308
+				? $content['grid'][$keys]['acc_id'] : $content['grid'][$keys]['acc_id'][0];
309 309
 			//error_log(__METHOD__."(".__LINE__.") setACL($content[mailbox], $username, ".array2string($options).", $recursive)");
310 310
 			if (is_numeric($username) && ($u = $this->imap->getMailBoxUserName($username)))
311 311
 			{
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 			if (!empty($username))
315 315
 			{
316 316
 				//error_log(__METHOD__."() setACL($content[mailbox], $username, ".array2string($options).", $recursive)");
317
-				if (($ret=$this->setACL($content['mailbox'], $username, $options, $recursive, $msg)))
317
+				if (($ret = $this->setACL($content['mailbox'], $username, $options, $recursive, $msg)))
318 318
 				{
319 319
 					$msg = lang("The Folder %1 's ACLs saved", $content['mailbox']);
320 320
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 			}
327 327
 			else
328 328
 			{
329
-				if($keys !== count($content['grid']))
329
+				if ($keys !== count($content['grid']))
330 330
 				{
331 331
 					array_push($validator, $keys);
332 332
 					$msg = lang("Error:Could not save the ACL! Because some names are empty!");
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 	 * Retrive Folder ACL rights
344 344
 	 * @todo rights 'c' and 'd' should be fixed
345 345
 	 */
346
-	function retrive_acl ($mailbox, &$msg)
346
+	function retrive_acl($mailbox, &$msg)
347 347
 	{
348 348
 		if (($acl = $this->getACL($mailbox)))
349 349
 		 {
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 	 */
369 369
 	function remove_acl($content, &$msg)
370 370
 	{
371
-		$row_num = array_keys($content['grid']['delete'],"pressed");
371
+		$row_num = array_keys($content['grid']['delete'], "pressed");
372 372
 		if ($row_num) $row_num = $row_num[0];
373 373
 		$recursive = $content['grid'][$row_num]['acl_recursive'];
374 374
 		$identifier = $content['grid'][$row_num]['acc_id'][0];
@@ -378,24 +378,24 @@  discard block
 block discarded – undo
378 378
 			$identifier = $u;
379 379
 		}
380 380
 		//error_log(__METHOD__.__LINE__."(".$content['mailbox'].", ".$identifier.", ".$recursive.")");
381
-		if(($res = $this->deleteACL($content['mailbox'], $identifier,$recursive)))
381
+		if (($res = $this->deleteACL($content['mailbox'], $identifier, $recursive)))
382 382
 		{
383 383
 			unset($content['grid'][$row_num]);
384 384
 			unset($content['grid']['delete']);
385 385
 			if ($recursive)
386 386
 			{
387
-				$msg = lang("The %1 's acl, including its subfolders, removed from the %2",$content['mailbox'],$identifier);
387
+				$msg = lang("The %1 's acl, including its subfolders, removed from the %2", $content['mailbox'], $identifier);
388 388
 			}
389 389
 			else
390 390
 			{
391
-				$msg = lang("The %1 's acl removed from the %2",$content['mailbox'],$identifier);
391
+				$msg = lang("The %1 's acl removed from the %2", $content['mailbox'], $identifier);
392 392
 			}
393 393
 
394 394
 			return array_combine(range(1, count($content['grid'])), array_values($content['grid']));
395 395
 		}
396 396
 		else
397 397
 		{
398
-			$msg = lang("An error happend while trying to remove ACL rights from the account %1!",$identifier);
398
+			$msg = lang("An error happend while trying to remove ACL rights from the account %1!", $identifier);
399 399
 			return false;
400 400
 		}
401 401
 	}
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 	 *
411 411
 	 * @return Boolean FALSE in case of any exceptions and TRUE in case of success
412 412
 	 */
413
-	function deleteACL ($mailbox, $identifier, $recursive)
413
+	function deleteACL($mailbox, $identifier, $recursive)
414 414
 	{
415 415
 		if ($recursive)
416 416
 		{
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 		{
421 421
 			$folders = (array)$mailbox;
422 422
 		}
423
-		foreach($folders as $sbFolders)
423
+		foreach ($folders as $sbFolders)
424 424
 		{
425 425
 			try
426 426
 			{
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 			}
429 429
 			catch (Exception $e)
430 430
 			{
431
-				error_log(__METHOD__. "Could not delete ACL rights of folder " . $mailbox . " for account ". $identifier ." because of " .$e->getMessage());
431
+				error_log(__METHOD__."Could not delete ACL rights of folder ".$mailbox." for account ".$identifier." because of ".$e->getMessage());
432 432
 				return false;
433 433
 			}
434 434
 		}
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 	 * @return Boolean FALSE in case of any exceptions and TRUE in case of success,
472 472
 	 *
473 473
 	 */
474
-	function setACL($mailbox, $identifier,$options, $recursive, &$msg)
474
+	function setACL($mailbox, $identifier, $options, $recursive, &$msg)
475 475
 	{
476 476
 		if ($recursive)
477 477
 		{
@@ -481,16 +481,16 @@  discard block
 block discarded – undo
481 481
 		{
482 482
 			$folders = (array)$mailbox;
483 483
 		}
484
-		foreach($folders as $sbFolders)
484
+		foreach ($folders as $sbFolders)
485 485
 		{
486 486
 			try
487 487
 			{
488
-				$this->imap->setACL($sbFolders,$identifier,$options);
488
+				$this->imap->setACL($sbFolders, $identifier, $options);
489 489
 			}
490 490
 			catch (Exception $e)
491 491
 			{
492 492
 				$msg = $e->getMessage();
493
-				error_log(__METHOD__. "Could not set ACL rights on folder " . $mailbox . " for account ". $identifier . " because of " .$e->getMessage());
493
+				error_log(__METHOD__."Could not set ACL rights on folder ".$mailbox." for account ".$identifier." because of ".$e->getMessage());
494 494
 				return false;
495 495
 			}
496 496
 		}
@@ -503,14 +503,14 @@  discard block
 block discarded – undo
503 503
 	 * @param String $mailbox folder name that needs to be read
504 504
 	 * @return Boolean FALSE in case of any exceptions and if TRUE in case of success,
505 505
 	 */
506
-	function getACL ($mailbox)
506
+	function getACL($mailbox)
507 507
 	{
508 508
 		try
509 509
 		{
510 510
 			$acl = $this->imap->getACL($mailbox);
511 511
 			return $acl;
512 512
 		} catch (Exception $e) {
513
-			error_log(__METHOD__. "Could not get ACL rights from folder " . $mailbox . " because of " .$e->getMessage());
513
+			error_log(__METHOD__."Could not get ACL rights from folder ".$mailbox." because of ".$e->getMessage());
514 514
 			return false;
515 515
 		}
516 516
 	}
Please login to merge, or discard this patch.
resources/sitemgr/class.module_resources_reservation.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		$categories = new Api\Categories('', 'resources');
27 27
 		$cat_list = $categories->return_sorted_array();
28 28
 		$cat_options = array();
29
-		foreach($cat_list as $category)
29
+		foreach ($cat_list as $category)
30 30
 		{
31 31
 			$cat_options[$category['id']] = $category['name'];
32 32
 		}
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 			'email_message' => array(
55 55
 				'type' => 'textarea',
56 56
 				'large' => true,
57
-				'label' => lang('Confirmation email text').'<br />%1 = ' . lang('Event start').'<br/>%2 = link<br />%3 = '.lang('expiry'),
57
+				'label' => lang('Confirmation email text').'<br />%1 = '.lang('Event start').'<br/>%2 = link<br />%3 = '.lang('expiry'),
58 58
 				'params' => array(
59 59
 					'rows'	=> 8,
60 60
 					'cols'	=> 110
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 				'label' => lang('Confirmed addressbook.').' ('.lang('The anonymous user needs add rights for it!').')',
66 66
 				'options' => array(
67 67
 					'' => lang('None'),
68
-				)+registration_bo::get_allowed_addressbooks(registration_bo::CONFIRMED)
68
+				) + registration_bo::get_allowed_addressbooks(registration_bo::CONFIRMED)
69 69
 			),
70 70
 			'include_group' => array(
71 71
 				'type' => 'select',
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		// Add resources from selected category
91 91
 		$bo = new resources_bo();
92 92
 		$bo->get_rows($query, $list, $readonlys);
93
-		foreach($list as $resource)
93
+		foreach ($list as $resource)
94 94
 		{
95 95
 			$this->arguments['resource']['options'][$resource['res_id']] = $resource['name'];
96 96
 		}
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
 	* @param array $properties
106 106
 	* @return string the Api\Html content
107 107
 	*/
108
-	function get_content(&$arguments,$properties)
108
+	function get_content(&$arguments, $properties)
109 109
 	{
110
-		list($app) = explode('.',$this->etemplate_method);
110
+		list($app) = explode('.', $this->etemplate_method);
111 111
 		Api\Translation::add_app($app);
112 112
 
113 113
 		$extra = "<style type=\"text/css\">\n<!--\n@import url(".$GLOBALS['egw_info']['server']['webserver_url'].
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
 		$extra .= "-->\n</style>\n";
123 123
 		$extra .= '<script src="'.$GLOBALS['egw_info']['server']['webserver_url'].'/etemplate/js/etemplate.js" type="text/javascript"></script>'."\n";
124 124
 		$ret = false;
125
-		if($_POST['etemplate_exec_id'])
125
+		if ($_POST['etemplate_exec_id'])
126 126
 		{
127 127
 				$ret = ExecMethod('etemplate.etemplate.process_exec');
128 128
 		}
129
-		if($_GET['date']) $arguments['date'] = strtotime($_GET['date']);
129
+		if ($_GET['date']) $arguments['date'] = strtotime($_GET['date']);
130 130
 		$arguments['link'] = $this->link();
131 131
 		$arguments['sitemgr_version'] = $this->block->version;
132
-		return $extra.($ret ? $ret : ExecMethod2($this->etemplate_method,null,$arguments));
132
+		return $extra.($ret ? $ret : ExecMethod2($this->etemplate_method, null, $arguments));
133 133
 	}
134 134
 
135 135
 }
Please login to merge, or discard this patch.
resources/setup/tables_current.inc.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -14,26 +14,26 @@  discard block
 block discarded – undo
14 14
 $phpgw_baseline = array(
15 15
 	'egw_resources' => array(
16 16
 		'fd' => array(
17
-			'res_id' => array('type' => 'auto','nullable' => False),
18
-			'name' => array('type' => 'varchar','precision' => '100'),
19
-			'short_description' => array('type' => 'varchar','precision' => '100'),
20
-			'cat_id' => array('type' => 'int','meta' => 'category','precision' => '11','nullable' => False),
21
-			'quantity' => array('type' => 'int','precision' => '11','default' => '1'),
22
-			'useable' => array('type' => 'int','precision' => '11','default' => '1'),
23
-			'location' => array('type' => 'varchar','precision' => '100'),
24
-			'bookable' => array('type' => 'varchar','precision' => '1'),
25
-			'buyable' => array('type' => 'varchar','precision' => '1'),
26
-			'prize' => array('type' => 'varchar','precision' => '200'),
17
+			'res_id' => array('type' => 'auto', 'nullable' => False),
18
+			'name' => array('type' => 'varchar', 'precision' => '100'),
19
+			'short_description' => array('type' => 'varchar', 'precision' => '100'),
20
+			'cat_id' => array('type' => 'int', 'meta' => 'category', 'precision' => '11', 'nullable' => False),
21
+			'quantity' => array('type' => 'int', 'precision' => '11', 'default' => '1'),
22
+			'useable' => array('type' => 'int', 'precision' => '11', 'default' => '1'),
23
+			'location' => array('type' => 'varchar', 'precision' => '100'),
24
+			'bookable' => array('type' => 'varchar', 'precision' => '1'),
25
+			'buyable' => array('type' => 'varchar', 'precision' => '1'),
26
+			'prize' => array('type' => 'varchar', 'precision' => '200'),
27 27
 			'long_description' => array('type' => 'longtext'),
28
-			'picture_src' => array('type' => 'varchar','precision' => '20'),
29
-			'accessory_of' => array('type' => 'int','precision' => '11','default' => '-1'),
30
-			'storage_info' => array('type' => 'varchar','precision' => '200'),
31
-			'inventory_number' => array('type' => 'varchar','precision' => '20'),
32
-			'deleted' => array('type' => 'int','meta' => 'timestamp','precision' => '8'),
33
-			'res_creator' => array('type' => 'int','meta' => 'user','precision' => '11'),
34
-			'res_created' => array('type' => 'int','meta' => 'timestamp','precision' => '8'),
35
-			'res_modifier' => array('type' => 'int','meta' => 'user','precision' => '11'),
36
-			'res_modified' => array('type' => 'int','meta' => 'timestamp','precision' => '8')
28
+			'picture_src' => array('type' => 'varchar', 'precision' => '20'),
29
+			'accessory_of' => array('type' => 'int', 'precision' => '11', 'default' => '-1'),
30
+			'storage_info' => array('type' => 'varchar', 'precision' => '200'),
31
+			'inventory_number' => array('type' => 'varchar', 'precision' => '20'),
32
+			'deleted' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8'),
33
+			'res_creator' => array('type' => 'int', 'meta' => 'user', 'precision' => '11'),
34
+			'res_created' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8'),
35
+			'res_modifier' => array('type' => 'int', 'meta' => 'user', 'precision' => '11'),
36
+			'res_modified' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8')
37 37
 		),
38 38
 		'pk' => array('res_id'),
39 39
 		'fk' => array(),
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 	),
43 43
 	'egw_resources_extra' => array(
44 44
 		'fd' => array(
45
-			'extra_id' => array('type' => 'int','precision' => '4','nullable' => False),
46
-			'extra_name' => array('type' => 'varchar','meta' => 'cfname','precision' => '40','nullable' => False),
47
-			'extra_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False,'default' => '-1'),
48
-			'extra_value' => array('type' => 'varchar','meta' => 'cfvalue','precision' => '255','nullable' => False,'default' => '')
45
+			'extra_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
46
+			'extra_name' => array('type' => 'varchar', 'meta' => 'cfname', 'precision' => '40', 'nullable' => False),
47
+			'extra_owner' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False, 'default' => '-1'),
48
+			'extra_value' => array('type' => 'varchar', 'meta' => 'cfvalue', 'precision' => '255', 'nullable' => False, 'default' => '')
49 49
 		),
50
-		'pk' => array('extra_id','extra_name','extra_owner'),
50
+		'pk' => array('extra_id', 'extra_name', 'extra_owner'),
51 51
 		'fk' => array(),
52 52
 		'ix' => array(),
53 53
 		'uc' => array()
Please login to merge, or discard this patch.
resources/inc/class.resources_wizard_import_csv.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
                 );
48 48
 
49 49
 		$custom = Api\Storage\Customfields::get('resources', true);
50
-		foreach($custom as $name => $data) {
50
+		foreach ($custom as $name => $data) {
51 51
 			$this->mapping_fields['#'.$name] = $data['label'];
52 52
 		}
53 53
 
Please login to merge, or discard this patch.
resources/inc/class.resources_wizard_export_csv.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,26 +26,26 @@  discard block
 block discarded – undo
26 26
 
27 27
 		// Custom fields
28 28
 		$custom = Api\Storage\Customfields::get('resources', true);
29
-		foreach($custom as $name => $data) {
29
+		foreach ($custom as $name => $data) {
30 30
 			$this->export_fields['#'.$name] = $data['label'];
31 31
 		}
32 32
 	}
33 33
 
34 34
 	public function wizard_step50(&$content, &$sel_options, &$readonlys, &$preserv) {
35
-		if($this->debug || true) error_log(get_class($this) . '::wizard_step50->$content '.print_r($content,true));
35
+		if ($this->debug || true) error_log(get_class($this).'::wizard_step50->$content '.print_r($content, true));
36 36
 		// return
37 37
 		if ($content['step'] == 'wizard_step50')
38 38
 		{
39 39
 			switch (array_search('pressed', $content['button']))
40 40
 			{
41 41
 				case 'next':
42
-					return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],1);
42
+					return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'], 1);
43 43
 				case 'previous' :
44
-					return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'],-1);
44
+					return $GLOBALS['egw']->importexport_definitions_ui->get_step($content['step'], -1);
45 45
 				case 'finish':
46 46
 					return 'wizard_finish';
47 47
 				default :
48
-					return $this->wizard_step50($content,$sel_options,$readonlys,$preserv);
48
+					return $this->wizard_step50($content, $sel_options, $readonlys, $preserv);
49 49
 			}
50 50
 		}
51 51
 		// init step
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 			unset ($preserv['button']);
58 58
 			$fields = array('pm_used_time', 'pm_planned_time', 'pm_replanned_time');
59 59
 			$sel_options = array_fill_keys($fields, array('h' => lang('hours'), 'd' => lang('days')));
60
-			foreach($fields as $field) {
60
+			foreach ($fields as $field) {
61 61
 				$content[$field] = $content[$field] ? $content[$field] : $content['plugin_options'][$field];
62 62
 			}
63 63
 		}
Please login to merge, or discard this patch.
resources/inc/class.resources_so.inc.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 {
23 23
 	function __construct()
24 24
 	{
25
-		parent::__construct('resources','egw_resources', 'egw_resources_extra', '',
26
-			'extra_name', 'extra_value', 'extra_id' );
25
+		parent::__construct('resources', 'egw_resources', 'egw_resources_extra', '',
26
+			'extra_name', 'extra_value', 'extra_id');
27 27
 
28
-		$this->columns_to_search = array('name','short_description','inventory_number','long_description','location');
28
+		$this->columns_to_search = array('name', 'short_description', 'inventory_number', 'long_description', 'location');
29 29
 	}
30 30
 
31 31
 	/**
@@ -35,10 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @param int $res_id resource id
36 36
 	 * @return mixed value of key and resource, false if key or id not found.
37 37
 	 */
38
-	function get_value($key,$res_id)
38
+	function get_value($key, $res_id)
39 39
 	{
40
-		return $res_id == $this->data['res_id'] ? $this->data[$key] :
41
-			$this->db->select($this->table_name,$key,array('res_id' => $res_id),__LINE__,__FILE__)->fetchColumn();
40
+		return $res_id == $this->data['res_id'] ? $this->data[$key] : $this->db->select($this->table_name, $key, array('res_id' => $res_id), __LINE__, __FILE__)->fetchColumn();
42 41
 	}
43 42
 
44 43
 	/**
@@ -90,7 +89,7 @@  discard block
 block discarded – undo
90 89
 	function save($resource)
91 90
 	{
92 91
 		$this->data = $resource;
93
-		if(parent::save() != 0) return false;
92
+		if (parent::save() != 0) return false;
94 93
 		$res_id = $this->data['res_id'];
95 94
 
96 95
 		return $res_id;
Please login to merge, or discard this patch.
resources/inc/class.resources_egw_record.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 	 *
35 35
 	 * @param string $_identifier
36 36
 	 */
37
-	public function __construct( $_identifier='' ) {
37
+	public function __construct($_identifier = '') {
38 38
 		$this->identifier = $_identifier;
39
-		if($this->identifier) {
39
+		if ($this->identifier) {
40 40
 			$this->record = ExecMethod('resources.resources_bo.read', $this->identifier);
41 41
 		}
42 42
 	}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 * @todo add some checks
91 91
 	 * @return void
92 92
 	 */
93
-	public function set_record(array $_record){
93
+	public function set_record(array $_record) {
94 94
 		$this->record = $_record;
95 95
 	}
96 96
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public function get_icon() {
113 113
 		$bo = new resources_bo();
114
-		if(!$icon = $bo->get_picture($this->identifier,$this->picture_src))
114
+		if (!$icon = $bo->get_picture($this->identifier, $this->picture_src))
115 115
 		{
116 116
 			$icon = 'resources/navbar';
117 117
 		}
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 *
124 124
 	 * @return string identifier
125 125
 	 */
126
-	public function save ( $_dst_identifier ) {
126
+	public function save($_dst_identifier) {
127 127
 
128 128
 	}
129 129
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string $_dst_identifier
134 134
 	 * @return string dst_identifier
135 135
 	 */
136
-	public function copy ( $_dst_identifier ) {
136
+	public function copy($_dst_identifier) {
137 137
 
138 138
 	}
139 139
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	 * @param string $_dst_identifier
145 145
 	 * @return string dst_identifier
146 146
 	 */
147
-	public function move ( $_dst_identifier ) {
147
+	public function move($_dst_identifier) {
148 148
 
149 149
 	}
150 150
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	 * delets current record from backend
153 153
 	 *
154 154
 	 */
155
-	public function delete () {
155
+	public function delete() {
156 156
 
157 157
 	}
158 158
 
Please login to merge, or discard this patch.