Completed
Push — master ( aa44e9...fa84e5 )
by Ralf
90:14 queued 73:21
created
api/src/Mail/Smtp/Sql.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @param string $defaultDomain =null
65 65
 	 */
66
-	function __construct($defaultDomain=null)
66
+	function __construct($defaultDomain = null)
67 67
 	{
68 68
 		parent::__construct($defaultDomain);
69 69
 
@@ -78,16 +78,16 @@  discard block
 block discarded – undo
78 78
 	 */
79 79
 	function getAccountEmailAddress($_accountName)
80 80
 	{
81
-		$emailAddresses	= parent::getAccountEmailAddress($_accountName);
81
+		$emailAddresses = parent::getAccountEmailAddress($_accountName);
82 82
 
83 83
 		if (($account_id = $this->accounts->name2id($_accountName, 'account_lid', 'u')))
84 84
 		{
85
-			foreach($this->db->select(self::TABLE, 'mail_value', array(
85
+			foreach ($this->db->select(self::TABLE, 'mail_value', array(
86 86
 				'account_id' => $account_id,
87 87
 				'mail_type' => self::TYPE_ALIAS,
88 88
 			), __LINE__, __FILE__, false, 'ORDER BY mail_value', self::APP) as $row)
89 89
 			{
90
-				$emailAddresses[] = array (
90
+				$emailAddresses[] = array(
91 91
 					'name'		=> $emailAddresses[0]['name'],
92 92
 					'address'	=> $row['mail_value'],
93 93
 					'type'		=> 'alternate',
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @return array with values for keys 'mailLocalAddress', 'mailAlternateAddress' (array), 'mailForwardingAddress' (array),
112 112
 	 * 	'accountStatus' ("active"), 'quotaLimit' and 'deliveryMode' ("forwardOnly")
113 113
 	 */
114
-	function getUserData($user, $match_uid_at_domain=false)
114
+	function getUserData($user, $match_uid_at_domain = false)
115 115
 	{
116 116
 		$userData = array();
117 117
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 			{
141 141
 				$account_id[] = $id;
142 142
 			}
143
-			foreach($this->db->select(self::TABLE, 'account_id', array(
143
+			foreach ($this->db->select(self::TABLE, 'account_id', array(
144 144
 				'mail_type' => self::TYPE_ALIAS,
145 145
 				'mail_value' => $user,
146 146
 			), __LINE__, __FILE__, false, '', self::APP) as $row)
@@ -156,11 +156,11 @@  discard block
 block discarded – undo
156 156
 				$userData['mailLocalAddress'] = $this->accounts->id2name($account_id, 'account_email');
157 157
 			}
158 158
 			$enabled = $forwardOnly = array();
159
-			foreach($this->db->select(self::TABLE, '*', array(
159
+			foreach ($this->db->select(self::TABLE, '*', array(
160 160
 				'account_id' => $account_id,
161 161
 			), __LINE__, __FILE__, false, 'ORDER BY mail_type,mail_value', self::APP) as $row)
162 162
 			{
163
-				switch($row['mail_type'])
163
+				switch ($row['mail_type'])
164 164
 				{
165 165
 					case self::TYPE_ENABLED:
166 166
 						$userData['accountStatus'] = $row['mail_value'];
@@ -203,11 +203,11 @@  discard block
 block discarded – undo
203 203
 			if (is_array($account_id))
204 204
 			{
205 205
 				// add group-members for groups as forward (that way we dont need to store&update them)
206
-				foreach($account_id as $id)
206
+				foreach ($account_id as $id)
207 207
 				{
208 208
 					if ($id < 0 && ($members = $this->accounts->members($id, true)))
209 209
 					{
210
-						foreach($members as $member)
210
+						foreach ($members as $member)
211 211
 						{
212 212
 							if (($email = $this->accounts->id2name($member, 'account_email')) && !in_array($email, (array)$userData['forward']))
213 213
 							{
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 	 * @return boolean true on success, false on error writing to ldap
239 239
 	 */
240 240
 	function setUserData($_uidnumber, array $_mailAlternateAddress, array $_mailForwardingAddress, $_deliveryMode,
241
-		$_accountStatus, $_mailLocalAddress, $_quota, $_forwarding_only=false, $_setMailbox=null)
241
+		$_accountStatus, $_mailLocalAddress, $_quota, $_forwarding_only = false, $_setMailbox = null)
242 242
 	{
243 243
 		if ($this->debug) error_log(__METHOD__."($_uidnumber, ".array2string($_mailAlternateAddress).', '.array2string($_mailForwardingAddress).", '$_deliveryMode', '$_accountStatus', '$_mailLocalAddress', $_quota, forwarding_only=".array2string($_forwarding_only).') '.function_backtrace());
244 244
 
@@ -257,22 +257,22 @@  discard block
 block discarded – undo
257 257
 		if ($_forwarding_only) $where['mail_type'] = array(self::TYPE_FORWARD, self::TYPE_DELIVERY);
258 258
 		// find all invalid values: either delete or update them
259 259
 		$delete_ids = array();
260
-		foreach($this->db->select(self::TABLE, '*', $where, __LINE__, __FILE__, false, '', self::APP) as $row)
260
+		foreach ($this->db->select(self::TABLE, '*', $where, __LINE__, __FILE__, false, '', self::APP) as $row)
261 261
 		{
262
-			switch($row['mail_type'])
262
+			switch ($row['mail_type'])
263 263
 			{
264 264
 				case self::TYPE_ALIAS:
265
-					$new_addresses =& $_mailAlternateAddress;
265
+					$new_addresses = & $_mailAlternateAddress;
266 266
 					// fall-throught
267 267
 				case self::TYPE_FORWARD:
268
-					if ($row['mail_type'] == self::TYPE_FORWARD) $new_addresses =& $_mailForwardingAddress;
268
+					if ($row['mail_type'] == self::TYPE_FORWARD) $new_addresses = & $_mailForwardingAddress;
269 269
 					if (($key = array_search($row['mail_value'], $new_addresses)) === false)
270 270
 					{
271 271
 						$delete_ids[] = $row['mail_id'];
272 272
 					}
273 273
 					else
274 274
 					{
275
-						unset($new_addresses[$key]);	// no need to store
275
+						unset($new_addresses[$key]); // no need to store
276 276
 					}
277 277
 					break;
278 278
 
@@ -322,14 +322,14 @@  discard block
 block discarded – undo
322 322
 			));
323 323
 		}
324 324
 		// store all new values
325
-		foreach($flags+array(
325
+		foreach ($flags + array(
326 326
 			self::TYPE_ALIAS => $_mailAlternateAddress,
327 327
 			self::TYPE_FORWARD => $_mailForwardingAddress,
328 328
 		) as $type => $values)
329 329
 		{
330 330
 			if ($values && (!$_forwarding_only || in_array($type, array(self::TYPE_FORWARD, self::TYPE_DELIVERY))))
331 331
 			{
332
-				foreach((array)$values as $value)
332
+				foreach ((array)$values as $value)
333 333
 				{
334 334
 					$this->db->insert(self::TABLE, array(
335 335
 						'account_id' => $_uidnumber,
@@ -363,11 +363,11 @@  discard block
 block discarded – undo
363 363
 			$join .= ' JOIN '.self::TABLE.' active ON active.account_id='.self::TABLE.'.account_id AND active.mail_type='.self::TYPE_ENABLED;
364 364
 		}
365 365
 		$mailboxes = array();
366
-		foreach($this->db->select(self::TABLE, 'account_lid AS uid,'.self::TABLE.'.mail_value AS mailbox',
366
+		foreach ($this->db->select(self::TABLE, 'account_lid AS uid,'.self::TABLE.'.mail_value AS mailbox',
367 367
 			self::TABLE.'.mail_type='.self::TYPE_MAILBOX,
368 368
 			__LINE__, __FILE__, false, 'ORDER BY account_lid', self::APP, 0, $join) as $row)
369 369
 		{
370
-			if ($row['uid'] == 'anonymous') continue;	// anonymous is never a mail-user!
370
+			if ($row['uid'] == 'anonymous') continue; // anonymous is never a mail-user!
371 371
 			list($mailbox) = explode('@', $row['mailbox']);
372 372
 			$mailboxes[$row['uid']] = $mailbox;
373 373
 		}
Please login to merge, or discard this patch.
Braces   +29 added lines, -7 removed lines patch added patch discarded remove patch
@@ -94,7 +94,10 @@  discard block
 block discarded – undo
94 94
 				);
95 95
 			}
96 96
 		}
97
-		if ($this->debug) error_log(__METHOD__."('$_accountName') returning ".array2string($emailAddresses));
97
+		if ($this->debug)
98
+		{
99
+			error_log(__METHOD__."('$_accountName') returning ".array2string($emailAddresses));
100
+		}
98 101
 
99 102
 		return $emailAddresses;
100 103
 	}
@@ -145,7 +148,10 @@  discard block
 block discarded – undo
145 148
 				'mail_value' => $user,
146 149
 			), __LINE__, __FILE__, false, '', self::APP) as $row)
147 150
 			{
148
-				if (!in_array($row['account_id'], $account_id)) $account_id[] = $row['account_id'];
151
+				if (!in_array($row['account_id'], $account_id))
152
+				{
153
+					$account_id[] = $row['account_id'];
154
+				}
149 155
 			}
150 156
 			//error_log(__METHOD__."('$user') account_id=".array2string($account_id));
151 157
 		}
@@ -218,7 +224,10 @@  discard block
 block discarded – undo
218 224
 				}
219 225
 			}
220 226
 		}
221
-		if ($this->debug) error_log(__METHOD__."('$user') returning ".array2string($userData));
227
+		if ($this->debug)
228
+		{
229
+			error_log(__METHOD__."('$user') returning ".array2string($userData));
230
+		}
222 231
 
223 232
 		return $userData;
224 233
 	}
@@ -240,7 +249,10 @@  discard block
 block discarded – undo
240 249
 	function setUserData($_uidnumber, array $_mailAlternateAddress, array $_mailForwardingAddress, $_deliveryMode,
241 250
 		$_accountStatus, $_mailLocalAddress, $_quota, $_forwarding_only=false, $_setMailbox=null)
242 251
 	{
243
-		if ($this->debug) error_log(__METHOD__."($_uidnumber, ".array2string($_mailAlternateAddress).', '.array2string($_mailForwardingAddress).", '$_deliveryMode', '$_accountStatus', '$_mailLocalAddress', $_quota, forwarding_only=".array2string($_forwarding_only).') '.function_backtrace());
252
+		if ($this->debug)
253
+		{
254
+			error_log(__METHOD__."($_uidnumber, ".array2string($_mailAlternateAddress).', '.array2string($_mailForwardingAddress).", '$_deliveryMode', '$_accountStatus', '$_mailLocalAddress', $_quota, forwarding_only=".array2string($_forwarding_only).') '.function_backtrace());
255
+		}
244 256
 
245 257
 		if (!$_forwarding_only && $this->accounts->id2name($_uidnumber, 'account_email') !== $_mailLocalAddress)
246 258
 		{
@@ -254,7 +266,10 @@  discard block
 block discarded – undo
254 266
 			self::TYPE_QUOTA => $_quota,
255 267
 		);
256 268
 		$where = array('account_id' => $_uidnumber);
257
-		if ($_forwarding_only) $where['mail_type'] = array(self::TYPE_FORWARD, self::TYPE_DELIVERY);
269
+		if ($_forwarding_only)
270
+		{
271
+			$where['mail_type'] = array(self::TYPE_FORWARD, self::TYPE_DELIVERY);
272
+		}
258 273
 		// find all invalid values: either delete or update them
259 274
 		$delete_ids = array();
260 275
 		foreach($this->db->select(self::TABLE, '*', $where, __LINE__, __FILE__, false, '', self::APP) as $row)
@@ -265,7 +280,10 @@  discard block
 block discarded – undo
265 280
 					$new_addresses =& $_mailAlternateAddress;
266 281
 					// fall-throught
267 282
 				case self::TYPE_FORWARD:
268
-					if ($row['mail_type'] == self::TYPE_FORWARD) $new_addresses =& $_mailForwardingAddress;
283
+					if ($row['mail_type'] == self::TYPE_FORWARD)
284
+					{
285
+						$new_addresses =& $_mailForwardingAddress;
286
+					}
269 287
 					if (($key = array_search($row['mail_value'], $new_addresses)) === false)
270 288
 					{
271 289
 						$delete_ids[] = $row['mail_id'];
@@ -367,7 +385,11 @@  discard block
 block discarded – undo
367 385
 			self::TABLE.'.mail_type='.self::TYPE_MAILBOX,
368 386
 			__LINE__, __FILE__, false, 'ORDER BY account_lid', self::APP, 0, $join) as $row)
369 387
 		{
370
-			if ($row['uid'] == 'anonymous') continue;	// anonymous is never a mail-user!
388
+			if ($row['uid'] == 'anonymous')
389
+			{
390
+				continue;
391
+			}
392
+			// anonymous is never a mail-user!
371 393
 			list($mailbox) = explode('@', $row['mailbox']);
372 394
 			$mailboxes[$row['uid']] = $mailbox;
373 395
 		}
Please login to merge, or discard this patch.
api/src/Mail/Types.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 	 *
26 26
 	 * @return array classname => label pairs
27 27
 	 */
28
-	static public function getSMTPServerTypes($extended=true)
28
+	static public function getSMTPServerTypes($extended = true)
29 29
 	{
30 30
 		$retData = self::server_types(false, $extended);
31
-		foreach(Api\Hooks::process(array(
31
+		foreach (Api\Hooks::process(array(
32 32
 			'location' => 'smtp_server_types',
33 33
 			'extended' => $extended,
34 34
 		), array('managementserver'), true) as $app => $data)
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 	 * @param boolean $extended =true
56 56
 	 * @return array classname => label pairs
57 57
 	 */
58
-	static public function getIMAPServerTypes($extended=true)
58
+	static public function getIMAPServerTypes($extended = true)
59 59
 	{
60 60
 		$retData = self::server_types(true, $extended);
61
-		foreach(Api\Hooks::process(array(
61
+		foreach (Api\Hooks::process(array(
62 62
 			'location' => 'imap_server_types',
63 63
 			'extended' => $extended,
64 64
 		), array('managementserver'), true) as $app => $data)
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 	 * @param boolean $extended =false
85 85
 	 * @return array
86 86
 	 */
87
-	protected static function server_types($imap=true, $extended=false)
87
+	protected static function server_types($imap = true, $extended = false)
88 88
 	{
89 89
 		$types = array();
90 90
 		$prefix = $imap ? 'Imap' : 'Smtp';
91
-		foreach(scandir($dir=__DIR__.'/'.$prefix) as $file)
91
+		foreach (scandir($dir = __DIR__.'/'.$prefix) as $file)
92 92
 		{
93 93
 			if ($file == '..')
94 94
 			{
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 			$type = array(
108 108
 				'classname' => $class_name,
109
-				'description' => is_callable($function=$class_name.'::description') ? call_user_func($function) : $class_name,
109
+				'description' => is_callable($function = $class_name.'::description') ? call_user_func($function) : $class_name,
110 110
 			);
111 111
 			if ($imap) $type['protocol'] = 'imap';
112 112
 
Please login to merge, or discard this patch.
Braces   +20 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,10 +33,14 @@  discard block
 block discarded – undo
33 33
 			'extended' => $extended,
34 34
 		), array('managementserver'), true) as $app => $data)
35 35
 		{
36
-			if ($data && $app != 'emailadmin') $retData += $data;
36
+			if ($data && $app != 'emailadmin')
37
+			{
38
+				$retData += $data;
39
+			}
37 40
 		}
38 41
 
39
-		uksort($retData, function($a, $b) {
42
+		uksort($retData, function($a, $b)
43
+		{
40 44
 			static $prio = array(	// not explicitly mentioned get 0
41 45
 				'EGroupware\\Api\\Mail\\Smtp' => 9,
42 46
 				'EGroupware\\Api\\Mail\\Smtp\\Sql' => 8,
@@ -63,9 +67,13 @@  discard block
 block discarded – undo
63 67
 			'extended' => $extended,
64 68
 		), array('managementserver'), true) as $app => $data)
65 69
 		{
66
-			if ($data && $app != 'emailadmin') $retData += $data;
70
+			if ($data && $app != 'emailadmin')
71
+			{
72
+				$retData += $data;
73
+			}
67 74
 		}
68
-		uksort($retData, function($a, $b) {
75
+		uksort($retData, function($a, $b)
76
+		{
69 77
 			static $prio = array(	// not explicitly mentioned get 0
70 78
 				'EGroupware\\Api\\Mail\\Imap' => 9,
71 79
 				'managementserver_imap' => 8,
@@ -102,13 +110,19 @@  discard block
 block discarded – undo
102 110
 			{
103 111
 				continue;
104 112
 			}
105
-			if (!class_exists($class_name)) continue;
113
+			if (!class_exists($class_name))
114
+			{
115
+				continue;
116
+			}
106 117
 
107 118
 			$type = array(
108 119
 				'classname' => $class_name,
109 120
 				'description' => is_callable($function=$class_name.'::description') ? call_user_func($function) : $class_name,
110 121
 			);
111
-			if ($imap) $type['protocol'] = 'imap';
122
+			if ($imap)
123
+			{
124
+				$type['protocol'] = 'imap';
125
+			}
112 126
 
113 127
 			$types[$class_name] = $extended ? $type : $type['description'];
114 128
 		}
Please login to merge, or discard this patch.
api/src/Mail/Notifications.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 * @param boolean $return_empty_marker =false should we return null
53 53
 	 * @return array with values for "notify_folders", "notify_use_default"
54 54
 	 */
55
-	public static function read($acc_id, $account_id=null, $return_empty_marker=false)
55
+	public static function read($acc_id, $account_id = null, $return_empty_marker = false)
56 56
 	{
57 57
 		if (is_null($account_id))
58 58
 		{
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 			//error_log(__METHOD__."($acc_id, ".array2string($account_id).") nothing in cache");
72 72
 		}
73 73
 		$account_specific = 0;
74
-		foreach($rows as $row)
74
+		foreach ($rows as $row)
75 75
 		{
76 76
 			if ($row['account_id'])
77 77
 			{
@@ -109,19 +109,19 @@  discard block
 block discarded – undo
109 109
 	{
110 110
 		if (!is_numeric($account_id) || !($account_id >= 0))
111 111
 		{
112
-			return 0;	// nothing to save, happens eg. in setup
112
+			return 0; // nothing to save, happens eg. in setup
113 113
 		}
114 114
 
115 115
 		if ($account_id && !$folders && ($default = self::read($acc_id, 0)) && $default['notify_folders'])
116 116
 		{
117
-			$folders[] = null;	// we need to write a marker, that user wants no notifications!
117
+			$folders[] = null; // we need to write a marker, that user wants no notifications!
118 118
 		}
119
-		$old = self::read($acc_id, $account_id, true);	// true = return empty marker
120
-		if ($account_id && !$old['notify_account_id']) $old['notify_folders'] = array();	// ignore returned default
119
+		$old = self::read($acc_id, $account_id, true); // true = return empty marker
120
+		if ($account_id && !$old['notify_account_id']) $old['notify_folders'] = array(); // ignore returned default
121 121
 
122 122
 		$changed = 0;
123 123
 		// insert newly added ones
124
-		foreach(array_diff($folders, $old['notify_folders']) as $folder)
124
+		foreach (array_diff($folders, $old['notify_folders']) as $folder)
125 125
 		{
126 126
 			self::$db->insert(self::TABLE, array(
127 127
 				'acc_id' => $acc_id,
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 * @param int|array $account_id =null
157 157
 	 * @return int number of rows deleted
158 158
 	 */
159
-	public static function delete($acc_id, $account_id=null)
159
+	public static function delete($acc_id, $account_id = null)
160 160
 	{
161 161
 		if (!($acc_id > 0) && !isset($account_id))
162 162
 		{
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		self::$db->delete(self::TABLE, $where, __LINE__, __FILE__, self::APP);
170 170
 
171 171
 		// invalidate cache: we allways unset everything about an account to simplify cache handling
172
-		foreach($acc_id > 0 ? (array)$acc_id : array_keys(self::$cache) as $acc_id)
172
+		foreach ($acc_id > 0 ? (array)$acc_id : array_keys(self::$cache) as $acc_id)
173 173
 		{
174 174
 			unset(self::$cache[$acc_id]);
175 175
 		}
Please login to merge, or discard this patch.
Braces   +17 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,7 +88,10 @@  discard block
 block discarded – undo
88 88
 			}
89 89
 		}
90 90
 		$folders = (array)self::$cache[$acc_id][$account_specific];
91
-		if (!$return_empty_marker && $folders == array(null)) $folders = array();
91
+		if (!$return_empty_marker && $folders == array(null))
92
+		{
93
+			$folders = array();
94
+		}
92 95
 		$result = array(
93 96
 			'notify_folders' => $folders,
94 97
 			'notify_account_id' => $account_specific,
@@ -117,7 +120,11 @@  discard block
 block discarded – undo
117 120
 			$folders[] = null;	// we need to write a marker, that user wants no notifications!
118 121
 		}
119 122
 		$old = self::read($acc_id, $account_id, true);	// true = return empty marker
120
-		if ($account_id && !$old['notify_account_id']) $old['notify_folders'] = array();	// ignore returned default
123
+		if ($account_id && !$old['notify_account_id'])
124
+		{
125
+			$old['notify_folders'] = array();
126
+		}
127
+		// ignore returned default
121 128
 
122 129
 		$changed = 0;
123 130
 		// insert newly added ones
@@ -163,8 +170,14 @@  discard block
 block discarded – undo
163 170
 			throw new Api\Exception\WrongParameter(__METHOD__."() no acc_id AND no account_id parameter!");
164 171
 		}
165 172
 		$where = array();
166
-		if ($acc_id > 0) $where['acc_id'] = $acc_id;
167
-		if (isset($account_id)) $where['account_id'] = $account_id;
173
+		if ($acc_id > 0)
174
+		{
175
+			$where['acc_id'] = $acc_id;
176
+		}
177
+		if (isset($account_id))
178
+		{
179
+			$where['account_id'] = $account_id;
180
+		}
168 181
 
169 182
 		self::$db->delete(self::TABLE, $where, __LINE__, __FILE__, self::APP);
170 183
 
Please login to merge, or discard this patch.
api/asyncwrapper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@
 block discarded – undo
11 11
  * @version $Id$
12 12
  */
13 13
 
14
-$path_to_egroupware = realpath(__DIR__.'/..');	//  need to be adapted if this script is moved somewhere else
14
+$path_to_egroupware = realpath(__DIR__.'/..'); //  need to be adapted if this script is moved somewhere else
15 15
 $php = isset($_ENV['_']) ? $_ENV['_'] : $_SERVER['_'];
16 16
 
17
-foreach(file($path_to_egroupware. '/header.inc.php') as $line)
17
+foreach (file($path_to_egroupware.'/header.inc.php') as $line)
18 18
 {
19
-	if(preg_match("/GLOBALS\['egw_domain']\['(.*)']/", $line, $matches))
19
+	if (preg_match("/GLOBALS\['egw_domain']\['(.*)']/", $line, $matches))
20 20
 	{
21 21
 		// -d memory_limit=-1 --> no memory limit
22
-		system($php. ' -q -d memory_limit=-1 '.$path_to_egroupware.'/api/asyncservices.php '. $matches[1]);
22
+		system($php.' -q -d memory_limit=-1 '.$path_to_egroupware.'/api/asyncservices.php '.$matches[1]);
23 23
 	}
24 24
 }
Please login to merge, or discard this patch.
api/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 $etag = '"'.md5($config.$link_registry).'"';
33 33
 
34 34
 // headers to allow caching, egw_framework specifies etag on url to force reload, even with Expires header
35
-Api\Session::cache_control(86400);	// cache for one day
35
+Api\Session::cache_control(86400); // cache for one day
36 36
 Header('Content-Type: text/javascript; charset=utf-8');
37 37
 Header('ETag: '.$etag);
38 38
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $content .= 'egw.set_link_registry('.$link_registry.", undefined, egw && egw.window !== window);\n";
48 48
 
49 49
 // we run our own gzip compression, to set a correct Content-Length of the encoded content
50
-if (in_array('gzip', explode(',',$_SERVER['HTTP_ACCEPT_ENCODING'])) && function_exists('gzencode'))
50
+if (in_array('gzip', explode(',', $_SERVER['HTTP_ACCEPT_ENCODING'])) && function_exists('gzencode'))
51 51
 {
52 52
 	$content = gzencode($content);
53 53
 	header('Content-Encoding: gzip');
Please login to merge, or discard this patch.
api/setup/setup.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 $setup_info['api']['enable']    = 3;
18 18
 $setup_info['api']['app_order'] = 1;
19 19
 $setup_info['api']['license'] = 'GPL';
20
-$setup_info['api']['maintainer']	= $setup_info['api']['author']	= array(
20
+$setup_info['api']['maintainer'] = $setup_info['api']['author'] = array(
21 21
 	'name'  => 'EGroupware coreteam',
22 22
 	'email' => '[email protected]',
23 23
 );
@@ -126,5 +126,5 @@  discard block
 block discarded – undo
126 126
 	'email' => '[email protected]'
127 127
 );
128 128
 $setup_info['groupdav']['license'] = 'GPL';
129
-$setup_info['groupdav']['hooks']['preferences']	= 'EGroupware\\Api\\CalDAV\\Hooks::menus';
130
-$setup_info['groupdav']['hooks']['settings']	= 'EGroupware\\Api\\CalDAV\\Hooks::settings';
129
+$setup_info['groupdav']['hooks']['preferences'] = 'EGroupware\\Api\\CalDAV\\Hooks::menus';
130
+$setup_info['groupdav']['hooks']['settings'] = 'EGroupware\\Api\\CalDAV\\Hooks::settings';
Please login to merge, or discard this patch.
api/setup/tables_current.inc.php 1 patch
Spacing   +302 added lines, -302 removed lines patch added patch discarded remove patch
@@ -14,58 +14,58 @@  discard block
 block discarded – undo
14 14
 $phpgw_baseline = array(
15 15
 	'egw_config' => array(
16 16
 		'fd' => array(
17
-			'config_app' => array('type' => 'ascii','precision' => '16','nullable' => False),
18
-			'config_name' => array('type' => 'ascii','precision' => '32','nullable' => False),
17
+			'config_app' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False),
18
+			'config_name' => array('type' => 'ascii', 'precision' => '32', 'nullable' => False),
19 19
 			'config_value' => array('type' => 'text')
20 20
 		),
21
-		'pk' => array('config_app','config_name'),
21
+		'pk' => array('config_app', 'config_name'),
22 22
 		'fk' => array(),
23 23
 		'ix' => array(),
24 24
 		'uc' => array()
25 25
 	),
26 26
 	'egw_applications' => array(
27 27
 		'fd' => array(
28
-			'app_id' => array('type' => 'auto','precision' => '4','nullable' => False),
29
-			'app_name' => array('type' => 'ascii','precision' => '16','nullable' => False),
30
-			'app_enabled' => array('type' => 'int','precision' => '4','nullable' => False),
31
-			'app_order' => array('type' => 'int','precision' => '4','nullable' => False),
32
-			'app_tables' => array('type' => 'ascii','precision' => '8192','nullable' => False),
33
-			'app_version' => array('type' => 'ascii','precision' => '20','nullable' => False,'default' => '0.0'),
34
-			'app_icon' => array('type' => 'ascii','precision' => '32'),
35
-			'app_icon_app' => array('type' => 'ascii','precision' => '16'),
36
-			'app_index' => array('type' => 'ascii','precision' => '64')
28
+			'app_id' => array('type' => 'auto', 'precision' => '4', 'nullable' => False),
29
+			'app_name' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False),
30
+			'app_enabled' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
31
+			'app_order' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
32
+			'app_tables' => array('type' => 'ascii', 'precision' => '8192', 'nullable' => False),
33
+			'app_version' => array('type' => 'ascii', 'precision' => '20', 'nullable' => False, 'default' => '0.0'),
34
+			'app_icon' => array('type' => 'ascii', 'precision' => '32'),
35
+			'app_icon_app' => array('type' => 'ascii', 'precision' => '16'),
36
+			'app_index' => array('type' => 'ascii', 'precision' => '64')
37 37
 		),
38 38
 		'pk' => array('app_id'),
39 39
 		'fk' => array(),
40
-		'ix' => array(array('app_enabled','app_order')),
40
+		'ix' => array(array('app_enabled', 'app_order')),
41 41
 		'uc' => array('app_name')
42 42
 	),
43 43
 	'egw_acl' => array(
44 44
 		'fd' => array(
45
-			'acl_appname' => array('type' => 'ascii','precision' => '16','nullable' => False),
46
-			'acl_location' => array('type' => 'ascii','meta' => 'account','precision' => '16','nullable' => False),
47
-			'acl_account' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False),
48
-			'acl_rights' => array('type' => 'int','precision' => '4'),
49
-			'acl_id' => array('type' => 'auto','nullable' => False)
45
+			'acl_appname' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False),
46
+			'acl_location' => array('type' => 'ascii', 'meta' => 'account', 'precision' => '16', 'nullable' => False),
47
+			'acl_account' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False),
48
+			'acl_rights' => array('type' => 'int', 'precision' => '4'),
49
+			'acl_id' => array('type' => 'auto', 'nullable' => False)
50 50
 		),
51 51
 		'pk' => array('acl_id'),
52 52
 		'fk' => array(),
53
-		'ix' => array('acl_account',array('acl_location','acl_account'),array('acl_appname','acl_account')),
54
-		'uc' => array(array('acl_appname','acl_location','acl_account'))
53
+		'ix' => array('acl_account', array('acl_location', 'acl_account'), array('acl_appname', 'acl_account')),
54
+		'uc' => array(array('acl_appname', 'acl_location', 'acl_account'))
55 55
 	),
56 56
 	'egw_accounts' => array(
57 57
 		'fd' => array(
58
-			'account_id' => array('type' => 'auto','meta' => 'account-abs','nullable' => False),
59
-			'account_lid' => array('type' => 'varchar','precision' => '64','nullable' => False),
60
-			'account_pwd' => array('type' => 'varchar','precision' => '128','nullable' => False),
61
-			'account_lastlogin' => array('type' => 'int','precision' => '4'),
62
-			'account_lastloginfrom' => array('type' => 'ascii','precision' => '48','comment' => 'ip'),
63
-			'account_lastpwd_change' => array('type' => 'int','precision' => '4'),
64
-			'account_status' => array('type' => 'char','precision' => '1','nullable' => False,'default' => 'A'),
65
-			'account_expires' => array('type' => 'int','precision' => '4'),
66
-			'account_type' => array('type' => 'char','precision' => '1'),
67
-			'account_primary_group' => array('type' => 'int','meta' => 'group','precision' => '4','nullable' => False,'default' => '0'),
68
-			'account_description' => array('type' => 'varchar','precision' => '255','comment' => 'group description')
58
+			'account_id' => array('type' => 'auto', 'meta' => 'account-abs', 'nullable' => False),
59
+			'account_lid' => array('type' => 'varchar', 'precision' => '64', 'nullable' => False),
60
+			'account_pwd' => array('type' => 'varchar', 'precision' => '128', 'nullable' => False),
61
+			'account_lastlogin' => array('type' => 'int', 'precision' => '4'),
62
+			'account_lastloginfrom' => array('type' => 'ascii', 'precision' => '48', 'comment' => 'ip'),
63
+			'account_lastpwd_change' => array('type' => 'int', 'precision' => '4'),
64
+			'account_status' => array('type' => 'char', 'precision' => '1', 'nullable' => False, 'default' => 'A'),
65
+			'account_expires' => array('type' => 'int', 'precision' => '4'),
66
+			'account_type' => array('type' => 'char', 'precision' => '1'),
67
+			'account_primary_group' => array('type' => 'int', 'meta' => 'group', 'precision' => '4', 'nullable' => False, 'default' => '0'),
68
+			'account_description' => array('type' => 'varchar', 'precision' => '255', 'comment' => 'group description')
69 69
 		),
70 70
 		'pk' => array('account_id'),
71 71
 		'fk' => array(),
@@ -74,39 +74,39 @@  discard block
 block discarded – undo
74 74
 	),
75 75
 	'egw_preferences' => array(
76 76
 		'fd' => array(
77
-			'preference_owner' => array('type' => 'int','meta' => 'account-prefs','precision' => '4','nullable' => False),
78
-			'preference_app' => array('type' => 'ascii','precision' => '16','nullable' => False),
79
-			'preference_value' => array('type' => 'text','nullable' => False),
80
-			'preference_id' => array('type' => 'auto','nullable' => False)
77
+			'preference_owner' => array('type' => 'int', 'meta' => 'account-prefs', 'precision' => '4', 'nullable' => False),
78
+			'preference_app' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False),
79
+			'preference_value' => array('type' => 'text', 'nullable' => False),
80
+			'preference_id' => array('type' => 'auto', 'nullable' => False)
81 81
 		),
82 82
 		'pk' => array('preference_id'),
83 83
 		'fk' => array(),
84 84
 		'ix' => array(),
85
-		'uc' => array(array('preference_owner','preference_app'))
85
+		'uc' => array(array('preference_owner', 'preference_app'))
86 86
 	),
87 87
 	'egw_access_log' => array(
88 88
 		'fd' => array(
89
-			'sessionid' => array('type' => 'auto','nullable' => False,'comment' => 'primary key'),
90
-			'loginid' => array('type' => 'varchar','precision' => '64','nullable' => False,'comment' => 'username used to login'),
91
-			'ip' => array('type' => 'ascii','precision' => '48','nullable' => False,'comment' => 'ip of user'),
92
-			'li' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False,'comment' => 'TS if login'),
93
-			'lo' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'TD of logout'),
94
-			'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'default' => '0','comment' => 'numerical account id'),
95
-			'session_dla' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'TS of last user action'),
96
-			'session_action' => array('type' => 'ascii','precision' => '64','comment' => 'menuaction or path of last user action'),
97
-			'session_php' => array('type' => 'ascii','precision' => '64','nullable' => False,'comment' => 'php session-id or error-message'),
98
-			'notification_heartbeat' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'TS of last notification request'),
99
-			'user_agent' => array('type' => 'ascii','precision' => '255','comment' => 'User-agent of browser/device')
89
+			'sessionid' => array('type' => 'auto', 'nullable' => False, 'comment' => 'primary key'),
90
+			'loginid' => array('type' => 'varchar', 'precision' => '64', 'nullable' => False, 'comment' => 'username used to login'),
91
+			'ip' => array('type' => 'ascii', 'precision' => '48', 'nullable' => False, 'comment' => 'ip of user'),
92
+			'li' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'nullable' => False, 'comment' => 'TS if login'),
93
+			'lo' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'comment' => 'TD of logout'),
94
+			'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => 'numerical account id'),
95
+			'session_dla' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'comment' => 'TS of last user action'),
96
+			'session_action' => array('type' => 'ascii', 'precision' => '64', 'comment' => 'menuaction or path of last user action'),
97
+			'session_php' => array('type' => 'ascii', 'precision' => '64', 'nullable' => False, 'comment' => 'php session-id or error-message'),
98
+			'notification_heartbeat' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'comment' => 'TS of last notification request'),
99
+			'user_agent' => array('type' => 'ascii', 'precision' => '255', 'comment' => 'User-agent of browser/device')
100 100
 		),
101 101
 		'pk' => array('sessionid'),
102 102
 		'fk' => array(),
103
-		'ix' => array('li','lo','session_dla','session_php','notification_heartbeat',array('account_id','ip','li'),array('account_id','loginid','li')),
103
+		'ix' => array('li', 'lo', 'session_dla', 'session_php', 'notification_heartbeat', array('account_id', 'ip', 'li'), array('account_id', 'loginid', 'li')),
104 104
 		'uc' => array()
105 105
 	),
106 106
 	'egw_languages' => array(
107 107
 		'fd' => array(
108
-			'lang_id' => array('type' => 'ascii','precision' => '5','nullable' => False),
109
-			'lang_name' => array('type' => 'varchar','precision' => '50','nullable' => False)
108
+			'lang_id' => array('type' => 'ascii', 'precision' => '5', 'nullable' => False),
109
+			'lang_name' => array('type' => 'varchar', 'precision' => '50', 'nullable' => False)
110 110
 		),
111 111
 		'pk' => array('lang_id'),
112 112
 		'fk' => array(),
@@ -115,62 +115,62 @@  discard block
 block discarded – undo
115 115
 	),
116 116
 	'egw_lang' => array(
117 117
 		'fd' => array(
118
-			'lang' => array('type' => 'varchar','precision' => '5','nullable' => False,'default' => ''),
119
-			'app_name' => array('type' => 'ascii','precision' => '16','nullable' => False,'default' => 'common'),
120
-			'message_id' => array('type' => 'ascii','precision' => '128','nullable' => False,'default' => ''),
121
-			'content' => array('type' => 'varchar','precision' => '8192'),
122
-			'lang_id' => array('type' => 'auto','nullable' => False)
118
+			'lang' => array('type' => 'varchar', 'precision' => '5', 'nullable' => False, 'default' => ''),
119
+			'app_name' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False, 'default' => 'common'),
120
+			'message_id' => array('type' => 'ascii', 'precision' => '128', 'nullable' => False, 'default' => ''),
121
+			'content' => array('type' => 'varchar', 'precision' => '8192'),
122
+			'lang_id' => array('type' => 'auto', 'nullable' => False)
123 123
 		),
124 124
 		'pk' => array('lang_id'),
125 125
 		'fk' => array(),
126 126
 		'ix' => array(),
127
-		'uc' => array(array('lang','app_name','message_id'))
127
+		'uc' => array(array('lang', 'app_name', 'message_id'))
128 128
 	),
129 129
 	'egw_categories' => array(
130 130
 		'fd' => array(
131
-			'cat_id' => array('type' => 'auto','meta' => 'category','precision' => '4','nullable' => False),
132
-			'cat_main' => array('type' => 'int','meta' => 'category','precision' => '4','nullable' => False,'default' => '0'),
133
-			'cat_parent' => array('type' => 'int','meta' => 'category','precision' => '4','nullable' => False,'default' => '0'),
134
-			'cat_level' => array('type' => 'int','precision' => '2','nullable' => False,'default' => '0'),
135
-			'cat_owner' => array('type' => 'ascii','meta' => 'account-commasep','precision' => '255','nullable' => False,'default' => '0'),
136
-			'cat_access' => array('type' => 'ascii','precision' => '7'),
137
-			'cat_appname' => array('type' => 'ascii','precision' => '16','nullable' => False),
138
-			'cat_name' => array('type' => 'varchar','precision' => '150','nullable' => False),
139
-			'cat_description' => array('type' => 'varchar','precision' => '255','nullable' => False),
140
-			'cat_data' => array('type' => 'varchar','precision' => '8192'),
141
-			'last_mod' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False)
131
+			'cat_id' => array('type' => 'auto', 'meta' => 'category', 'precision' => '4', 'nullable' => False),
132
+			'cat_main' => array('type' => 'int', 'meta' => 'category', 'precision' => '4', 'nullable' => False, 'default' => '0'),
133
+			'cat_parent' => array('type' => 'int', 'meta' => 'category', 'precision' => '4', 'nullable' => False, 'default' => '0'),
134
+			'cat_level' => array('type' => 'int', 'precision' => '2', 'nullable' => False, 'default' => '0'),
135
+			'cat_owner' => array('type' => 'ascii', 'meta' => 'account-commasep', 'precision' => '255', 'nullable' => False, 'default' => '0'),
136
+			'cat_access' => array('type' => 'ascii', 'precision' => '7'),
137
+			'cat_appname' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False),
138
+			'cat_name' => array('type' => 'varchar', 'precision' => '150', 'nullable' => False),
139
+			'cat_description' => array('type' => 'varchar', 'precision' => '255', 'nullable' => False),
140
+			'cat_data' => array('type' => 'varchar', 'precision' => '8192'),
141
+			'last_mod' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'nullable' => False)
142 142
 		),
143 143
 		'pk' => array('cat_id'),
144 144
 		'fk' => array(),
145
-		'ix' => array(array('cat_appname','cat_owner','cat_parent','cat_level')),
145
+		'ix' => array(array('cat_appname', 'cat_owner', 'cat_parent', 'cat_level')),
146 146
 		'uc' => array()
147 147
 	),
148 148
 	'egw_history_log' => array(
149 149
 		'fd' => array(
150
-			'history_id' => array('type' => 'auto','precision' => '4','nullable' => False),
151
-			'history_record_id' => array('type' => 'int','precision' => '4','nullable' => False),
152
-			'history_appname' => array('type' => 'ascii','precision' => '16','nullable' => False),
153
-			'history_owner' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False),
154
-			'history_status' => array('type' => 'varchar','precision' => '32','nullable' => False),
155
-			'history_new_value' => array('type' => 'text','nullable' => False),
156
-			'history_timestamp' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'),
157
-			'history_old_value' => array('type' => 'text','nullable' => False),
158
-			'sessionid' => array('type' => 'int','precision' => '4','comment' => 'primary key to egw_access_log')
150
+			'history_id' => array('type' => 'auto', 'precision' => '4', 'nullable' => False),
151
+			'history_record_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
152
+			'history_appname' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False),
153
+			'history_owner' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False),
154
+			'history_status' => array('type' => 'varchar', 'precision' => '32', 'nullable' => False),
155
+			'history_new_value' => array('type' => 'text', 'nullable' => False),
156
+			'history_timestamp' => array('type' => 'timestamp', 'nullable' => False, 'default' => 'current_timestamp'),
157
+			'history_old_value' => array('type' => 'text', 'nullable' => False),
158
+			'sessionid' => array('type' => 'int', 'precision' => '4', 'comment' => 'primary key to egw_access_log')
159 159
 		),
160 160
 		'pk' => array('history_id'),
161 161
 		'fk' => array(),
162
-		'ix' => array(array('history_appname','history_record_id','history_id')),
162
+		'ix' => array(array('history_appname', 'history_record_id', 'history_id')),
163 163
 		'uc' => array()
164 164
 	),
165 165
 	'egw_async' => array(
166 166
 		'fd' => array(
167
-			'async_id' => array('type' => 'ascii','precision' => '64','nullable' => False),
168
-			'async_next' => array('type' => 'int','meta' => 'timestamp','precision' => '4','nullable' => False,'comment' => 'timestamp of next run'),
169
-			'async_times' => array('type' => 'ascii','precision' => '255','nullable' => False,'comment' => 'serialized array with values for keys hour,min,day,month,year'),
170
-			'async_method' => array('type' => 'ascii','precision' => '80','nullable' => False,'comment' => 'app.class.method class::method to execute'),
171
-			'async_data' => array('type' => 'varchar','precision' => '8192','nullable' => False,'comment' => 'serialized array with data to pass to method'),
172
-			'async_account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'default' => '0','comment' => 'creator of job'),
173
-			'async_auto_id' => array('type' => 'auto','nullable' => False)
167
+			'async_id' => array('type' => 'ascii', 'precision' => '64', 'nullable' => False),
168
+			'async_next' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '4', 'nullable' => False, 'comment' => 'timestamp of next run'),
169
+			'async_times' => array('type' => 'ascii', 'precision' => '255', 'nullable' => False, 'comment' => 'serialized array with values for keys hour,min,day,month,year'),
170
+			'async_method' => array('type' => 'ascii', 'precision' => '80', 'nullable' => False, 'comment' => 'app.class.method class::method to execute'),
171
+			'async_data' => array('type' => 'varchar', 'precision' => '8192', 'nullable' => False, 'comment' => 'serialized array with data to pass to method'),
172
+			'async_account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => 'creator of job'),
173
+			'async_auto_id' => array('type' => 'auto', 'nullable' => False)
174 174
 		),
175 175
 		'pk' => array('async_auto_id'),
176 176
 		'fk' => array(),
@@ -179,226 +179,226 @@  discard block
 block discarded – undo
179 179
 	),
180 180
 	'egw_links' => array(
181 181
 		'fd' => array(
182
-			'link_id' => array('type' => 'auto','nullable' => False),
183
-			'link_app1' => array('type' => 'ascii','precision' => '16','nullable' => False),
184
-			'link_id1' => array('type' => 'ascii','meta' => array("link_app1='api-accounts'" => 'account'),'precision' => '64','nullable' => False),
185
-			'link_app2' => array('type' => 'ascii','precision' => '16','nullable' => False),
186
-			'link_id2' => array('type' => 'ascii','meta' => array("link_app2='api-accounts'" => 'account'),'precision' => '64','nullable' => False),
187
-			'link_remark' => array('type' => 'varchar','precision' => '100'),
188
-			'link_lastmod' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False),
189
-			'link_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False),
182
+			'link_id' => array('type' => 'auto', 'nullable' => False),
183
+			'link_app1' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False),
184
+			'link_id1' => array('type' => 'ascii', 'meta' => array("link_app1='api-accounts'" => 'account'), 'precision' => '64', 'nullable' => False),
185
+			'link_app2' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False),
186
+			'link_id2' => array('type' => 'ascii', 'meta' => array("link_app2='api-accounts'" => 'account'), 'precision' => '64', 'nullable' => False),
187
+			'link_remark' => array('type' => 'varchar', 'precision' => '100'),
188
+			'link_lastmod' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'nullable' => False),
189
+			'link_owner' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False),
190 190
 			'deleted' => array('type' => 'timestamp')
191 191
 		),
192 192
 		'pk' => array('link_id'),
193 193
 		'fk' => array(),
194
-		'ix' => array('deleted',array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')),
194
+		'ix' => array('deleted', array('link_app1', 'link_id1', 'link_lastmod'), array('link_app2', 'link_id2', 'link_lastmod')),
195 195
 		'uc' => array()
196 196
 	),
197 197
 	'egw_addressbook' => array(
198 198
 		'fd' => array(
199
-			'contact_id' => array('type' => 'auto','nullable' => False),
200
-			'contact_tid' => array('type' => 'char','precision' => '1','default' => 'n'),
201
-			'contact_owner' => array('type' => 'int','meta' => 'account','precision' => '8','nullable' => False,'comment' => 'account or group id of the adressbook'),
202
-			'contact_private' => array('type' => 'int','precision' => '1','default' => '0','comment' => 'privat or personal'),
203
-			'cat_id' => array('type' => 'ascii','meta' => 'category','precision' => '255','comment' => 'Category(s)'),
204
-			'n_family' => array('type' => 'varchar','precision' => '64','comment' => 'Family name'),
205
-			'n_given' => array('type' => 'varchar','precision' => '64','comment' => 'Given Name'),
206
-			'n_middle' => array('type' => 'varchar','precision' => '64'),
207
-			'n_prefix' => array('type' => 'varchar','precision' => '64','comment' => 'Prefix'),
208
-			'n_suffix' => array('type' => 'varchar','precision' => '64','comment' => 'Suffix'),
209
-			'n_fn' => array('type' => 'varchar','precision' => '128','comment' => 'Full name'),
210
-			'n_fileas' => array('type' => 'varchar','precision' => '255','comment' => 'sort as'),
211
-			'contact_bday' => array('type' => 'varchar','precision' => '12','comment' => 'Birtday'),
212
-			'org_name' => array('type' => 'varchar','precision' => '128','comment' => 'Organisation'),
213
-			'org_unit' => array('type' => 'varchar','precision' => '64','comment' => 'Department'),
214
-			'contact_title' => array('type' => 'varchar','precision' => '64','comment' => 'jobtittle'),
215
-			'contact_role' => array('type' => 'varchar','precision' => '64','comment' => 'role'),
216
-			'contact_assistent' => array('type' => 'varchar','precision' => '64','comment' => 'Name of the Assistent (for phone number)'),
217
-			'contact_room' => array('type' => 'varchar','precision' => '64','comment' => 'room'),
218
-			'adr_one_street' => array('type' => 'varchar','precision' => '64','comment' => 'street (business)'),
219
-			'adr_one_street2' => array('type' => 'varchar','precision' => '64','comment' => 'street (business) - 2. line'),
220
-			'adr_one_locality' => array('type' => 'varchar','precision' => '64','comment' => 'city (business)'),
221
-			'adr_one_region' => array('type' => 'varchar','precision' => '64','comment' => 'region (business)'),
222
-			'adr_one_postalcode' => array('type' => 'varchar','precision' => '64','comment' => 'postalcode (business)'),
223
-			'adr_one_countryname' => array('type' => 'varchar','precision' => '64','comment' => 'countryname (business)'),
224
-			'contact_label' => array('type' => 'text','comment' => 'currently not used'),
225
-			'adr_two_street' => array('type' => 'varchar','precision' => '64','comment' => 'street (private)'),
226
-			'adr_two_street2' => array('type' => 'varchar','precision' => '64','comment' => 'street (private) - 2. line'),
227
-			'adr_two_locality' => array('type' => 'varchar','precision' => '64','comment' => 'city (private)'),
228
-			'adr_two_region' => array('type' => 'varchar','precision' => '64','comment' => 'region (private)'),
229
-			'adr_two_postalcode' => array('type' => 'varchar','precision' => '64','comment' => 'postalcode (private)'),
230
-			'adr_two_countryname' => array('type' => 'varchar','precision' => '64','comment' => 'countryname (private)'),
231
-			'tel_work' => array('type' => 'varchar','precision' => '40','comment' => 'phone-number (business)'),
232
-			'tel_cell' => array('type' => 'varchar','precision' => '40','comment' => 'mobil phone (business)'),
233
-			'tel_fax' => array('type' => 'varchar','precision' => '40','comment' => 'fax-number (business)'),
234
-			'tel_assistent' => array('type' => 'varchar','precision' => '40','comment' => 'phone-number assistent'),
235
-			'tel_car' => array('type' => 'varchar','precision' => '40'),
236
-			'tel_pager' => array('type' => 'varchar','precision' => '40','comment' => 'pager'),
237
-			'tel_home' => array('type' => 'varchar','precision' => '40','comment' => 'phone-number (private)'),
238
-			'tel_fax_home' => array('type' => 'varchar','precision' => '40','comment' => 'fax-number (private)'),
239
-			'tel_cell_private' => array('type' => 'varchar','precision' => '40','comment' => 'mobil phone (private)'),
240
-			'tel_other' => array('type' => 'varchar','precision' => '40','comment' => 'other phone'),
241
-			'tel_prefer' => array('type' => 'varchar','precision' => '32','comment' => 'prefered phone-number'),
242
-			'contact_email' => array('type' => 'varchar','precision' => '128','comment' => 'email address (business)'),
243
-			'contact_email_home' => array('type' => 'varchar','precision' => '128','comment' => 'email address (private)'),
244
-			'contact_url' => array('type' => 'varchar','precision' => '128','comment' => 'website (business)'),
245
-			'contact_url_home' => array('type' => 'varchar','precision' => '128','comment' => 'website (private)'),
246
-			'contact_freebusy_uri' => array('type' => 'ascii','precision' => '128','comment' => 'freebusy-url for calendar of the contact'),
247
-			'contact_calendar_uri' => array('type' => 'ascii','precision' => '128','comment' => 'url for users calendar - currently not used'),
248
-			'contact_note' => array('type' => 'varchar','precision' => '8192','comment' => 'notes field'),
249
-			'contact_tz' => array('type' => 'varchar','precision' => '8','comment' => 'timezone difference'),
250
-			'contact_geo' => array('type' => 'ascii','precision' => '32','comment' => 'currently not used'),
251
-			'contact_pubkey' => array('type' => 'ascii','precision' => '16384','comment' => 'public key'),
252
-			'contact_created' => array('type' => 'int','meta' => 'timestamp','precision' => '8','comment' => 'timestamp of the creation'),
253
-			'contact_creator' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'account id of the creator'),
254
-			'contact_modified' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False,'comment' => 'timestamp of the last modified'),
255
-			'contact_modifier' => array('type' => 'int','meta' => 'user','precision' => '4','comment' => 'account id of the last modified'),
256
-			'contact_jpegphoto' => array('type' => 'blob','comment' => 'photo of the contact (attachment)'),
257
-			'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','comment' => 'account id'),
258
-			'contact_etag' => array('type' => 'int','precision' => '4','default' => '0','comment' => 'etag of the changes'),
259
-			'contact_uid' => array('type' => 'ascii','precision' => '128','comment' => 'unique id of the contact'),
260
-			'adr_one_countrycode' => array('type' => 'ascii','precision' => '2','comment' => 'countrycode (business)'),
261
-			'adr_two_countrycode' => array('type' => 'ascii','precision' => '2','comment' => 'countrycode (private)'),
262
-			'carddav_name' => array('type' => 'ascii','precision' => '128','comment' => 'name part of CardDAV URL, if specified by client')
199
+			'contact_id' => array('type' => 'auto', 'nullable' => False),
200
+			'contact_tid' => array('type' => 'char', 'precision' => '1', 'default' => 'n'),
201
+			'contact_owner' => array('type' => 'int', 'meta' => 'account', 'precision' => '8', 'nullable' => False, 'comment' => 'account or group id of the adressbook'),
202
+			'contact_private' => array('type' => 'int', 'precision' => '1', 'default' => '0', 'comment' => 'privat or personal'),
203
+			'cat_id' => array('type' => 'ascii', 'meta' => 'category', 'precision' => '255', 'comment' => 'Category(s)'),
204
+			'n_family' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'Family name'),
205
+			'n_given' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'Given Name'),
206
+			'n_middle' => array('type' => 'varchar', 'precision' => '64'),
207
+			'n_prefix' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'Prefix'),
208
+			'n_suffix' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'Suffix'),
209
+			'n_fn' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'Full name'),
210
+			'n_fileas' => array('type' => 'varchar', 'precision' => '255', 'comment' => 'sort as'),
211
+			'contact_bday' => array('type' => 'varchar', 'precision' => '12', 'comment' => 'Birtday'),
212
+			'org_name' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'Organisation'),
213
+			'org_unit' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'Department'),
214
+			'contact_title' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'jobtittle'),
215
+			'contact_role' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'role'),
216
+			'contact_assistent' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'Name of the Assistent (for phone number)'),
217
+			'contact_room' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'room'),
218
+			'adr_one_street' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'street (business)'),
219
+			'adr_one_street2' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'street (business) - 2. line'),
220
+			'adr_one_locality' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'city (business)'),
221
+			'adr_one_region' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'region (business)'),
222
+			'adr_one_postalcode' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'postalcode (business)'),
223
+			'adr_one_countryname' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'countryname (business)'),
224
+			'contact_label' => array('type' => 'text', 'comment' => 'currently not used'),
225
+			'adr_two_street' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'street (private)'),
226
+			'adr_two_street2' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'street (private) - 2. line'),
227
+			'adr_two_locality' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'city (private)'),
228
+			'adr_two_region' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'region (private)'),
229
+			'adr_two_postalcode' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'postalcode (private)'),
230
+			'adr_two_countryname' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'countryname (private)'),
231
+			'tel_work' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'phone-number (business)'),
232
+			'tel_cell' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'mobil phone (business)'),
233
+			'tel_fax' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'fax-number (business)'),
234
+			'tel_assistent' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'phone-number assistent'),
235
+			'tel_car' => array('type' => 'varchar', 'precision' => '40'),
236
+			'tel_pager' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'pager'),
237
+			'tel_home' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'phone-number (private)'),
238
+			'tel_fax_home' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'fax-number (private)'),
239
+			'tel_cell_private' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'mobil phone (private)'),
240
+			'tel_other' => array('type' => 'varchar', 'precision' => '40', 'comment' => 'other phone'),
241
+			'tel_prefer' => array('type' => 'varchar', 'precision' => '32', 'comment' => 'prefered phone-number'),
242
+			'contact_email' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'email address (business)'),
243
+			'contact_email_home' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'email address (private)'),
244
+			'contact_url' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'website (business)'),
245
+			'contact_url_home' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'website (private)'),
246
+			'contact_freebusy_uri' => array('type' => 'ascii', 'precision' => '128', 'comment' => 'freebusy-url for calendar of the contact'),
247
+			'contact_calendar_uri' => array('type' => 'ascii', 'precision' => '128', 'comment' => 'url for users calendar - currently not used'),
248
+			'contact_note' => array('type' => 'varchar', 'precision' => '8192', 'comment' => 'notes field'),
249
+			'contact_tz' => array('type' => 'varchar', 'precision' => '8', 'comment' => 'timezone difference'),
250
+			'contact_geo' => array('type' => 'ascii', 'precision' => '32', 'comment' => 'currently not used'),
251
+			'contact_pubkey' => array('type' => 'ascii', 'precision' => '16384', 'comment' => 'public key'),
252
+			'contact_created' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'comment' => 'timestamp of the creation'),
253
+			'contact_creator' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'comment' => 'account id of the creator'),
254
+			'contact_modified' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'nullable' => False, 'comment' => 'timestamp of the last modified'),
255
+			'contact_modifier' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'comment' => 'account id of the last modified'),
256
+			'contact_jpegphoto' => array('type' => 'blob', 'comment' => 'photo of the contact (attachment)'),
257
+			'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'comment' => 'account id'),
258
+			'contact_etag' => array('type' => 'int', 'precision' => '4', 'default' => '0', 'comment' => 'etag of the changes'),
259
+			'contact_uid' => array('type' => 'ascii', 'precision' => '128', 'comment' => 'unique id of the contact'),
260
+			'adr_one_countrycode' => array('type' => 'ascii', 'precision' => '2', 'comment' => 'countrycode (business)'),
261
+			'adr_two_countrycode' => array('type' => 'ascii', 'precision' => '2', 'comment' => 'countrycode (private)'),
262
+			'carddav_name' => array('type' => 'ascii', 'precision' => '128', 'comment' => 'name part of CardDAV URL, if specified by client')
263 263
 		),
264 264
 		'pk' => array('contact_id'),
265 265
 		'fk' => array(),
266
-		'ix' => array('contact_owner','cat_id','n_fileas','contact_modified','contact_uid','carddav_name',array('n_family','n_given'),array('n_given','n_family'),array('org_name','n_family','n_given')),
266
+		'ix' => array('contact_owner', 'cat_id', 'n_fileas', 'contact_modified', 'contact_uid', 'carddav_name', array('n_family', 'n_given'), array('n_given', 'n_family'), array('org_name', 'n_family', 'n_given')),
267 267
 		'uc' => array('account_id')
268 268
 	),
269 269
 	'egw_addressbook_extra' => array(
270 270
 		'fd' => array(
271
-			'contact_id' => array('type' => 'int','precision' => '4','nullable' => False),
272
-			'contact_owner' => array('type' => 'int','meta' => 'account','precision' => '8'),
273
-			'contact_name' => array('type' => 'varchar','meta' => 'cfname','precision' => '64','nullable' => False,'comment' => 'custom-field name'),
274
-			'contact_value' => array('type' => 'varchar','meta' => 'cfvalue','precision' => '16384','comment' => 'custom-field value'),
275
-			'contact_extra_id' => array('type' => 'auto','nullable' => False)
271
+			'contact_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
272
+			'contact_owner' => array('type' => 'int', 'meta' => 'account', 'precision' => '8'),
273
+			'contact_name' => array('type' => 'varchar', 'meta' => 'cfname', 'precision' => '64', 'nullable' => False, 'comment' => 'custom-field name'),
274
+			'contact_value' => array('type' => 'varchar', 'meta' => 'cfvalue', 'precision' => '16384', 'comment' => 'custom-field value'),
275
+			'contact_extra_id' => array('type' => 'auto', 'nullable' => False)
276 276
 		),
277 277
 		'pk' => array('contact_extra_id'),
278 278
 		'fk' => array(),
279
-		'ix' => array('contact_name',array('contact_id','contact_name')),
279
+		'ix' => array('contact_name', array('contact_id', 'contact_name')),
280 280
 		'uc' => array()
281 281
 	),
282 282
 	'egw_addressbook_lists' => array(
283 283
 		'fd' => array(
284
-			'list_id' => array('type' => 'auto','nullable' => False),
285
-			'list_name' => array('type' => 'varchar','precision' => '80','nullable' => False),
286
-			'list_owner' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False),
287
-			'list_created' => array('type' => 'int','meta' => 'timestamp','precision' => '8'),
288
-			'list_creator' => array('type' => 'int','meta' => 'user','precision' => '4'),
289
-			'list_uid' => array('type' => 'ascii','precision' => '128'),
290
-			'list_carddav_name' => array('type' => 'ascii','precision' => '128'),
291
-			'list_etag' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
292
-			'list_modified' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'),
293
-			'list_modifier' => array('type' => 'int','meta' => 'user','precision' => '4')
284
+			'list_id' => array('type' => 'auto', 'nullable' => False),
285
+			'list_name' => array('type' => 'varchar', 'precision' => '80', 'nullable' => False),
286
+			'list_owner' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False),
287
+			'list_created' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8'),
288
+			'list_creator' => array('type' => 'int', 'meta' => 'user', 'precision' => '4'),
289
+			'list_uid' => array('type' => 'ascii', 'precision' => '128'),
290
+			'list_carddav_name' => array('type' => 'ascii', 'precision' => '128'),
291
+			'list_etag' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '0'),
292
+			'list_modified' => array('type' => 'timestamp', 'nullable' => False, 'default' => 'current_timestamp'),
293
+			'list_modifier' => array('type' => 'int', 'meta' => 'user', 'precision' => '4')
294 294
 		),
295 295
 		'pk' => array('list_id'),
296 296
 		'fk' => array(),
297 297
 		'ix' => array(),
298
-		'uc' => array('list_uid','list_carddav_name',array('list_owner','list_name'))
298
+		'uc' => array('list_uid', 'list_carddav_name', array('list_owner', 'list_name'))
299 299
 	),
300 300
 	'egw_addressbook2list' => array(
301 301
 		'fd' => array(
302
-			'contact_id' => array('type' => 'int','precision' => '4','nullable' => False),
303
-			'list_id' => array('type' => 'int','precision' => '4','nullable' => False),
304
-			'list_added' => array('type' => 'int','meta' => 'timestamp','precision' => '8'),
305
-			'list_added_by' => array('type' => 'int','meta' => 'user','precision' => '4')
302
+			'contact_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
303
+			'list_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
304
+			'list_added' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8'),
305
+			'list_added_by' => array('type' => 'int', 'meta' => 'user', 'precision' => '4')
306 306
 		),
307
-		'pk' => array('contact_id','list_id'),
307
+		'pk' => array('contact_id', 'list_id'),
308 308
 		'fk' => array(),
309 309
 		'ix' => array(),
310 310
 		'uc' => array()
311 311
 	),
312 312
 	'egw_sqlfs' => array(
313 313
 		'fd' => array(
314
-			'fs_id' => array('type' => 'auto','nullable' => False),
315
-			'fs_dir' => array('type' => 'int','precision' => '4','nullable' => False),
316
-			'fs_name' => array('type' => 'varchar','precision' => '200','nullable' => False),
317
-			'fs_mode' => array('type' => 'int','precision' => '2','nullable' => False),
318
-			'fs_uid' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'default' => '0'),
319
-			'fs_gid' => array('type' => 'int','meta' => 'group-abs','precision' => '4','nullable' => False,'default' => '0'),
320
-			'fs_created' => array('type' => 'timestamp','precision' => '8','nullable' => False),
321
-			'fs_modified' => array('type' => 'timestamp','precision' => '8','nullable' => False),
322
-			'fs_mime' => array('type' => 'ascii','precision' => '96','nullable' => False),
323
-			'fs_size' => array('type' => 'int','precision' => '8','nullable' => False),
324
-			'fs_creator' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False),
325
-			'fs_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'),
326
-			'fs_active' => array('type' => 'bool','nullable' => False,'default' => 't'),
314
+			'fs_id' => array('type' => 'auto', 'nullable' => False),
315
+			'fs_dir' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
316
+			'fs_name' => array('type' => 'varchar', 'precision' => '200', 'nullable' => False),
317
+			'fs_mode' => array('type' => 'int', 'precision' => '2', 'nullable' => False),
318
+			'fs_uid' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'default' => '0'),
319
+			'fs_gid' => array('type' => 'int', 'meta' => 'group-abs', 'precision' => '4', 'nullable' => False, 'default' => '0'),
320
+			'fs_created' => array('type' => 'timestamp', 'precision' => '8', 'nullable' => False),
321
+			'fs_modified' => array('type' => 'timestamp', 'precision' => '8', 'nullable' => False),
322
+			'fs_mime' => array('type' => 'ascii', 'precision' => '96', 'nullable' => False),
323
+			'fs_size' => array('type' => 'int', 'precision' => '8', 'nullable' => False),
324
+			'fs_creator' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False),
325
+			'fs_modifier' => array('type' => 'int', 'meta' => 'user', 'precision' => '4'),
326
+			'fs_active' => array('type' => 'bool', 'nullable' => False, 'default' => 't'),
327 327
 			'fs_content' => array('type' => 'blob'),
328
-			'fs_link' => array('type' => 'varchar','precision' => '255')
328
+			'fs_link' => array('type' => 'varchar', 'precision' => '255')
329 329
 		),
330 330
 		'pk' => array('fs_id'),
331 331
 		'fk' => array(),
332
-		'ix' => array(array('fs_dir','fs_active','fs_name(16)')),
332
+		'ix' => array(array('fs_dir', 'fs_active', 'fs_name(16)')),
333 333
 		'uc' => array()
334 334
 	),
335 335
 	'egw_locks' => array(
336 336
 		'fd' => array(
337
-			'lock_token' => array('type' => 'ascii','precision' => '64','nullable' => False),
338
-			'lock_path' => array('type' => 'varchar','precision' => '255','nullable' => False),
339
-			'lock_expires' => array('type' => 'int','meta' => 'timestamp','precision' => '8','nullable' => False),
340
-			'lock_owner' => array('type' => 'varchar','precision' => '255'),
341
-			'lock_recursive' => array('type' => 'bool','nullable' => False,'default' => '0'),
342
-			'lock_write' => array('type' => 'bool','nullable' => False,'default' => '0'),
343
-			'lock_exclusive' => array('type' => 'bool','nullable' => False,'default' => '0'),
344
-			'lock_created' => array('type' => 'int','meta' => 'timestamp','precision' => '8','default' => '0'),
345
-			'lock_modified' => array('type' => 'int','meta' => 'timestamp','precision' => '8','default' => '0'),
346
-			'lock_id' => array('type' => 'auto','nullable' => False)
337
+			'lock_token' => array('type' => 'ascii', 'precision' => '64', 'nullable' => False),
338
+			'lock_path' => array('type' => 'varchar', 'precision' => '255', 'nullable' => False),
339
+			'lock_expires' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'nullable' => False),
340
+			'lock_owner' => array('type' => 'varchar', 'precision' => '255'),
341
+			'lock_recursive' => array('type' => 'bool', 'nullable' => False, 'default' => '0'),
342
+			'lock_write' => array('type' => 'bool', 'nullable' => False, 'default' => '0'),
343
+			'lock_exclusive' => array('type' => 'bool', 'nullable' => False, 'default' => '0'),
344
+			'lock_created' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'default' => '0'),
345
+			'lock_modified' => array('type' => 'int', 'meta' => 'timestamp', 'precision' => '8', 'default' => '0'),
346
+			'lock_id' => array('type' => 'auto', 'nullable' => False)
347 347
 		),
348 348
 		'pk' => array('lock_id'),
349 349
 		'fk' => array(),
350
-		'ix' => array('lock_path','lock_expires'),
350
+		'ix' => array('lock_path', 'lock_expires'),
351 351
 		'uc' => array('lock_token')
352 352
 	),
353 353
 	'egw_sqlfs_props' => array(
354 354
 		'fd' => array(
355
-			'fs_id' => array('type' => 'int','precision' => '4','nullable' => False),
356
-			'prop_namespace' => array('type' => 'ascii','precision' => '64','nullable' => False),
357
-			'prop_name' => array('type' => 'ascii','precision' => '64','nullable' => False),
358
-			'prop_value' => array('type' => 'varchar','precision' => '16384'),
359
-			'prop_id' => array('type' => 'auto','nullable' => False)
355
+			'fs_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
356
+			'prop_namespace' => array('type' => 'ascii', 'precision' => '64', 'nullable' => False),
357
+			'prop_name' => array('type' => 'ascii', 'precision' => '64', 'nullable' => False),
358
+			'prop_value' => array('type' => 'varchar', 'precision' => '16384'),
359
+			'prop_id' => array('type' => 'auto', 'nullable' => False)
360 360
 		),
361 361
 		'pk' => array('prop_id'),
362 362
 		'fk' => array(),
363
-		'ix' => array(array('fs_id','prop_namespace','prop_name')),
363
+		'ix' => array(array('fs_id', 'prop_namespace', 'prop_name')),
364 364
 		'uc' => array()
365 365
 	),
366 366
 	'egw_customfields' => array(
367 367
 		'fd' => array(
368
-			'cf_id' => array('type' => 'auto','nullable' => False),
369
-			'cf_app' => array('type' => 'ascii','precision' => '16','nullable' => False,'comment' => 'app-name cf belongs too'),
370
-			'cf_name' => array('type' => 'varchar','precision' => '128','nullable' => False,'comment' => 'internal name'),
371
-			'cf_label' => array('type' => 'varchar','precision' => '128','comment' => 'label to display'),
372
-			'cf_type' => array('type' => 'varchar','precision' => '64','nullable' => False,'default' => 'text','comment' => 'type of field'),
373
-			'cf_type2' => array('type' => 'varchar','precision' => '2048','comment' => 'comma-separated subtypes of app, cf is valid for'),
374
-			'cf_help' => array('type' => 'varchar','precision' => '256','comment' => 'helptext'),
375
-			'cf_values' => array('type' => 'varchar','precision' => '8096','comment' => 'json object with value label pairs'),
376
-			'cf_len' => array('type' => 'int','precision' => '2','comment' => 'length or columns of field'),
377
-			'cf_rows' => array('type' => 'int','precision' => '2','comment' => 'rows of field'),
378
-			'cf_order' => array('type' => 'int','precision' => '2','comment' => 'order to display fields'),
379
-			'cf_needed' => array('type' => 'bool','default' => '0','comment' => 'field is required'),
380
-			'cf_private' => array('type' => 'ascii','meta' => 'account-commasep','precision' => '2048','comment' => 'comma-separated account_id'),
381
-			'cf_modifier' => array('type' => 'int','meta' => 'account','precision' => '4','comment' => 'last modifier'),
382
-			'cf_modified' => array('type' => 'timestamp','default' => 'current_timestamp','comment' => 'last modification time'),
383
-			'cf_tab' => array('type' => 'varchar','precision' => '64','comment' => 'tab customfield should be shown')
368
+			'cf_id' => array('type' => 'auto', 'nullable' => False),
369
+			'cf_app' => array('type' => 'ascii', 'precision' => '16', 'nullable' => False, 'comment' => 'app-name cf belongs too'),
370
+			'cf_name' => array('type' => 'varchar', 'precision' => '128', 'nullable' => False, 'comment' => 'internal name'),
371
+			'cf_label' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'label to display'),
372
+			'cf_type' => array('type' => 'varchar', 'precision' => '64', 'nullable' => False, 'default' => 'text', 'comment' => 'type of field'),
373
+			'cf_type2' => array('type' => 'varchar', 'precision' => '2048', 'comment' => 'comma-separated subtypes of app, cf is valid for'),
374
+			'cf_help' => array('type' => 'varchar', 'precision' => '256', 'comment' => 'helptext'),
375
+			'cf_values' => array('type' => 'varchar', 'precision' => '8096', 'comment' => 'json object with value label pairs'),
376
+			'cf_len' => array('type' => 'int', 'precision' => '2', 'comment' => 'length or columns of field'),
377
+			'cf_rows' => array('type' => 'int', 'precision' => '2', 'comment' => 'rows of field'),
378
+			'cf_order' => array('type' => 'int', 'precision' => '2', 'comment' => 'order to display fields'),
379
+			'cf_needed' => array('type' => 'bool', 'default' => '0', 'comment' => 'field is required'),
380
+			'cf_private' => array('type' => 'ascii', 'meta' => 'account-commasep', 'precision' => '2048', 'comment' => 'comma-separated account_id'),
381
+			'cf_modifier' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'comment' => 'last modifier'),
382
+			'cf_modified' => array('type' => 'timestamp', 'default' => 'current_timestamp', 'comment' => 'last modification time'),
383
+			'cf_tab' => array('type' => 'varchar', 'precision' => '64', 'comment' => 'tab customfield should be shown')
384 384
 		),
385 385
 		'pk' => array('cf_id'),
386 386
 		'fk' => array(),
387
-		'ix' => array(array('cf_app','cf_order')),
388
-		'uc' => array(array('cf_app','cf_name'))
387
+		'ix' => array(array('cf_app', 'cf_order')),
388
+		'uc' => array(array('cf_app', 'cf_name'))
389 389
 	),
390 390
 	'egw_sharing' => array(
391 391
 		'fd' => array(
392
-			'share_id' => array('type' => 'auto','nullable' => False,'comment' => 'auto-id'),
393
-			'share_token' => array('type' => 'ascii','precision' => '64','nullable' => False,'comment' => 'secure token'),
394
-			'share_path' => array('type' => 'varchar','precision' => '255','nullable' => False,'comment' => 'path to share'),
395
-			'share_owner' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'owner of share'),
396
-			'share_expires' => array('type' => 'date','comment' => 'expire date of share'),
397
-			'share_writable' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=readable, 1=writable'),
398
-			'share_with' => array('type' => 'varchar','precision' => '4096','comment' => 'email addresses, comma seperated'),
399
-			'share_passwd' => array('type' => 'varchar','precision' => '128','comment' => 'optional password-hash'),
400
-			'share_created' => array('type' => 'timestamp','nullable' => False,'comment' => 'creation date'),
401
-			'share_last_accessed' => array('type' => 'timestamp','comment' => 'last access of share')
392
+			'share_id' => array('type' => 'auto', 'nullable' => False, 'comment' => 'auto-id'),
393
+			'share_token' => array('type' => 'ascii', 'precision' => '64', 'nullable' => False, 'comment' => 'secure token'),
394
+			'share_path' => array('type' => 'varchar', 'precision' => '255', 'nullable' => False, 'comment' => 'path to share'),
395
+			'share_owner' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'comment' => 'owner of share'),
396
+			'share_expires' => array('type' => 'date', 'comment' => 'expire date of share'),
397
+			'share_writable' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'default' => '0', 'comment' => '0=readable, 1=writable'),
398
+			'share_with' => array('type' => 'varchar', 'precision' => '4096', 'comment' => 'email addresses, comma seperated'),
399
+			'share_passwd' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'optional password-hash'),
400
+			'share_created' => array('type' => 'timestamp', 'nullable' => False, 'comment' => 'creation date'),
401
+			'share_last_accessed' => array('type' => 'timestamp', 'comment' => 'last access of share')
402 402
 		),
403 403
 		'pk' => array('share_id'),
404 404
 		'fk' => array(),
@@ -407,49 +407,49 @@  discard block
 block discarded – undo
407 407
 	),
408 408
 	'egw_mailaccounts' => array(
409 409
 		'fd' => array(
410
-			'mail_id' => array('type' => 'auto','nullable' => False,'comment' => 'the id'),
411
-			'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False,'comment' => 'account id of the owner, can be user AND group'),
412
-			'mail_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '0=active, 1=alias, 2=forward, 3=forwardOnly, 4=quota'),
413
-			'mail_value' => array('type' => 'ascii','precision' => '128','nullable' => False,'comment' => 'the value (that should be) corresponding to the mail_type')
410
+			'mail_id' => array('type' => 'auto', 'nullable' => False, 'comment' => 'the id'),
411
+			'account_id' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False, 'comment' => 'account id of the owner, can be user AND group'),
412
+			'mail_type' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'comment' => '0=active, 1=alias, 2=forward, 3=forwardOnly, 4=quota'),
413
+			'mail_value' => array('type' => 'ascii', 'precision' => '128', 'nullable' => False, 'comment' => 'the value (that should be) corresponding to the mail_type')
414 414
 		),
415 415
 		'pk' => array('mail_id'),
416 416
 		'fk' => array(),
417
-		'ix' => array('mail_value',array('account_id','mail_type')),
417
+		'ix' => array('mail_value', array('account_id', 'mail_type')),
418 418
 		'uc' => array()
419 419
 	),
420 420
 	'egw_ea_accounts' => array(
421 421
 		'fd' => array(
422
-			'acc_id' => array('type' => 'auto','nullable' => False),
423
-			'acc_name' => array('type' => 'varchar','precision' => '80','comment' => 'description'),
424
-			'ident_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'standard identity'),
425
-			'acc_imap_host' => array('type' => 'ascii','precision' => '128','nullable' => False,'comment' => 'imap hostname'),
426
-			'acc_imap_ssl' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
427
-			'acc_imap_port' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '143','comment' => 'imap port'),
428
-			'acc_sieve_enabled' => array('type' => 'bool','default' => '0','comment' => 'sieve enabled'),
429
-			'acc_sieve_host' => array('type' => 'ascii','precision' => '128','comment' => 'sieve host, default imap_host'),
430
-			'acc_sieve_port' => array('type' => 'int','precision' => '4','default' => '4190'),
431
-			'acc_folder_sent' => array('type' => 'varchar','precision' => '128','comment' => 'sent folder'),
432
-			'acc_folder_trash' => array('type' => 'varchar','precision' => '128','comment' => 'trash folder'),
433
-			'acc_folder_draft' => array('type' => 'varchar','precision' => '128','comment' => 'draft folder'),
434
-			'acc_folder_template' => array('type' => 'varchar','precision' => '128','comment' => 'template folder'),
435
-			'acc_folder_archive' => array('type' => 'varchar','precision' => '128','comment' => 'archive folder'),
436
-			'acc_smtp_host' => array('type' => 'varchar','precision' => '128','comment' => 'smtp hostname'),
437
-			'acc_smtp_ssl' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
438
-			'acc_smtp_port' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '25','comment' => 'smtp port'),
439
-			'acc_smtp_type' => array('type' => 'ascii','precision' => '32','default' => 'emailadmin_smtp','comment' => 'smtp class to use'),
440
-			'acc_imap_type' => array('type' => 'ascii','precision' => '32','default' => 'emailadmin_imap','comment' => 'imap class to use'),
441
-			'acc_imap_logintype' => array('type' => 'ascii','precision' => '20','comment' => 'standard, vmailmgr, admin, uidNumber'),
442
-			'acc_domain' => array('type' => 'varchar','precision' => '100','comment' => 'domain name'),
443
-			'acc_further_identities' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'),
444
-			'acc_user_editable' => array('type' => 'bool','nullable' => False,'default' => '1','comment' => '0=no, 1=yes'),
445
-			'acc_sieve_ssl' => array('type' => 'int','precision' => '1','default' => '1','comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
446
-			'acc_modified' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'),
447
-			'acc_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'),
448
-			'acc_smtp_auth_session' => array('type' => 'bool','comment' => '0=no, 1=yes, use username/pw from current user'),
449
-			'acc_folder_junk' => array('type' => 'varchar','precision' => '128','comment' => 'junk folder'),
450
-			'acc_imap_default_quota' => array('type' => 'int','precision' => '4','comment' => 'default quota, if no user specific one set'),
451
-			'acc_imap_timeout' => array('type' => 'int','precision' => '2','comment' => 'timeout for imap connection'),
452
-			'acc_user_forward' => array('type' => 'bool','default' => '0','comment' => 'allow user to define forwards')
422
+			'acc_id' => array('type' => 'auto', 'nullable' => False),
423
+			'acc_name' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'description'),
424
+			'ident_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'standard identity'),
425
+			'acc_imap_host' => array('type' => 'ascii', 'precision' => '128', 'nullable' => False, 'comment' => 'imap hostname'),
426
+			'acc_imap_ssl' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'default' => '0', 'comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
427
+			'acc_imap_port' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '143', 'comment' => 'imap port'),
428
+			'acc_sieve_enabled' => array('type' => 'bool', 'default' => '0', 'comment' => 'sieve enabled'),
429
+			'acc_sieve_host' => array('type' => 'ascii', 'precision' => '128', 'comment' => 'sieve host, default imap_host'),
430
+			'acc_sieve_port' => array('type' => 'int', 'precision' => '4', 'default' => '4190'),
431
+			'acc_folder_sent' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'sent folder'),
432
+			'acc_folder_trash' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'trash folder'),
433
+			'acc_folder_draft' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'draft folder'),
434
+			'acc_folder_template' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'template folder'),
435
+			'acc_folder_archive' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'archive folder'),
436
+			'acc_smtp_host' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'smtp hostname'),
437
+			'acc_smtp_ssl' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'default' => '0', 'comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
438
+			'acc_smtp_port' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'default' => '25', 'comment' => 'smtp port'),
439
+			'acc_smtp_type' => array('type' => 'ascii', 'precision' => '32', 'default' => 'emailadmin_smtp', 'comment' => 'smtp class to use'),
440
+			'acc_imap_type' => array('type' => 'ascii', 'precision' => '32', 'default' => 'emailadmin_imap', 'comment' => 'imap class to use'),
441
+			'acc_imap_logintype' => array('type' => 'ascii', 'precision' => '20', 'comment' => 'standard, vmailmgr, admin, uidNumber'),
442
+			'acc_domain' => array('type' => 'varchar', 'precision' => '100', 'comment' => 'domain name'),
443
+			'acc_further_identities' => array('type' => 'bool', 'nullable' => False, 'default' => '1', 'comment' => '0=no, 1=yes'),
444
+			'acc_user_editable' => array('type' => 'bool', 'nullable' => False, 'default' => '1', 'comment' => '0=no, 1=yes'),
445
+			'acc_sieve_ssl' => array('type' => 'int', 'precision' => '1', 'default' => '1', 'comment' => '0=none, 1=starttls, 2=tls, 3=ssl, &8=validate certificate'),
446
+			'acc_modified' => array('type' => 'timestamp', 'nullable' => False, 'default' => 'current_timestamp'),
447
+			'acc_modifier' => array('type' => 'int', 'meta' => 'user', 'precision' => '4'),
448
+			'acc_smtp_auth_session' => array('type' => 'bool', 'comment' => '0=no, 1=yes, use username/pw from current user'),
449
+			'acc_folder_junk' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'junk folder'),
450
+			'acc_imap_default_quota' => array('type' => 'int', 'precision' => '4', 'comment' => 'default quota, if no user specific one set'),
451
+			'acc_imap_timeout' => array('type' => 'int', 'precision' => '2', 'comment' => 'timeout for imap connection'),
452
+			'acc_user_forward' => array('type' => 'bool', 'default' => '0', 'comment' => 'allow user to define forwards')
453 453
 		),
454 454
 		'pk' => array('acc_id'),
455 455
 		'fk' => array(),
@@ -458,29 +458,29 @@  discard block
 block discarded – undo
458 458
 	),
459 459
 	'egw_ea_credentials' => array(
460 460
 		'fd' => array(
461
-			'cred_id' => array('type' => 'auto','nullable' => False),
462
-			'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'into egw_ea_accounts'),
463
-			'cred_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '&1=imap, &2=smtp, &4=admin'),
464
-			'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'account_id or 0=all'),
465
-			'cred_username' => array('type' => 'varchar','precision' => '80','nullable' => False,'comment' => 'username'),
466
-			'cred_password' => array('type' => 'varchar','precision' => '80','comment' => 'password encrypted'),
467
-			'cred_pw_enc' => array('type' => 'int','precision' => '1','default' => '0','comment' => '0=not, 1=user pw, 2=system')
461
+			'cred_id' => array('type' => 'auto', 'nullable' => False),
462
+			'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'into egw_ea_accounts'),
463
+			'cred_type' => array('type' => 'int', 'precision' => '1', 'nullable' => False, 'comment' => '&1=imap, &2=smtp, &4=admin'),
464
+			'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'comment' => 'account_id or 0=all'),
465
+			'cred_username' => array('type' => 'varchar', 'precision' => '80', 'nullable' => False, 'comment' => 'username'),
466
+			'cred_password' => array('type' => 'varchar', 'precision' => '80', 'comment' => 'password encrypted'),
467
+			'cred_pw_enc' => array('type' => 'int', 'precision' => '1', 'default' => '0', 'comment' => '0=not, 1=user pw, 2=system')
468 468
 		),
469 469
 		'pk' => array('cred_id'),
470 470
 		'fk' => array(),
471 471
 		'ix' => array(),
472
-		'uc' => array(array('acc_id','account_id','cred_type'))
472
+		'uc' => array(array('acc_id', 'account_id', 'cred_type'))
473 473
 	),
474 474
 	'egw_ea_identities' => array(
475 475
 		'fd' => array(
476
-			'ident_id' => array('type' => 'auto','nullable' => False),
477
-			'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'for which account'),
478
-			'ident_realname' => array('type' => 'varchar','precision' => '128','nullable' => False,'comment' => 'real name'),
479
-			'ident_email' => array('type' => 'varchar','precision' => '128','comment' => 'email address'),
480
-			'ident_org' => array('type' => 'varchar','precision' => '128','comment' => 'organisation'),
481
-			'ident_signature' => array('type' => 'text','comment' => 'signature text'),
482
-			'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False,'default' => '0','comment' => '0=all users of give mail account'),
483
-			'ident_name' => array('type' => 'varchar','precision' => '128','comment' => 'name of identity to display')
476
+			'ident_id' => array('type' => 'auto', 'nullable' => False),
477
+			'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'for which account'),
478
+			'ident_realname' => array('type' => 'varchar', 'precision' => '128', 'nullable' => False, 'comment' => 'real name'),
479
+			'ident_email' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'email address'),
480
+			'ident_org' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'organisation'),
481
+			'ident_signature' => array('type' => 'text', 'comment' => 'signature text'),
482
+			'account_id' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False, 'default' => '0', 'comment' => '0=all users of give mail account'),
483
+			'ident_name' => array('type' => 'varchar', 'precision' => '128', 'comment' => 'name of identity to display')
484 484
 		),
485 485
 		'pk' => array('ident_id'),
486 486
 		'fk' => array(),
@@ -489,24 +489,24 @@  discard block
 block discarded – undo
489 489
 	),
490 490
 	'egw_ea_valid' => array(
491 491
 		'fd' => array(
492
-			'acc_id' => array('type' => 'int','precision' => '4','nullable' => False),
493
-			'account_id' => array('type' => 'int','meta' => 'account','precision' => '4','nullable' => False)
492
+			'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False),
493
+			'account_id' => array('type' => 'int', 'meta' => 'account', 'precision' => '4', 'nullable' => False)
494 494
 		),
495 495
 		'pk' => array(),
496 496
 		'fk' => array(),
497
-		'ix' => array(array('account_id','acc_id')),
498
-		'uc' => array(array('acc_id','account_id'))
497
+		'ix' => array(array('account_id', 'acc_id')),
498
+		'uc' => array(array('acc_id', 'account_id'))
499 499
 	),
500 500
 	'egw_ea_notifications' => array(
501 501
 		'fd' => array(
502
-			'notif_id' => array('type' => 'auto','nullable' => False),
503
-			'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'mail account'),
504
-			'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'user account'),
505
-			'notif_folder' => array('type' => 'varchar','precision' => '255','nullable' => False,'comment' => 'folder name')
502
+			'notif_id' => array('type' => 'auto', 'nullable' => False),
503
+			'acc_id' => array('type' => 'int', 'precision' => '4', 'nullable' => False, 'comment' => 'mail account'),
504
+			'account_id' => array('type' => 'int', 'meta' => 'user', 'precision' => '4', 'nullable' => False, 'comment' => 'user account'),
505
+			'notif_folder' => array('type' => 'varchar', 'precision' => '255', 'nullable' => False, 'comment' => 'folder name')
506 506
 		),
507 507
 		'pk' => array('notif_id'),
508 508
 		'fk' => array(),
509
-		'ix' => array(array('account_id','acc_id')),
509
+		'ix' => array(array('account_id', 'acc_id')),
510 510
 		'uc' => array()
511 511
 	),
512 512
 );
Please login to merge, or discard this patch.
api/setup/tables_update.inc.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	$tables = $GLOBALS['egw_setup']->db->table_names(true);
25 25
 	$phpgw_baseline = array();
26 26
 	include (__DIR__.'/tables_current.inc.php');
27
-	foreach($phpgw_baseline as $table => $definition)
27
+	foreach ($phpgw_baseline as $table => $definition)
28 28
 	{
29 29
 		if (!in_array($table, $tables))
30 30
 		{
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
 	// uninstall obsolete FelamiMail tables, if still around
43 43
 	$done = 0;
44
-	foreach(array_intersect($tables, array('egw_felamimail_accounts', 'egw_felamimail_displayfilter', 'egw_felamimail_signatures')) as $table)
44
+	foreach (array_intersect($tables, array('egw_felamimail_accounts', 'egw_felamimail_displayfilter', 'egw_felamimail_signatures')) as $table)
45 45
 	{
46 46
 		$GLOBALS['egw_setup']->oProc->DropTable($table);
47 47
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
  */
59 59
 function api_upgrade16_1()
60 60
 {
61
-	$GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts','acc_folder_archive', array(
61
+	$GLOBALS['egw_setup']->oProc->AddColumn('egw_ea_accounts', 'acc_folder_archive', array(
62 62
 		'type' => 'varchar',
63 63
 		'precision' => '128',
64 64
 		'comment' => 'archive folder'
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
  */
75 75
 function api_upgrade16_1_001()
76 76
 {
77
-	foreach(array(
77
+	foreach (array(
78 78
 		'cf_type' => 'egw_customfields',
79 79
 		'link_app1' => 'egw_links',
80 80
 		'link_app2' => 'egw_links',
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,10 @@
 block discarded – undo
45 45
 	{
46 46
 		$GLOBALS['egw_setup']->oProc->DropTable($table);
47 47
 
48
-		if (!$done++) $GLOBALS['egw_setup']->deregister_app('felamimail');
48
+		if (!$done++)
49
+		{
50
+			$GLOBALS['egw_setup']->deregister_app('felamimail');
51
+		}
49 52
 	}
50 53
 
51 54
 	return $GLOBALS['setup_info']['api']['currentver'] = '16.1';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 		'link_app2' => 'egw_links',
81 81
 	) as $col => $table)
82 82
 	{
83
-		$GLOBALS['egw_setup']->db->query("UPDATE $table SET $col='api-accounts' WHERE $col='home-accounts'", __LINE__, __FILE__);
83
+		$GLOBALS['egw_setup']->db->query("update $table SET $col='api-accounts' WHERE $col='home-accounts'", __LINE__, __FILE__);
84 84
 	}
85 85
 	return $GLOBALS['setup_info']['api']['currentver'] = '16.1.002';
86 86
 }
Please login to merge, or discard this patch.
api/setup/default_records.inc.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 //$oProc->m_odb->Halt_On_Error = 'yes';
16 16
 
17
-foreach(array(
17
+foreach (array(
18 18
 	'aa' => 'Afar',
19 19
 	'ab' => 'Abkhazian',
20 20
 	'af' => 'Afrikaans',
@@ -155,21 +155,21 @@  discard block
 block discarded – undo
155 155
 	'zu' => 'Zulu',
156 156
 ) as $id => $name)
157 157
 {
158
-	$oProc->insert($GLOBALS['egw_setup']->languages_table,array('lang_name' => $name),array('lang_id' => $id),__LINE__,__FILE__);
158
+	$oProc->insert($GLOBALS['egw_setup']->languages_table, array('lang_name' => $name), array('lang_id' => $id), __LINE__, __FILE__);
159 159
 }
160 160
 
161
-foreach(array(
161
+foreach (array(
162 162
 	'sessions_checkip' => 'True',
163 163
 	'asyncservice'     => 'fallback',
164 164
 	'install_id'       => md5(microtime(true).Api\Auth::randomstring(15)),
165 165
 ) as $name => $value)
166 166
 {
167
-	$oProc->insert($GLOBALS['egw_setup']->config_table,array(
167
+	$oProc->insert($GLOBALS['egw_setup']->config_table, array(
168 168
 		'config_value' => $value,
169
-	),array(
169
+	), array(
170 170
 		'config_app' => 'phpgwapi',
171 171
 		'config_name' => $name,
172
-	),__LINE__,__FILE__);
172
+	), __LINE__, __FILE__);
173 173
 }
174 174
 
175 175
 // make sure the required sqlfs dirs are there and have the following id's
@@ -178,12 +178,12 @@  discard block
 block discarded – undo
178 178
 	'/home' => 2,
179 179
 	'/apps' => 3,
180 180
 );
181
-foreach($dirs as $path => $id)
181
+foreach ($dirs as $path => $id)
182 182
 {
183 183
 	$nrow = array(
184 184
 		'fs_id' => $id,
185 185
 		'fs_dir'  => $path == '/' ? 0 : $dirs['/'],
186
-		'fs_name' => substr($path,1),
186
+		'fs_name' => substr($path, 1),
187 187
 		'fs_mode' => 05,
188 188
 		'fs_uid' => 0,
189 189
 		'fs_gid' => 0,
@@ -196,24 +196,24 @@  discard block
 block discarded – undo
196 196
 		'fs_comment' => null,
197 197
 		'fs_content' => null,
198 198
 	);
199
-	$GLOBALS['egw_setup']->db->insert('egw_sqlfs',$nrow,false,__LINE__,__FILE__,'phpgwapi');
199
+	$GLOBALS['egw_setup']->db->insert('egw_sqlfs', $nrow, false, __LINE__, __FILE__, 'phpgwapi');
200 200
 }
201 201
 // PostgreSQL seems to require to update the sequenz, after manually inserting id's
202
-$oProc->UpdateSequence('egw_sqlfs','fs_id');
202
+$oProc->UpdateSequence('egw_sqlfs', 'fs_id');
203 203
 
204 204
 // Create Addressbook for Default group, by setting a group ACL from the group to itself for all rights: add, read, edit and delete
205
-$defaultgroup = $GLOBALS['egw_setup']->add_account('Default','Default','Group',False,False);
206
-$GLOBALS['egw_setup']->add_acl('addressbook',$defaultgroup,$defaultgroup,1|2|4|8);
205
+$defaultgroup = $GLOBALS['egw_setup']->add_account('Default', 'Default', 'Group', False, False);
206
+$GLOBALS['egw_setup']->add_acl('addressbook', $defaultgroup, $defaultgroup, 1|2|4|8);
207 207
 
208 208
 /**
209 209
  * Create template directory and set default document_dir preference of addressbook, calendar, infolog, tracker, timesheet and projectmanager
210 210
  */
211
-$admins = $GLOBALS['egw_setup']->add_account('Admins','Admin','Group',False,False);
211
+$admins = $GLOBALS['egw_setup']->add_account('Admins', 'Admin', 'Group', False, False);
212 212
 
213 213
 Vfs::$is_root = true;
214 214
 $prefs = new Api\Preferences();
215 215
 $prefs->read_repository(false);
216
-foreach(array('','addressbook', 'calendar', 'infolog', 'tracker', 'timesheet', 'projectmanager', 'filemanager') as $app)
216
+foreach (array('', 'addressbook', 'calendar', 'infolog', 'tracker', 'timesheet', 'projectmanager', 'filemanager') as $app)
217 217
 {
218 218
 	if ($app && !file_exists(EGW_SERVER_ROOT.'/'.$app)) continue;
219 219
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	// set default preference for app (preserving a maybe already set document-directory)
228 228
 	if ($prefs->default[$app]['document_dir'])
229 229
 	{
230
-		$existing = explode(' ',$prefs->default[$app]['document_dir']);
230
+		$existing = explode(' ', $prefs->default[$app]['document_dir']);
231 231
 		$existing[] = $dir;
232 232
 		$dir = implode(' ', array_unique($existing));
233 233
 	}
Please login to merge, or discard this patch.
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -215,14 +215,20 @@
 block discarded – undo
215 215
 $prefs->read_repository(false);
216 216
 foreach(array('','addressbook', 'calendar', 'infolog', 'tracker', 'timesheet', 'projectmanager', 'filemanager') as $app)
217 217
 {
218
-	if ($app && !file_exists(EGW_SERVER_ROOT.'/'.$app)) continue;
218
+	if ($app && !file_exists(EGW_SERVER_ROOT.'/'.$app))
219
+	{
220
+		continue;
221
+	}
219 222
 
220 223
 	// create directory and set permissions: Admins writable and other readable
221 224
 	$dir = '/templates'.($app ? '/'.$app : '');
222 225
 	Vfs::mkdir($dir, 075, STREAM_MKDIR_RECURSIVE);
223 226
 	Vfs::chgrp($dir, abs($admins));
224 227
 	Vfs::chmod($dir, 075);
225
-	if (!$app) continue;
228
+	if (!$app)
229
+	{
230
+		continue;
231
+	}
226 232
 
227 233
 	// set default preference for app (preserving a maybe already set document-directory)
228 234
 	if ($prefs->default[$app]['document_dir'])
Please login to merge, or discard this patch.