Passed
Pull Request — master (#46)
by Neo
33:01
created
api/src/Json/Msg.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 * @param string $function name of the global (window) javascript function to call
65 65
 	 * @param array $parameters =array()
66 66
 	 */
67
-	public function apply($function,array $parameters=array())
67
+	public function apply($function, array $parameters = array())
68 68
 	{
69 69
 		if (is_string($function))
70 70
 		{
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	public function call($function)
89 89
 	{
90 90
 		$parameters = func_get_args();
91
-		array_shift($parameters);	// shift off $function
91
+		array_shift($parameters); // shift off $function
92 92
 
93 93
 		if (is_string($function))
94 94
 		{
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 * @param string $method name of the jquery to call
111 111
 	 * @param array $parameters =array()
112 112
 	 */
113
-	public function jquery($selector,$method,array $parameters=array())
113
+	public function jquery($selector, $method, array $parameters = array())
114 114
 	{
115 115
 		if (is_string($selector) && is_string($method))
116 116
 		{
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	 * @param string $app =null default current app from flags
170 170
 	 * or only the current application
171 171
 	 */
172
-	public function redirect($url, $global = false, $app=null)
172
+	public function redirect($url, $global = false, $app = null)
173 173
 	{
174 174
 		if (is_string($url) && is_bool($global))
175 175
 		{
Please login to merge, or discard this patch.
api/src/Json/Request.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 * @param boolean $set =null
40 40
 	 * @return boolean
41 41
 	 */
42
-	public static function isJSONRequest($set=null)
42
+	public static function isJSONRequest($set = null)
43 43
 	{
44 44
 		$ret = self::$_hadJSONRequest;
45 45
 		if (isset($set)) self::$_hadJSONRequest = $set;
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
 
63 63
 		if (get_magic_quotes_gpc()) $input_data = stripslashes($input_data);
64 64
 
65
-		$json_data = json_decode($input_data,true);
65
+		$json_data = json_decode($input_data, true);
66 66
 		if (is_array($json_data) && isset($json_data['request']) && isset($json_data['request']['parameters']) && is_array($json_data['request']['parameters']))
67 67
 		{
68 68
 			//error_log(__METHOD__.__LINE__.array2string($json_data['request']).function_backtrace());
69
-			$parameters =& $json_data['request']['parameters'];
69
+			$parameters = & $json_data['request']['parameters'];
70 70
 		}
71 71
 		else
72 72
 		{
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
 		{
78 78
 			$responses = array();
79 79
 			$response = Response::get();
80
-			foreach($parameters[0] as $uid => $data)
80
+			foreach ($parameters[0] as $uid => $data)
81 81
 			{
82 82
 				//error_log("$uid: menuaction=$data[menuaction], parameters=".array2string($data['parameters']));
83 83
 				$this->handleRequest($data['menuaction'], (array)$data['parameters']);
84 84
 				$responses[$uid] = $response->initResponseArray();
85 85
 				//error_log("responses[$uid]=".array2string($responses[$uid]));
86 86
 			}
87
-			$response->data($responses);	// send all responses as data
87
+			$response->data($responses); // send all responses as data
88 88
 		}
89 89
 		else
90 90
 		{
@@ -100,32 +100,32 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function handleRequest($menuaction, array $parameters)
102 102
 	{
103
-		if (strpos($menuaction,'::') !== false && strpos($menuaction,'.') === false)	// static method name app_something::method
103
+		if (strpos($menuaction, '::') !== false && strpos($menuaction, '.') === false)	// static method name app_something::method
104 104
 		{
105
-			@list($className,$functionName,$handler) = explode('::',$menuaction);
105
+			@list($className, $functionName, $handler) = explode('::', $menuaction);
106 106
 			if (substr($className, 0, 11) == 'EGroupware\\')
107 107
 			{
108 108
 				list(,$appName) = explode('\\', strtolower($className));
109 109
 			}
110 110
 			else
111 111
 			{
112
-				list($appName) = explode('_',$className);
112
+				list($appName) = explode('_', $className);
113 113
 			}
114 114
 
115 115
 			// Check for a real static method, avoid instanciation if it is
116 116
 			$m = new ReflectionMethod($menuaction);
117
-			if($m->isStatic())
117
+			if ($m->isStatic())
118 118
 			{
119 119
 				$ajaxClass = $className;
120 120
 			}
121 121
 		}
122 122
 		else
123 123
 		{
124
-			@list($appName, $className, $functionName, $handler) = explode('.',$menuaction);
124
+			@list($appName, $className, $functionName, $handler) = explode('.', $menuaction);
125 125
 		}
126 126
 		//error_log("json.php: appName=$appName, className=$className, functionName=$functionName, handler=$handler");
127 127
 
128
-		switch($handler)
128
+		switch ($handler)
129 129
 		{
130 130
 			case '/etemplate/process_exec':
131 131
 				$_GET['menuaction'] = $appName.'.'.$className.'.'.$functionName;
@@ -151,15 +151,15 @@  discard block
 block discarded – undo
151 151
 				break;
152 152
 		}
153 153
 
154
-		if(substr($className,0,4) != 'ajax' && substr($className,-4) != 'ajax' &&
155
-			$menuaction != 'etemplate.etemplate.process_exec' && substr($functionName,0,4) != 'ajax' ||
156
-			!preg_match('/^[A-Za-z0-9_\\\\-]+(\.[A-Za-z0-9_\\\\]+\.|::)[A-Za-z0-9_]+$/',$menuaction))
154
+		if (substr($className, 0, 4) != 'ajax' && substr($className, -4) != 'ajax' &&
155
+			$menuaction != 'etemplate.etemplate.process_exec' && substr($functionName, 0, 4) != 'ajax' ||
156
+			!preg_match('/^[A-Za-z0-9_\\\\-]+(\.[A-Za-z0-9_\\\\]+\.|::)[A-Za-z0-9_]+$/', $menuaction))
157 157
 		{
158 158
 			// stopped for security reasons
159 159
 			error_log("className='$className', functionName='$functionName', menuaction='$menuaction'");
160
-			error_log($_SERVER['PHP_SELF']. ' stopped for security reason. '.$menuaction.' is not valid. class- or function-name must start with ajax!!!');
160
+			error_log($_SERVER['PHP_SELF'].' stopped for security reason. '.$menuaction.' is not valid. class- or function-name must start with ajax!!!');
161 161
 			// send message also to the user
162
-			throw new Exception\InvalidName($_SERVER['PHP_SELF']. ' stopped for security reason. '.$menuaction.' is not valid. class- or function-name must start with ajax!!!');
162
+			throw new Exception\InvalidName($_SERVER['PHP_SELF'].' stopped for security reason. '.$menuaction.' is not valid. class- or function-name must start with ajax!!!');
163 163
 		}
164 164
 
165 165
 		if (isset($template))
Please login to merge, or discard this patch.
api/src/Json/Tail.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -68,15 +68,15 @@  discard block
 block discarded – undo
68 68
 	 *
69 69
 	 * @param string $filename =null if not starting with as slash relative to EGw files dir (this is strongly prefered for security reasons)
70 70
 	 */
71
-	public function __construct($filename=null)
71
+	public function __construct($filename = null)
72 72
 	{
73
-		$this->filenames =& Api\Cache::getSession('phpgwapi', __CLASS__);
73
+		$this->filenames = & Api\Cache::getSession('phpgwapi', __CLASS__);
74 74
 
75 75
 		if ($filename)
76 76
 		{
77 77
 			$this->filename = $filename;
78 78
 
79
-			if (!$this->filenames || !in_array($filename,$this->filenames)) $this->filenames[] = $filename;
79
+			if (!$this->filenames || !in_array($filename, $this->filenames)) $this->filenames[] = $filename;
80 80
 		}
81 81
 	}
82 82
 
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
 	 * @param int $start =0 last position in log-file
88 88
 	 * @throws Api\Exception\WrongParameter
89 89
 	 */
90
-	public function ajax_chunk($filename,$start=0)
90
+	public function ajax_chunk($filename, $start = 0)
91 91
 	{
92
-		if (!in_array($filename,$this->filenames))
92
+		if (!in_array($filename, $this->filenames))
93 93
 		{
94 94
 			throw new Api\Exception\WrongParameter("Not allowed to view '$filename'!");
95 95
 		}
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
 		if (file_exists($filename))
99 99
 		{
100 100
 			$size = filesize($filename);
101
-			if (!$start || $start < 0 || $start > $size || $size-$start > 4*self::MAX_CHUNK_SIZE)
101
+			if (!$start || $start < 0 || $start > $size || $size - $start > 4 * self::MAX_CHUNK_SIZE)
102 102
 			{
103
-				$start = $size - 4*self::MAX_CHUNK_SIZE;
103
+				$start = $size - 4 * self::MAX_CHUNK_SIZE;
104 104
 				if ($start < 0) $start = 0;
105 105
 			}
106 106
 			$hsize = Api\Vfs::hsize($size);
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
 	 * @param boolean $truncate =false true: truncate file, false: delete file
132 132
 	 * @throws Api\Exception\WrongParameter
133 133
 	 */
134
-	public function ajax_delete($filename,$truncate=false)
134
+	public function ajax_delete($filename, $truncate = false)
135 135
 	{
136
-		if (!in_array($filename,$this->filenames))
136
+		if (!in_array($filename, $this->filenames))
137 137
 		{
138 138
 			throw new Api\Exception\WrongParameter("Not allowed to view '$filename'!");
139 139
 		}
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 * @return string
156 156
 	 * @throws Api\Exception\WrongParameter
157 157
 	 */
158
-	public function show($header=null)
158
+	public function show($header = null)
159 159
 	{
160 160
 		if (!isset($this->filename))
161 161
 		{
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
 <p style="float: left; margin: 5px"><b>'.htmlspecialchars($header).'</b></p>
168 168
 <div style="float: right; margin: 2px; margin-right: 5px">
169 169
 	'.Api\Html::form(
170
-		Api\Html::input('clear_log',lang('Clear window'),'button','id="clear_log"')."\n".
171
-		Api\Html::input('delete_log',lang('Delete file'),'button','id="purge_log"')."\n".
172
-		Api\Html::input('empty_log',lang('Empty file'),'button','id="empty_log"')."\n".
173
-		Api\Html::input('download_log',lang('Download'),'submit','id="download_log"'),
174
-		'','/index.php',array(
170
+		Api\Html::input('clear_log', lang('Clear window'), 'button', 'id="clear_log"')."\n".
171
+		Api\Html::input('delete_log', lang('Delete file'), 'button', 'id="purge_log"')."\n".
172
+		Api\Html::input('empty_log', lang('Empty file'), 'button', 'id="empty_log"')."\n".
173
+		Api\Html::input('download_log', lang('Download'), 'submit', 'id="download_log"'),
174
+		'', '/index.php', array(
175 175
 		'menuaction' => 'api.'.__CLASS__.'.download',
176 176
 		'filename' => $this->filename,
177 177
 	)).'
@@ -187,15 +187,15 @@  discard block
 block discarded – undo
187 187
 	public function download()
188 188
 	{
189 189
 		$filename = $_GET['filename'];
190
-		if (!in_array($filename,$this->filenames))
190
+		if (!in_array($filename, $this->filenames))
191 191
 		{
192 192
 			throw new Api\Exception\WrongParameter("Not allowed to download '$filename'!");
193 193
 		}
194 194
 		Api\Header\Content::type(basename($filename), 'text/plain');
195 195
 		if ($filename[0] != '/') $filename = $GLOBALS['egw_info']['server']['files_dir'].'/'.$filename;
196
-		for($n=ob_get_level(); $n > 0; --$n)
196
+		for ($n = ob_get_level(); $n > 0; --$n)
197 197
 		{
198
-			ob_end_clean();	// stop all output buffering, to NOT run into memory_limit
198
+			ob_end_clean(); // stop all output buffering, to NOT run into memory_limit
199 199
 		}
200 200
 		readfile($filename);
201 201
 		exit;
Please login to merge, or discard this patch.
api/src/CalDAV/PropfindIterator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 *
72 72
 	 * @var int
73 73
 	 */
74
-	protected $start=0;
74
+	protected $start = 0;
75 75
 
76 76
 	/**
77 77
 	 * Number of entries queried from callback in one call
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 * @param array $filter filter for propfind call
96 96
 	 * @param array $files =array() extra files/responses to return too
97 97
 	 */
98
-	public function __construct(Handler $handler, $path, array $filter,array &$files=array())
98
+	public function __construct(Handler $handler, $path, array $filter, array &$files = array())
99 99
 	{
100 100
 		if ($this->debug) error_log(__METHOD__."('$path', ".array2string($filter).",)");
101 101
 		$this->path    = $path;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 		$current = current($this->files);
127 127
 
128 128
 		if ($this->debug) error_log(__METHOD__."() returning ".array2string($current['path']));
129
-		return $current['path'];	// we return path as key
129
+		return $current['path']; // we return path as key
130 130
 	}
131 131
 
132 132
 	/**
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
 			return false;
147 147
 		}
148 148
 		// try query further files via propfind callback of handler and store result in $this->files
149
-		$this->files = $this->handler->propfind_callback($this->path,$this->filter,array($this->start,self::CHUNK_SIZE));
149
+		$this->files = $this->handler->propfind_callback($this->path, $this->filter, array($this->start, self::CHUNK_SIZE));
150 150
 		if (!is_array($this->files) || !($entries = count($this->files)))
151 151
 		{
152 152
 			if ($this->debug) error_log(__METHOD__."() returning FALSE (no more entries)");
153
-			return false;	// no further entries
153
+			return false; // no further entries
154 154
 		}
155 155
 		$this->start += self::CHUNK_SIZE;
156 156
 		reset($this->files);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
 		$this->start = 0;
171 171
 		$this->files = $this->common_files;
172
-		if (!$this->files) $this->next();	// otherwise valid will return false and nothing get returned
172
+		if (!$this->files) $this->next(); // otherwise valid will return false and nothing get returned
173 173
 		reset($this->files);
174 174
 	}
175 175
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	 *
179 179
 	 * @return boolean
180 180
 	 */
181
-	public function valid ()
181
+	public function valid()
182 182
 	{
183 183
 		if ($this->debug) error_log(__METHOD__."() returning ".array2string(current($this->files) !== false));
184 184
 		return current($this->files) !== false;
Please login to merge, or discard this patch.
api/src/CalDAV/IcalIterator.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	 * @param array $callback_params =array() further parameters for the callback, 1. parameter is component
107 107
 	 * @param boolean $add_container =false true, add container / $this as last parameter to callback
108 108
 	 */
109
-	public function __construct($ical_file,$base='VCALENDAR',$charset=null,$callback=null,array $callback_params=array(), $add_container=false)
109
+	public function __construct($ical_file, $base = 'VCALENDAR', $charset = null, $callback = null, array $callback_params = array(), $add_container = false)
110 110
 	{
111 111
 		// call parent constructor
112 112
 		parent::__construct();
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 		}
132 132
 		if (!is_resource($this->ical_file))
133 133
 		{
134
-			throw new Api\Exception\WrongParameter(__METHOD__.'($ical_file, ...) NO resource! $ical_file='.substr(array2string($ical_file),0,100));
134
+			throw new Api\Exception\WrongParameter(__METHOD__.'($ical_file, ...) NO resource! $ical_file='.substr(array2string($ical_file), 0, 100));
135 135
 		}
136 136
 	}
137 137
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		{
156 156
 			$line = array_shift($this->unread_lines);
157 157
 		}
158
-		elseif(feof($this->ical_file))
158
+		elseif (feof($this->ical_file))
159 159
 		{
160 160
 			$line = false;
161 161
 		}
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
 			$line = fgets($this->ical_file);
165 165
 		}
166 166
 		// check if end of container reached
167
-		if ($this->container && $line && substr($line,0,4+strlen($this->base)) === 'END:'.$this->base)
167
+		if ($this->container && $line && substr($line, 0, 4 + strlen($this->base)) === 'END:'.$this->base)
168 168
 		{
169
-			$this->unread_line($line);	// put back end-of-container, to continue to return false
169
+			$this->unread_line($line); // put back end-of-container, to continue to return false
170 170
 			$line = false;
171 171
 		}
172 172
 		//error_log(__METHOD__."() returning ".($line === false ? 'FALSE' : "'$line'"));
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	protected function unread_line($line)
183 183
 	{
184 184
 		//error_log(__METHOD__."('$line')");
185
-		array_unshift($this->unread_lines,$line);
185
+		array_unshift($this->unread_lines, $line);
186 186
 	}
187 187
 
188 188
 	/**
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
 		//error_log(__METHOD__."() returning a ".gettype($this->component));
196 196
 		if ($this->callback)
197 197
 		{
198
-			$ret = is_a($this->component,'Horde_Icalendar');
198
+			$ret = is_a($this->component, 'Horde_Icalendar');
199 199
 			do {
200 200
 				if ($ret === false) $this->next();
201
-				if (!is_a($this->component,'Horde_Icalendar')) return false;
201
+				if (!is_a($this->component, 'Horde_Icalendar')) return false;
202 202
 				$params = $this->callback_params;
203
-				array_unshift($params,$this->component);
203
+				array_unshift($params, $this->component);
204 204
 			}
205
-			while(($ret = call_user_func_array($this->callback,$params)) === false);
205
+			while (($ret = call_user_func_array($this->callback, $params)) === false);
206 206
 
207 207
 			return $ret;
208 208
 		}
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	{
228 228
 		unset($this->component);
229 229
 
230
-		while (($line = $this->read_line()) && substr($line,0,6) !== 'BEGIN:')
230
+		while (($line = $this->read_line()) && substr($line, 0, 6) !== 'BEGIN:')
231 231
 		{
232 232
 			// ignore it
233 233
 		}
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
 			$this->component = false;
237 237
 			return;
238 238
 		}
239
-		$type = substr(trim($line),6);
239
+		$type = substr(trim($line), 6);
240 240
 
241 241
 		//error_log(__METHOD__."() found $type component");
242 242
 
243 243
 		$data = $line;
244
-		while (($line = $this->read_line()) && substr($line,0,4+strlen($type)) !== 'END:'.$type)
244
+		while (($line = $this->read_line()) && substr($line, 0, 4 + strlen($type)) !== 'END:'.$type)
245 245
 		{
246 246
 			$data .= $line;
247 247
 		}
@@ -276,23 +276,23 @@  discard block
 block discarded – undo
276 276
 	 */
277 277
 	public function rewind()
278 278
 	{
279
-		@fseek($this->ical_file,0,SEEK_SET);
279
+		@fseek($this->ical_file, 0, SEEK_SET);
280 280
 
281 281
 		// advance to begin of container
282
-		while(($line = $this->read_line()) && substr($line,0,6+strlen($this->base)) !== 'BEGIN:'.$this->base)
282
+		while (($line = $this->read_line()) && substr($line, 0, 6 + strlen($this->base)) !== 'BEGIN:'.$this->base)
283 283
 		{
284 284
 
285 285
 		}
286 286
 		// if no container start found --> use whole file (rewind) and set container marker
287 287
 		if (!($this->container = $line !== false))
288 288
 		{
289
-			fseek($this->ical_file,0,SEEK_SET);
289
+			fseek($this->ical_file, 0, SEEK_SET);
290 290
 		}
291 291
 		//error_log(__METHOD__."() $this->base container ".($this->container ? 'found' : 'NOT found'));
292 292
 
293 293
 		$data = $line;
294 294
 		// advance to first component
295
-		while (($line = $this->read_line()) && substr($line,0,6) !== 'BEGIN:')
295
+		while (($line = $this->read_line()) && substr($line, 0, 6) !== 'BEGIN:')
296 296
 		{
297 297
 			$matches = null;
298 298
 			if (preg_match('/^VERSION:(\d\.\d)\s*$/ism', $line, $matches))
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 		{
308 308
 			$data .= "END:$this->base\n";
309 309
 			//error_log(__METHOD__."() about to call this->parsevCalendar('$data','$this->base','$this->charset')");
310
-			$this->parsevCalendar($data,$this->base,$this->charset);
310
+			$this->parsevCalendar($data, $this->base, $this->charset);
311 311
 		}
312 312
 		if ($line) $this->unread_line($line);
313 313
 
@@ -320,10 +320,10 @@  discard block
 block discarded – undo
320 320
 	 *
321 321
 	 * @return boolean
322 322
 	 */
323
-	public function valid ()
323
+	public function valid()
324 324
 	{
325 325
 		//error_log(__METHOD__."() returning ".(is_a($this->component,'Horde_Icalendar') ? 'TRUE' : 'FALSE').' get_class($this->component)='.get_class($this->component));
326
-		return is_a($this->component,'Horde_Icalendar');
326
+		return is_a($this->component, 'Horde_Icalendar');
327 327
 	}
328 328
 }
329 329
 
@@ -441,8 +441,8 @@  discard block
 block discarded – undo
441 441
 	if (!is_resource($ical_file)) echo "<pre>$ical_file</pre>\n";
442 442
 	//$calendar_ical = new calendar_ical();
443 443
 	//$calendar_ical->setSupportedFields('file');
444
-	$ical_it = new IcalIterator($ical_file);//,'VCALENDAR','iso-8859-1',array($calendar_ical,'_ical2egw_callback'),array('Europe/Berlin'));
445
-	foreach($ical_it as $uid => $vevent)
444
+	$ical_it = new IcalIterator($ical_file); //,'VCALENDAR','iso-8859-1',array($calendar_ical,'_ical2egw_callback'),array('Europe/Berlin'));
445
+	foreach ($ical_it as $uid => $vevent)
446 446
 	{
447 447
 		echo "$uid<pre>".print_r($vevent->toHash(), true)."</pre>\n";
448 448
 	}
Please login to merge, or discard this patch.
api/src/Link/Storage.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	 * @param int $lastmod =0 timestamp of last modification (defaults to now=time())
60 60
 	 * @return int/boolean False (for db or param-error) or on success link_id (Please not the return-value of $id1)
61 61
 	 */
62
-	static function link( $app1,&$id1,$app2,$id2='',$remark='',$owner=0,$lastmod=0 )
62
+	static function link($app1, &$id1, $app2, $id2 = '', $remark = '', $owner = 0, $lastmod = 0)
63 63
 	{
64 64
 		if (self::DEBUG)
65 65
 		{
@@ -68,21 +68,21 @@  discard block
 block discarded – undo
68 68
 		if ($app1 == $app2 && $id1 == $id2 ||
69 69
 		    $id1 == '' || $id2 == '' || $app1 == '' || $app2 == '')
70 70
 		{
71
-			return False;	// dont link to self or other nosense
71
+			return False; // dont link to self or other nosense
72 72
 		}
73
-		if (($link = self::get_link($app1,$id1,$app2,$id2)))
73
+		if (($link = self::get_link($app1, $id1, $app2, $id2)))
74 74
 		{
75 75
 			if ($link['link_remark'] != $remark)
76 76
 			{
77
-				self::update_remark($link['link_id'],$remark);
77
+				self::update_remark($link['link_id'], $remark);
78 78
 			}
79
-			return $link['link_id'];	// link alread exist
79
+			return $link['link_id']; // link alread exist
80 80
 		}
81 81
 		if (!$owner)
82 82
 		{
83 83
 			$owner = $GLOBALS['egw_info']['user']['account_id'];
84 84
 		}
85
-		return self::$db->insert(self::TABLE,array(
85
+		return self::$db->insert(self::TABLE, array(
86 86
 				'link_app1'		=> $app1,
87 87
 				'link_id1'		=> $id1,
88 88
 				'link_app2'		=> $app2,
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 				'link_remark'	=> $remark,
91 91
 				'link_lastmod'	=> $lastmod ? $lastmod : time(),
92 92
 				'link_owner'	=> $owner,
93
-			),False,__LINE__,__FILE__) ? self::$db->get_last_insert_id(self::TABLE,'link_id') : false;
93
+			), False, __LINE__, __FILE__) ? self::$db->get_last_insert_id(self::TABLE, 'link_id') : false;
94 94
 	}
95 95
 
96 96
 	/**
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 	 * @param string $remark new text for the remark
101 101
 	 * @return boolean true on success, else false
102 102
 	 */
103
-	static function update_remark($link_id,$remark)
103
+	static function update_remark($link_id, $remark)
104 104
 	{
105
-		return self::$db->update(self::TABLE,array(
105
+		return self::$db->update(self::TABLE, array(
106 106
 				'link_remark'	=> $remark,
107 107
 				'link_lastmod'	=> time(),
108
-			),array(
108
+			), array(
109 109
 				'link_id'	=> $link_id,
110
-			),__LINE__,__FILE__);
110
+			), __LINE__, __FILE__);
111 111
 	}
112 112
 
113 113
 	/**
@@ -121,15 +121,15 @@  discard block
 block discarded – undo
121 121
 	 * @param int|array $limit =null number of entries to return, default null = all or array(offset, num_rows) to return num_rows starting from offset
122 122
 	 * @return array id => links pairs if $id is an array or just the links (only_app: ids) or empty array if no matching links found
123 123
 	 */
124
-	static function get_links($app, $id, $only_app='', $order='link_lastmod DESC', $deleted=false, $limit=null)
124
+	static function get_links($app, $id, $only_app = '', $order = 'link_lastmod DESC', $deleted = false, $limit = null)
125 125
 	{
126 126
 		if (self::DEBUG)
127 127
 		{
128
-			echo "<p>solink.get_links($app,".print_r($id,true).",$only_app,$order,$deleted)</p>\n";
128
+			echo "<p>solink.get_links($app,".print_r($id, true).",$only_app,$order,$deleted)</p>\n";
129 129
 		}
130 130
 		if (($not_only = $only_app[0] == '!'))
131 131
 		{
132
-			$only_app = substr($only_app,1);
132
+			$only_app = substr($only_app, 1);
133 133
 		}
134 134
 
135 135
 		$offset = false;
@@ -137,32 +137,32 @@  discard block
 block discarded – undo
137 137
 		{
138 138
 			list($offset, $limit) = $limit;
139 139
 		}
140
-		elseif($limit)
140
+		elseif ($limit)
141 141
 		{
142 142
 			$offset = 0;
143 143
 		}
144 144
 
145 145
 		$links = array();
146 146
 		try {
147
-			foreach(self::$db->select(self::TABLE, '*', self::$db->expression(self::TABLE, '((', array(
147
+			foreach (self::$db->select(self::TABLE, '*', self::$db->expression(self::TABLE, '((', array(
148 148
 						'link_app1'	=> $app,
149 149
 						'link_id1'	=> $id,
150
-					),') OR (',array(
150
+					), ') OR (', array(
151 151
 						'link_app2'	=> $app,
152 152
 						'link_id2'	=> $id,
153
-					),'))',
153
+					), '))',
154 154
 					$deleted ? '' : ' AND deleted IS NULL'
155 155
 				), __LINE__, __FILE__, $offset, $order ? " ORDER BY $order" : '', 'phpgwapi', $limit) as $row)
156 156
 			{
157 157
 				// check if left side (1) is one of our targets --> add it
158
-				if ($row['link_app1'] == $app && in_array($row['link_id1'],(array)$id))
158
+				if ($row['link_app1'] == $app && in_array($row['link_id1'], (array)$id))
159 159
 				{
160
-					self::_add2links($row,true,$only_app,$not_only,$links);
160
+					self::_add2links($row, true, $only_app, $not_only, $links);
161 161
 				}
162 162
 				// check if right side (2) is one of our targets --> add it (both can be true for multiple targets!)
163
-				if ($row['link_app2'] == $app && in_array($row['link_id2'],(array)$id))
163
+				if ($row['link_app2'] == $app && in_array($row['link_id2'], (array)$id))
164 164
 				{
165
-					self::_add2links($row,false,$only_app,$not_only,$links);
165
+					self::_add2links($row, false, $only_app, $not_only, $links);
166 166
 				}
167 167
 			}
168 168
 			// if query returns exactly limit rows, we assume there are more and therefore set self::$limit_exceeded
@@ -170,18 +170,18 @@  discard block
 block discarded – undo
170 170
 		}
171 171
 		// catch Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (1267)
172 172
 		// caused by non-ascii chars compared with ascii field uid
173
-		catch(Api\Db\Exception $e) {
173
+		catch (Api\Db\Exception $e) {
174 174
 			_egw_log_exception($e);
175 175
 		}
176 176
 		return is_array($id) ? $links : ($links[$id] ? $links[$id] : array());
177 177
 	}
178 178
 
179
-	private static function _add2links($row,$left,$only_app,$not_only,array &$links)
179
+	private static function _add2links($row, $left, $only_app, $not_only, array &$links)
180 180
 	{
181 181
 		$linked_app = $left ? $row['link_app2'] : $row['link_app1'];
182 182
 		$linked_id  = $left ? $row['link_id2'] : $row['link_id1'];
183 183
 		$app_id = $left ? $row['link_id1'] : $row['link_id2'];
184
-		list($app) = explode('-',$linked_app);
184
+		list($app) = explode('-', $linked_app);
185 185
 		if ($only_app && $not_only == ($linked_app == $only_app) || !$GLOBALS['egw_info']['user']['apps'][$app])
186 186
 		{
187 187
 			#echo "$linked_app == $only_app, ";var_dump($linked_app == $only_app);echo "	->dont return a link<br>";
@@ -208,13 +208,13 @@  discard block
 block discarded – undo
208 208
 	 * @param string $id2 ='' id in $app2, if no integer link_id given in $app_link_id
209 209
 	 * @return array with link-data or False
210 210
 	 */
211
-	static function get_link($app_link_id,$id='',$app2='',$id2='')
211
+	static function get_link($app_link_id, $id = '', $app2 = '', $id2 = '')
212 212
 	{
213 213
 		if (self::DEBUG)
214 214
 		{
215 215
 			echo "<p>solink.get_link('$app_link_id',$id,'$app2','$id2')</p>\n";
216 216
 		}
217
-		if ((int) $app_link_id > 0)
217
+		if ((int)$app_link_id > 0)
218 218
 		{
219 219
 			$where = array('link_id' => $app_link_id);
220 220
 		}
@@ -224,24 +224,24 @@  discard block
 block discarded – undo
224 224
 			{
225 225
 				return False;
226 226
 			}
227
-			$where = self::$db->expression(self::TABLE,'(',array(
227
+			$where = self::$db->expression(self::TABLE, '(', array(
228 228
 					'link_app1'	=> $app_link_id,
229 229
 					'link_id1'	=> $id,
230 230
 					'link_app2'	=> $app2,
231 231
 					'link_id2'	=> $id2,
232
-				),') OR (',array(
232
+				), ') OR (', array(
233 233
 					'link_app2'	=> $app_link_id,
234 234
 					'link_id2'	=> $id,
235 235
 					'link_app1'	=> $app2,
236 236
 					'link_id1'	=> $id2,
237
-				),')');
237
+				), ')');
238 238
 		}
239 239
 		try {
240
-			return self::$db->select(self::TABLE,'*',$where,__LINE__,__FILE__)->fetch(ADODB_FETCH_ASSOC);
240
+			return self::$db->select(self::TABLE, '*', $where, __LINE__, __FILE__)->fetch(ADODB_FETCH_ASSOC);
241 241
 		}
242 242
 		// catch Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (1267)
243 243
 		// caused by non-ascii chars compared with ascii field uid
244
-		catch(Api\Db\Exception $e) {
244
+		catch (Api\Db\Exception $e) {
245 245
 			_egw_log_exception($e);
246 246
 		}
247 247
 		return false;
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	 * @param boolean $hold_for_purge Don't really delete the link, just mark it as deleted and wait for final delete of linked entry
260 260
 	 * @return array with deleted links
261 261
 	 */
262
-	static function unlink($link_id,$app='',$id='',$owner=0,$app2='',$id2='',$hold_for_purge=false)
262
+	static function unlink($link_id, $app = '', $id = '', $owner = 0, $app2 = '', $id2 = '', $hold_for_purge = false)
263 263
 	{
264 264
 		if (self::DEBUG)
265 265
 		{
@@ -284,21 +284,21 @@  discard block
 block discarded – undo
284 284
 					$check1['link_id1'] = $id;
285 285
 					$check2['link_id2'] = $id;
286 286
 				}
287
-				$where = self::$db->expression(self::TABLE,'((',$check1,') OR (',$check2,'))');
287
+				$where = self::$db->expression(self::TABLE, '((', $check1, ') OR (', $check2, '))');
288 288
 			}
289 289
 			elseif ($app != '' && $app2 != '')
290 290
 			{
291
-				$where = self::$db->expression(self::TABLE,'(',array(
291
+				$where = self::$db->expression(self::TABLE, '(', array(
292 292
 						'link_app1'	=> $app,
293 293
 						'link_id1'	=> $id,
294 294
 						'link_app2'	=> $app2,
295 295
 						'link_id2'	=> $id2,
296
-					),') OR (',array(
296
+					), ') OR (', array(
297 297
 						'link_app1'	=> $app2,
298 298
 						'link_id1'	=> $id2,
299 299
 						'link_app2'	=> $app,
300 300
 						'link_id2'	=> $id,
301
-					),')');
301
+					), ')');
302 302
 			}
303 303
 			if ($owner)
304 304
 			{
@@ -308,25 +308,25 @@  discard block
 block discarded – undo
308 308
 		}
309 309
 		$deleted = array();
310 310
 		try {
311
-			foreach(self::$db->select(self::TABLE,'*',$where,__LINE__,__FILE__) as $row)
311
+			foreach (self::$db->select(self::TABLE, '*', $where, __LINE__, __FILE__) as $row)
312 312
 			{
313 313
 				$deleted[] = $row;
314 314
 			}
315
-			if($hold_for_purge)
315
+			if ($hold_for_purge)
316 316
 			{
317
-				self::$db->update(self::TABLE,array(
317
+				self::$db->update(self::TABLE, array(
318 318
 					'deleted' => time(),
319 319
 					'link_lastmod' => time(),
320
-				), $where, __LINE__,__FILE__);
320
+				), $where, __LINE__, __FILE__);
321 321
 			}
322 322
 			else
323 323
 			{
324
-				self::$db->delete(self::TABLE,$where,__LINE__,__FILE__);
324
+				self::$db->delete(self::TABLE, $where, __LINE__, __FILE__);
325 325
 			}
326 326
 		}
327 327
 		// catch Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (1267)
328 328
 		// caused by non-ascii chars compared with ascii field uid
329
-		catch(Api\Db\Exception $e) {
329
+		catch (Api\Db\Exception $e) {
330 330
 			_egw_log_exception($e);
331 331
 		}
332 332
 
@@ -357,8 +357,8 @@  discard block
 block discarded – undo
357 357
 			$check1['link_id1'] = $id;
358 358
 			$check2['link_id2'] = $id;
359 359
 		}
360
-		$where = self::$db->expression(self::TABLE,'((',$check1,') OR (',$check2,'))');
361
-		self::$db->update(self::TABLE,array('deleted'=> null), $where, __LINE__,__FILE__);
360
+		$where = self::$db->expression(self::TABLE, '((', $check1, ') OR (', $check2, '))');
361
+		self::$db->update(self::TABLE, array('deleted'=> null), $where, __LINE__, __FILE__);
362 362
 	}
363 363
 
364 364
 	/**
@@ -371,13 +371,13 @@  discard block
 block discarded – undo
371 371
 	 * @param int $new_owner account_id of new owner
372 372
 	 * @return int number of links changed
373 373
 	 */
374
-	static function chown($owner,$new_owner)
374
+	static function chown($owner, $new_owner)
375 375
 	{
376
-		if ((int)$owner <= 0 || (int) $new_owner <= 0)
376
+		if ((int)$owner <= 0 || (int)$new_owner <= 0)
377 377
 		{
378 378
 			return 0;
379 379
 		}
380
-		self::$db->update(self::TABLE,array('owner'=>$new_owner),array('owner'=>$owner),__LINE__,__FILE__);
380
+		self::$db->update(self::TABLE, array('owner'=>$new_owner), array('owner'=>$owner), __LINE__, __FILE__);
381 381
 
382 382
 		return self::$db->affected_rows();
383 383
 	}
@@ -404,15 +404,15 @@  discard block
 block discarded – undo
404 404
 	 * @param int|array $limit =null number of entries to return, default null = all or array(offset, num_rows) to return num_rows starting from offset
405 405
 	 * @return array with links from entries from $app to $target_app/$target_id plus the other (b) link_id/app/id in the keys 'link3'/'app3'/'id3'
406 406
 	 */
407
-	static function get_3links($app, $target_app, $target_id=null, $just_app_ids=false, $order='link_lastmod DESC', $limit=null)
407
+	static function get_3links($app, $target_app, $target_id = null, $just_app_ids = false, $order = 'link_lastmod DESC', $limit = null)
408 408
 	{
409 409
 		$table = self::TABLE;
410
-		$arrayofselects=array(
410
+		$arrayofselects = array(
411 411
 			// retrieve the type of links, where the relation is realized as timesheet->infolog/tracker via infolog->projectmanager to timesheet->projectmanager
412 412
 			array('table'=>self::TABLE,
413 413
 				'cols'=>'c.*,b.link_app1 AS app3,b.link_id1 AS id3,b.link_id AS link3',
414 414
 				'where'=>'a.link_app1='.self::$db->quote($app).' AND c.link_app2='.self::$db->quote($target_app).
415
-                        		(!$target_id ? '' : self::$db->expression(self::TABLE,' AND c.',array('link_id2' => $target_id))),
415
+                        		(!$target_id ? '' : self::$db->expression(self::TABLE, ' AND c.', array('link_id2' => $target_id))),
416 416
                         	'join'=>" a
417 417
                         		JOIN $table b ON a.link_id2=b.link_id1 AND a.link_app2=b.link_app1
418 418
                        			JOIN $table c ON a.link_id1=c.link_id1 AND a.link_app1=c.link_app1 AND a.link_id!=c.link_id AND c.link_app2=b.link_app2 AND c.link_id2=b.link_id2",
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 			array('table'=>self::TABLE,
422 422
 				'cols'=>'b.link_id, b.link_app2 as app1, b.link_id2 as id1, b.link_app1 as app2, b.link_id1 as id2, b.link_remark,b.link_lastmod,b.link_owner,b.deleted,c.link_app1 AS app3,c.link_id1 AS id3,c.link_id AS link3',
423 423
                        		'where'=>'a.link_app1='.self::$db->quote($app).' AND b.link_app1='.self::$db->quote($target_app).
424
-                        		(!$target_id ? '' : self::$db->expression(self::TABLE,' AND b.',array('link_id1' => $target_id))),
424
+                        		(!$target_id ? '' : self::$db->expression(self::TABLE, ' AND b.', array('link_id1' => $target_id))),
425 425
                         	'join'=>" a
426 426
                         		JOIN $table b ON a.link_id1=b.link_id2 AND a.link_app1=b.link_app2
427 427
                         		JOIN $table c ON a.link_id2=c.link_id1 AND a.link_app2=c.link_app1 AND a.link_id!=c.link_id AND c.link_app2=b.link_app1 AND c.link_id2=b.link_id1",
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 			array('table'=>self::TABLE,
431 431
 				'cols'=>'a.*,c.link_app1 AS app3,c.link_id1 AS id3,c.link_id AS link3',
432 432
                      		'where'=>'a.link_app1='.self::$db->quote($app).' AND a.link_app2='.self::$db->quote($target_app).
433
-                        		(!$target_id ? '' : self::$db->expression(self::TABLE,' AND a.',array('link_id2' => $target_id))),
433
+                        		(!$target_id ? '' : self::$db->expression(self::TABLE, ' AND a.', array('link_id2' => $target_id))),
434 434
                        		'join'=>" a
435 435
                        			JOIN $table b ON a.link_id1=b.link_id2 AND a.link_app1=b.link_app2
436 436
                         		JOIN $table c ON a.link_id2=c.link_id2 AND a.link_app2=c.link_app2 AND a.link_id!=c.link_id AND c.link_app1=b.link_app1 AND c.link_id1=b.link_id1",
@@ -442,17 +442,17 @@  discard block
 block discarded – undo
442 442
 		{
443 443
 			list($offset, $limit) = $limit;
444 444
 		}
445
-		elseif($limit)
445
+		elseif ($limit)
446 446
 		{
447 447
 			$offset = 0;
448 448
 		}
449 449
 
450 450
 		$links = array();
451
-		foreach(self::$db->union($arrayofselects, __LINE__, __FILE__, $order, $offset, $limit) as $row)
451
+		foreach (self::$db->union($arrayofselects, __LINE__, __FILE__, $order, $offset, $limit) as $row)
452 452
 		{
453 453
 			if ($just_app_ids)
454 454
 			{
455
-				if ($row['link_app1'] == $target_app && (is_null($target_id) || in_array($row['link_id1'],(array)$target_id)))
455
+				if ($row['link_app1'] == $target_app && (is_null($target_id) || in_array($row['link_id1'], (array)$target_id)))
456 456
 				{
457 457
 					$links[$row['link_id']] = $row['link_id2'];
458 458
 				}
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 			}
464 464
 			else
465 465
 			{
466
-				$links[] = Api\Db::strip_array_keys($row,'link_');
466
+				$links[] = Api\Db::strip_array_keys($row, 'link_');
467 467
 			}
468 468
 		}
469 469
 		// if query returns exactly limit rows, we assume there are more and therefore set self::$limit_exceeded
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 	 */
478 478
 	static function init_static( )
479 479
 	{
480
-		self::$db     = $GLOBALS['egw']->db;
480
+		self::$db = $GLOBALS['egw']->db;
481 481
 	}
482 482
 }
483 483
 Storage::init_static();
Please login to merge, or discard this patch.
api/src/Storage/Db2DataIterator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
 	 * @param Base $storage
47 47
 	 * @param \Traversable $rs
48 48
 	 */
49
-	public function __construct(Base $storage, \Traversable $rs=null)
49
+	public function __construct(Base $storage, \Traversable $rs = null)
50 50
 	{
51 51
 		$this->storage = $storage;
52 52
 
53 53
 		$this->total = $storage->total;
54 54
 
55
-		if (is_a($rs,'IteratorAggregate'))
55
+		if (is_a($rs, 'IteratorAggregate'))
56 56
 		{
57 57
 			$this->rs = $rs->getIterator();
58 58
 		}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public function current()
71 71
 	{
72
-		if (is_a($this->rs,'iterator'))
72
+		if (is_a($this->rs, 'iterator'))
73 73
 		{
74 74
 			$data = $this->rs->current();
75 75
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function key()
87 87
 	{
88
-		if (is_a($this->rs,'iterator'))
88
+		if (is_a($this->rs, 'iterator'))
89 89
 		{
90 90
 			return $this->rs->key();
91 91
 		}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function next()
99 99
 	{
100
-		if (is_a($this->rs,'iterator'))
100
+		if (is_a($this->rs, 'iterator'))
101 101
 		{
102 102
 			return $this->rs->next();
103 103
 		}
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 */
109 109
 	public function rewind()
110 110
 	{
111
-		if (is_a($this->rs,'iterator'))
111
+		if (is_a($this->rs, 'iterator'))
112 112
 		{
113 113
 			return $this->rs->rewind();
114 114
 		}
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 	 *
120 120
 	 * @return boolean
121 121
 	 */
122
-	public function valid ()
122
+	public function valid()
123 123
 	{
124
-		if (is_a($this->rs,'iterator'))
124
+		if (is_a($this->rs, 'iterator'))
125 125
 		{
126 126
 			return $this->rs->valid();
127 127
 		}
Please login to merge, or discard this patch.
api/src/Storage/Base2.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 	 *
54 54
 	 * @return so_sql2
55 55
 	 */
56
-	function __construct($app='',$table='',Api\Db $db=null,$column_prefix='',$no_clone=false)
56
+	function __construct($app = '', $table = '', Api\Db $db = null, $column_prefix = '', $no_clone = false)
57 57
 	{
58
-		parent::__construct($app,$table,$db,$column_prefix,$no_clone);
58
+		parent::__construct($app, $table, $db, $column_prefix, $no_clone);
59 59
 	}
60 60
 
61 61
 	/**
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	function __get($property)
70 70
 	{
71
-		switch($property)
71
+		switch ($property)
72 72
 		{
73 73
 			case 'id':
74 74
 				$property = $this->autoinc_id;
75 75
 				break;
76 76
 		}
77
-		if (in_array($property,$this->db_cols) || in_array($property,$this->non_db_cols))
77
+		if (in_array($property, $this->db_cols) || in_array($property, $this->non_db_cols))
78 78
 		{
79 79
 			return $this->data[$property];
80 80
 		}
@@ -88,15 +88,15 @@  discard block
 block discarded – undo
88 88
 	 * @param string $property
89 89
 	 * @param mixed $value
90 90
 	 */
91
-	function __set($property,$value)
91
+	function __set($property, $value)
92 92
 	{
93
-		switch($property)
93
+		switch ($property)
94 94
 		{
95 95
 			case 'id':
96 96
 				$property = $this->autoinc_id;
97 97
 				break;
98 98
 		}
99
-		if (in_array($property,$this->db_cols) || in_array($property,$this->non_db_cols))
99
+		if (in_array($property, $this->db_cols) || in_array($property, $this->non_db_cols))
100 100
 		{
101 101
 			$this->data[$property] = $value;
102 102
 		}
Please login to merge, or discard this patch.
api/src/Exception/NoPermission/App.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  */
22 22
 class App extends Exception\NoPermission
23 23
 {
24
-	function __construct($msg=null,$code=101)
24
+	function __construct($msg = null, $code = 101)
25 25
 	{
26 26
 		if (isset($GLOBALS['egw_info']['apps'][$msg]))
27 27
 		{
@@ -39,6 +39,6 @@  discard block
 block discarded – undo
39 39
 						'"'.$app.'"');
40 40
 			}
41 41
 		}
42
-		parent::__construct($msg,$code);
42
+		parent::__construct($msg, $code);
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.