@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * @param string $password MySQL Password |
| 69 | 69 | * @param string $database MySQL Database name |
| 70 | 70 | * |
| 71 | - * @return boolean |
|
| 71 | + * @return null|boolean |
|
| 72 | 72 | */ |
| 73 | 73 | public function connect($host, $user, $password, $database = '') |
| 74 | 74 | { |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | /** |
| 135 | 135 | * Fetch a result row as an object |
| 136 | 136 | * |
| 137 | - * @param mixed $result Resultset |
|
| 137 | + * @param resource $result Resultset |
|
| 138 | 138 | * @return mixed |
| 139 | 139 | */ |
| 140 | 140 | public function fetchObject($result) |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | * |
| 274 | 274 | * @param string $prefix Table prefix |
| 275 | 275 | * |
| 276 | - * @return array |
|
| 276 | + * @return string[] |
|
| 277 | 277 | */ |
| 278 | 278 | public function getTableNames($prefix = '') |
| 279 | 279 | { |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | { |
| 175 | 175 | $ret = array(); |
| 176 | 176 | if (false === $result) { |
| 177 | - throw new Exception('Error while fetching result: ' . $this->error()); |
|
| 177 | + throw new Exception('Error while fetching result: '.$this->error()); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | while ($row = $this->fetchObject($result)) { |
@@ -303,41 +303,41 @@ discard block |
||
| 303 | 303 | public function getTableNames($prefix = '') |
| 304 | 304 | { |
| 305 | 305 | return $this->tableNames[] = array( |
| 306 | - $prefix . 'faqadminlog', |
|
| 307 | - $prefix . 'faqattachment', |
|
| 308 | - $prefix . 'faqattachment_file', |
|
| 309 | - $prefix . 'faqcaptcha', |
|
| 310 | - $prefix . 'faqcategories', |
|
| 311 | - $prefix . 'faqcategory_group', |
|
| 312 | - $prefix . 'faqcategory_user', |
|
| 313 | - $prefix . 'faqcategoryrelations', |
|
| 314 | - $prefix . 'faqchanges', |
|
| 315 | - $prefix . 'faqcomments', |
|
| 316 | - $prefix . 'faqconfig', |
|
| 317 | - $prefix . 'faqdata', |
|
| 318 | - $prefix . 'faqdata_group', |
|
| 319 | - $prefix . 'faqdata_revisions', |
|
| 320 | - $prefix . 'faqdata_tags', |
|
| 321 | - $prefix . 'faqdata_user', |
|
| 322 | - $prefix . 'faqglossary', |
|
| 323 | - $prefix . 'faqgroup', |
|
| 324 | - $prefix . 'faqgroup_right', |
|
| 325 | - $prefix . 'faqinstances', |
|
| 326 | - $prefix . 'faqinstances_config', |
|
| 327 | - $prefix . 'faqnews', |
|
| 328 | - $prefix . 'faqquestions', |
|
| 329 | - $prefix . 'faqright', |
|
| 330 | - $prefix . 'faqsearches', |
|
| 331 | - $prefix . 'faqsessions', |
|
| 332 | - $prefix . 'faqstopwords', |
|
| 333 | - $prefix . 'faqtags', |
|
| 334 | - $prefix . 'faquser', |
|
| 335 | - $prefix . 'faquser_group', |
|
| 336 | - $prefix . 'faquser_right', |
|
| 337 | - $prefix . 'faquserdata', |
|
| 338 | - $prefix . 'faquserlogin', |
|
| 339 | - $prefix . 'faqvisits', |
|
| 340 | - $prefix . 'faqvoting' |
|
| 306 | + $prefix.'faqadminlog', |
|
| 307 | + $prefix.'faqattachment', |
|
| 308 | + $prefix.'faqattachment_file', |
|
| 309 | + $prefix.'faqcaptcha', |
|
| 310 | + $prefix.'faqcategories', |
|
| 311 | + $prefix.'faqcategory_group', |
|
| 312 | + $prefix.'faqcategory_user', |
|
| 313 | + $prefix.'faqcategoryrelations', |
|
| 314 | + $prefix.'faqchanges', |
|
| 315 | + $prefix.'faqcomments', |
|
| 316 | + $prefix.'faqconfig', |
|
| 317 | + $prefix.'faqdata', |
|
| 318 | + $prefix.'faqdata_group', |
|
| 319 | + $prefix.'faqdata_revisions', |
|
| 320 | + $prefix.'faqdata_tags', |
|
| 321 | + $prefix.'faqdata_user', |
|
| 322 | + $prefix.'faqglossary', |
|
| 323 | + $prefix.'faqgroup', |
|
| 324 | + $prefix.'faqgroup_right', |
|
| 325 | + $prefix.'faqinstances', |
|
| 326 | + $prefix.'faqinstances_config', |
|
| 327 | + $prefix.'faqnews', |
|
| 328 | + $prefix.'faqquestions', |
|
| 329 | + $prefix.'faqright', |
|
| 330 | + $prefix.'faqsearches', |
|
| 331 | + $prefix.'faqsessions', |
|
| 332 | + $prefix.'faqstopwords', |
|
| 333 | + $prefix.'faqtags', |
|
| 334 | + $prefix.'faquser', |
|
| 335 | + $prefix.'faquser_group', |
|
| 336 | + $prefix.'faquser_right', |
|
| 337 | + $prefix.'faquserdata', |
|
| 338 | + $prefix.'faquserlogin', |
|
| 339 | + $prefix.'faqvisits', |
|
| 340 | + $prefix.'faqvoting' |
|
| 341 | 341 | ); |
| 342 | 342 | } |
| 343 | 343 | |
@@ -227,8 +227,8 @@ discard block |
||
| 227 | 227 | MAX(%s) AS current_id |
| 228 | 228 | FROM |
| 229 | 229 | %s", |
| 230 | - $id, |
|
| 231 | - $table); |
|
| 230 | + $id, |
|
| 231 | + $table); |
|
| 232 | 232 | |
| 233 | 233 | $result = $this->query($select); |
| 234 | 234 | $currentId = mysql_result($result, 0, 'current_id'); |
@@ -236,11 +236,11 @@ discard block |
||
| 236 | 236 | return ($currentId + 1); |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | - /** |
|
| 240 | - * Returns the error string. |
|
| 241 | - * |
|
| 242 | - * @return string |
|
| 243 | - */ |
|
| 239 | + /** |
|
| 240 | + * Returns the error string. |
|
| 241 | + * |
|
| 242 | + * @return string |
|
| 243 | + */ |
|
| 244 | 244 | public function error() |
| 245 | 245 | { |
| 246 | 246 | return mysql_error(); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * @throws PMF_Exception |
| 70 | 70 | * |
| 71 | - * @return boolean true, if connected, otherwise false |
|
| 71 | + * @return null|boolean true, if connected, otherwise false |
|
| 72 | 72 | */ |
| 73 | 73 | public function connect($host, $user, $password, $database = '') |
| 74 | 74 | { |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * |
| 138 | 138 | * This function fetches a result row as an object. |
| 139 | 139 | * |
| 140 | - * @param mixed $result |
|
| 140 | + * @param resource $result |
|
| 141 | 141 | * @return mixed |
| 142 | 142 | */ |
| 143 | 143 | public function fetchObject($result) |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | * |
| 283 | 283 | * @param string $prefix Table prefix |
| 284 | 284 | * |
| 285 | - * @return array |
|
| 285 | + * @return string[] |
|
| 286 | 286 | */ |
| 287 | 287 | public function getTableNames($prefix = '') |
| 288 | 288 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $this->conn = new mysqli($host, $user, $password); |
| 76 | 76 | |
| 77 | 77 | if ($this->conn->connect_error) { |
| 78 | - PMF_Db::errorPage($this->conn->connect_errno . ': ' . $this->conn->connect_error); |
|
| 78 | + PMF_Db::errorPage($this->conn->connect_errno.': '.$this->conn->connect_error); |
|
| 79 | 79 | die(); |
| 80 | 80 | } |
| 81 | 81 | |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if ('' !== $database) { |
| 88 | - if (! $this->conn->select_db($database)) { |
|
| 89 | - throw new PMF_Exception('Cannot connect to database ' . $database); |
|
| 88 | + if (!$this->conn->select_db($database)) { |
|
| 89 | + throw new PMF_Exception('Cannot connect to database '.$database); |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | $ret = array(); |
| 173 | 173 | |
| 174 | 174 | if (false === $result) { |
| 175 | - throw new Exception('Error while fetching result: ' . $this->error()); |
|
| 175 | + throw new Exception('Error while fetching result: '.$this->error()); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | while ($row = $this->fetchObject($result)) { |
@@ -287,41 +287,41 @@ discard block |
||
| 287 | 287 | public function getTableNames($prefix = '') |
| 288 | 288 | { |
| 289 | 289 | return $this->tableNames[] = array( |
| 290 | - $prefix . 'faqadminlog', |
|
| 291 | - $prefix . 'faqattachment', |
|
| 292 | - $prefix . 'faqattachment_file', |
|
| 293 | - $prefix . 'faqcaptcha', |
|
| 294 | - $prefix . 'faqcategories', |
|
| 295 | - $prefix . 'faqcategory_group', |
|
| 296 | - $prefix . 'faqcategory_user', |
|
| 297 | - $prefix . 'faqcategoryrelations', |
|
| 298 | - $prefix . 'faqchanges', |
|
| 299 | - $prefix . 'faqcomments', |
|
| 300 | - $prefix . 'faqconfig', |
|
| 301 | - $prefix . 'faqdata', |
|
| 302 | - $prefix . 'faqdata_group', |
|
| 303 | - $prefix . 'faqdata_revisions', |
|
| 304 | - $prefix . 'faqdata_tags', |
|
| 305 | - $prefix . 'faqdata_user', |
|
| 306 | - $prefix . 'faqglossary', |
|
| 307 | - $prefix . 'faqgroup', |
|
| 308 | - $prefix . 'faqgroup_right', |
|
| 309 | - $prefix . 'faqinstances', |
|
| 310 | - $prefix . 'faqinstances_config', |
|
| 311 | - $prefix . 'faqnews', |
|
| 312 | - $prefix . 'faqquestions', |
|
| 313 | - $prefix . 'faqright', |
|
| 314 | - $prefix . 'faqsearches', |
|
| 315 | - $prefix . 'faqsessions', |
|
| 316 | - $prefix . 'faqstopwords', |
|
| 317 | - $prefix . 'faqtags', |
|
| 318 | - $prefix . 'faquser', |
|
| 319 | - $prefix . 'faquser_group', |
|
| 320 | - $prefix . 'faquser_right', |
|
| 321 | - $prefix . 'faquserdata', |
|
| 322 | - $prefix . 'faquserlogin', |
|
| 323 | - $prefix . 'faqvisits', |
|
| 324 | - $prefix . 'faqvoting' |
|
| 290 | + $prefix.'faqadminlog', |
|
| 291 | + $prefix.'faqattachment', |
|
| 292 | + $prefix.'faqattachment_file', |
|
| 293 | + $prefix.'faqcaptcha', |
|
| 294 | + $prefix.'faqcategories', |
|
| 295 | + $prefix.'faqcategory_group', |
|
| 296 | + $prefix.'faqcategory_user', |
|
| 297 | + $prefix.'faqcategoryrelations', |
|
| 298 | + $prefix.'faqchanges', |
|
| 299 | + $prefix.'faqcomments', |
|
| 300 | + $prefix.'faqconfig', |
|
| 301 | + $prefix.'faqdata', |
|
| 302 | + $prefix.'faqdata_group', |
|
| 303 | + $prefix.'faqdata_revisions', |
|
| 304 | + $prefix.'faqdata_tags', |
|
| 305 | + $prefix.'faqdata_user', |
|
| 306 | + $prefix.'faqglossary', |
|
| 307 | + $prefix.'faqgroup', |
|
| 308 | + $prefix.'faqgroup_right', |
|
| 309 | + $prefix.'faqinstances', |
|
| 310 | + $prefix.'faqinstances_config', |
|
| 311 | + $prefix.'faqnews', |
|
| 312 | + $prefix.'faqquestions', |
|
| 313 | + $prefix.'faqright', |
|
| 314 | + $prefix.'faqsearches', |
|
| 315 | + $prefix.'faqsessions', |
|
| 316 | + $prefix.'faqstopwords', |
|
| 317 | + $prefix.'faqtags', |
|
| 318 | + $prefix.'faquser', |
|
| 319 | + $prefix.'faquser_group', |
|
| 320 | + $prefix.'faquser_right', |
|
| 321 | + $prefix.'faquserdata', |
|
| 322 | + $prefix.'faquserlogin', |
|
| 323 | + $prefix.'faqvisits', |
|
| 324 | + $prefix.'faqvoting' |
|
| 325 | 325 | ); |
| 326 | 326 | } |
| 327 | 327 | |
@@ -122,11 +122,11 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | - * Escapes a string for use in a query |
|
| 126 | - * |
|
| 127 | - * @param string |
|
| 128 | - * @return string |
|
| 129 | - */ |
|
| 125 | + * Escapes a string for use in a query |
|
| 126 | + * |
|
| 127 | + * @param string |
|
| 128 | + * @return string |
|
| 129 | + */ |
|
| 130 | 130 | public function escape($string) |
| 131 | 131 | { |
| 132 | 132 | return $this->conn->real_escape_string($string); |
@@ -207,11 +207,11 @@ discard block |
||
| 207 | 207 | return $this->sqllog; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | - /** |
|
| 211 | - * This function returns the table status. |
|
| 212 | - * |
|
| 213 | - * @return array |
|
| 214 | - */ |
|
| 210 | + /** |
|
| 211 | + * This function returns the table status. |
|
| 212 | + * |
|
| 213 | + * @return array |
|
| 214 | + */ |
|
| 215 | 215 | public function getTableStatus() |
| 216 | 216 | { |
| 217 | 217 | $arr = array(); |
@@ -237,19 +237,19 @@ discard block |
||
| 237 | 237 | MAX(%s) AS current_id |
| 238 | 238 | FROM |
| 239 | 239 | %s", |
| 240 | - $id, |
|
| 241 | - $table); |
|
| 240 | + $id, |
|
| 241 | + $table); |
|
| 242 | 242 | |
| 243 | 243 | $result = $this->query($select); |
| 244 | 244 | $current = $result->fetch_row(); |
| 245 | 245 | return $current[0] + 1; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | - /** |
|
| 249 | - * Returns the error string. |
|
| 250 | - * |
|
| 251 | - * @return string |
|
| 252 | - */ |
|
| 248 | + /** |
|
| 249 | + * Returns the error string. |
|
| 250 | + * |
|
| 251 | + * @return string |
|
| 252 | + */ |
|
| 253 | 253 | public function error() |
| 254 | 254 | { |
| 255 | 255 | return $this->conn->error; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * @param string $password Password |
| 67 | 67 | * @param string $database Database name |
| 68 | 68 | * |
| 69 | - * @return boolean true, if connected, otherwise false |
|
| 69 | + * @return null|boolean true, if connected, otherwise false |
|
| 70 | 70 | */ |
| 71 | 71 | public function connect ($host, $user, $password, $database = '') |
| 72 | 72 | { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | /** |
| 133 | 133 | * Fetch a result row as an object |
| 134 | 134 | * |
| 135 | - * @param mixed $result |
|
| 135 | + * @param resource $result |
|
| 136 | 136 | * @return mixed |
| 137 | 137 | */ |
| 138 | 138 | public function fetchObject($result) |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | /** |
| 191 | 191 | * Logs the queries |
| 192 | 192 | * |
| 193 | - * @return integer |
|
| 193 | + * @return string |
|
| 194 | 194 | */ |
| 195 | 195 | public function log() |
| 196 | 196 | { |
@@ -201,6 +201,7 @@ discard block |
||
| 201 | 201 | * Returns just one row |
| 202 | 202 | * |
| 203 | 203 | * @param string |
| 204 | + * @param string $query |
|
| 204 | 205 | * @return string |
| 205 | 206 | */ |
| 206 | 207 | private function getOne($query) |
@@ -287,7 +288,7 @@ discard block |
||
| 287 | 288 | * |
| 288 | 289 | * @param string $prefix Table prefix |
| 289 | 290 | * |
| 290 | - * @return array |
|
| 291 | + * @return string[] |
|
| 291 | 292 | */ |
| 292 | 293 | public function getTableNames($prefix = '') |
| 293 | 294 | { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * |
| 69 | 69 | * @return boolean true, if connected, otherwise false |
| 70 | 70 | */ |
| 71 | - public function connect ($host, $user, $password, $database = '') |
|
| 71 | + public function connect($host, $user, $password, $database = '') |
|
| 72 | 72 | { |
| 73 | 73 | $connectionString = sprintf( |
| 74 | 74 | 'host=%s port=5432 dbname=%s user=%s password=%s', |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | { |
| 167 | 167 | $ret = array(); |
| 168 | 168 | if (false === $result) { |
| 169 | - throw new Exception('Error while fetching result: ' . $this->error()); |
|
| 169 | + throw new Exception('Error while fetching result: '.$this->error()); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | while ($row = $this->fetchObject($result)) { |
@@ -292,41 +292,41 @@ discard block |
||
| 292 | 292 | public function getTableNames($prefix = '') |
| 293 | 293 | { |
| 294 | 294 | return $this->tableNames[] = array( |
| 295 | - $prefix . 'faqadminlog', |
|
| 296 | - $prefix . 'faqattachment', |
|
| 297 | - $prefix . 'faqattachment_file', |
|
| 298 | - $prefix . 'faqcaptcha', |
|
| 299 | - $prefix . 'faqcategories', |
|
| 300 | - $prefix . 'faqcategory_group', |
|
| 301 | - $prefix . 'faqcategory_user', |
|
| 302 | - $prefix . 'faqcategoryrelations', |
|
| 303 | - $prefix . 'faqchanges', |
|
| 304 | - $prefix . 'faqcomments', |
|
| 305 | - $prefix . 'faqconfig', |
|
| 306 | - $prefix . 'faqdata', |
|
| 307 | - $prefix . 'faqdata_group', |
|
| 308 | - $prefix . 'faqdata_revisions', |
|
| 309 | - $prefix . 'faqdata_tags', |
|
| 310 | - $prefix . 'faqdata_user', |
|
| 311 | - $prefix . 'faqglossary', |
|
| 312 | - $prefix . 'faqgroup', |
|
| 313 | - $prefix . 'faqgroup_right', |
|
| 314 | - $prefix . 'faqinstances', |
|
| 315 | - $prefix . 'faqinstances_config', |
|
| 316 | - $prefix . 'faqnews', |
|
| 317 | - $prefix . 'faqquestions', |
|
| 318 | - $prefix . 'faqright', |
|
| 319 | - $prefix . 'faqsearches', |
|
| 320 | - $prefix . 'faqsessions', |
|
| 321 | - $prefix . 'faqstopwords', |
|
| 322 | - $prefix . 'faqtags', |
|
| 323 | - $prefix . 'faquser', |
|
| 324 | - $prefix . 'faquser_group', |
|
| 325 | - $prefix . 'faquser_right', |
|
| 326 | - $prefix . 'faquserdata', |
|
| 327 | - $prefix . 'faquserlogin', |
|
| 328 | - $prefix . 'faqvisits', |
|
| 329 | - $prefix . 'faqvoting' |
|
| 295 | + $prefix.'faqadminlog', |
|
| 296 | + $prefix.'faqattachment', |
|
| 297 | + $prefix.'faqattachment_file', |
|
| 298 | + $prefix.'faqcaptcha', |
|
| 299 | + $prefix.'faqcategories', |
|
| 300 | + $prefix.'faqcategory_group', |
|
| 301 | + $prefix.'faqcategory_user', |
|
| 302 | + $prefix.'faqcategoryrelations', |
|
| 303 | + $prefix.'faqchanges', |
|
| 304 | + $prefix.'faqcomments', |
|
| 305 | + $prefix.'faqconfig', |
|
| 306 | + $prefix.'faqdata', |
|
| 307 | + $prefix.'faqdata_group', |
|
| 308 | + $prefix.'faqdata_revisions', |
|
| 309 | + $prefix.'faqdata_tags', |
|
| 310 | + $prefix.'faqdata_user', |
|
| 311 | + $prefix.'faqglossary', |
|
| 312 | + $prefix.'faqgroup', |
|
| 313 | + $prefix.'faqgroup_right', |
|
| 314 | + $prefix.'faqinstances', |
|
| 315 | + $prefix.'faqinstances_config', |
|
| 316 | + $prefix.'faqnews', |
|
| 317 | + $prefix.'faqquestions', |
|
| 318 | + $prefix.'faqright', |
|
| 319 | + $prefix.'faqsearches', |
|
| 320 | + $prefix.'faqsessions', |
|
| 321 | + $prefix.'faqstopwords', |
|
| 322 | + $prefix.'faqtags', |
|
| 323 | + $prefix.'faquser', |
|
| 324 | + $prefix.'faquser_group', |
|
| 325 | + $prefix.'faquser_right', |
|
| 326 | + $prefix.'faquserdata', |
|
| 327 | + $prefix.'faquserlogin', |
|
| 328 | + $prefix.'faqvisits', |
|
| 329 | + $prefix.'faqvoting' |
|
| 330 | 330 | ); |
| 331 | 331 | } |
| 332 | 332 | |
@@ -119,11 +119,11 @@ |
||
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
| 122 | - * Escapes a string for use in a query |
|
| 123 | - * |
|
| 124 | - * @param string |
|
| 125 | - * @return string |
|
| 126 | - */ |
|
| 122 | + * Escapes a string for use in a query |
|
| 123 | + * |
|
| 124 | + * @param string |
|
| 125 | + * @return string |
|
| 126 | + */ |
|
| 127 | 127 | public function escape($string) |
| 128 | 128 | { |
| 129 | 129 | return pg_escape_string($this->conn, $string); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * @param string |
| 69 | 69 | * @param string |
| 70 | 70 | * |
| 71 | - * @return boolean |
|
| 71 | + * @return null|boolean |
|
| 72 | 72 | */ |
| 73 | 73 | public function connect($host, $user, $passwd, $db = '') |
| 74 | 74 | { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | * @param integer $offset |
| 100 | 100 | * @param integer $rowcount |
| 101 | 101 | * |
| 102 | - * @return mixed $result |
|
| 102 | + * @return SQLiteResult $result |
|
| 103 | 103 | */ |
| 104 | 104 | public function query($query, $offset = 0, $rowcount = 0) |
| 105 | 105 | { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | /** |
| 146 | 146 | * Fetch a result row as an associate array |
| 147 | 147 | * |
| 148 | - * @param mixed $result |
|
| 148 | + * @param SQLiteResult $result |
|
| 149 | 149 | * @return array |
| 150 | 150 | */ |
| 151 | 151 | public function fetchArray($result) |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | /** |
| 180 | 180 | * Number of rows in a result |
| 181 | 181 | * |
| 182 | - * @param mixed $result |
|
| 182 | + * @param SQLiteResult $result |
|
| 183 | 183 | * @return integer |
| 184 | 184 | */ |
| 185 | 185 | public function numRows($result) |
@@ -190,8 +190,7 @@ discard block |
||
| 190 | 190 | /** |
| 191 | 191 | * Logs the queries |
| 192 | 192 | * |
| 193 | - * @param mixed $result |
|
| 194 | - * @return integer |
|
| 193 | + * @return string |
|
| 195 | 194 | */ |
| 196 | 195 | public function log() |
| 197 | 196 | { |
@@ -270,7 +269,7 @@ discard block |
||
| 270 | 269 | * |
| 271 | 270 | * @param string $prefix Table prefix |
| 272 | 271 | * |
| 273 | - * @return array |
|
| 272 | + * @return string[] |
|
| 274 | 273 | */ |
| 275 | 274 | public function getTableNames($prefix = '') |
| 276 | 275 | { |
@@ -324,7 +323,7 @@ discard block |
||
| 324 | 323 | /** |
| 325 | 324 | * Closes the connection to the database. |
| 326 | 325 | * |
| 327 | - * @return boolean |
|
| 326 | + * @return boolean|null |
|
| 328 | 327 | */ |
| 329 | 328 | public function close() |
| 330 | 329 | { |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | { |
| 175 | 175 | $ret = array(); |
| 176 | 176 | if (false === $result) { |
| 177 | - throw new Exception('Error while fetching result: ' . $this->error()); |
|
| 177 | + throw new Exception('Error while fetching result: '.$this->error()); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | while ($row = $this->fetchObject($result)) { |
@@ -303,41 +303,41 @@ discard block |
||
| 303 | 303 | public function getTableNames($prefix = '') |
| 304 | 304 | { |
| 305 | 305 | return $this->tableNames[] = array( |
| 306 | - $prefix . 'faqadminlog', |
|
| 307 | - $prefix . 'faqattachment', |
|
| 308 | - $prefix . 'faqattachment_file', |
|
| 309 | - $prefix . 'faqcaptcha', |
|
| 310 | - $prefix . 'faqcategories', |
|
| 311 | - $prefix . 'faqcategory_group', |
|
| 312 | - $prefix . 'faqcategory_user', |
|
| 313 | - $prefix . 'faqcategoryrelations', |
|
| 314 | - $prefix . 'faqchanges', |
|
| 315 | - $prefix . 'faqcomments', |
|
| 316 | - $prefix . 'faqconfig', |
|
| 317 | - $prefix . 'faqdata', |
|
| 318 | - $prefix . 'faqdata_group', |
|
| 319 | - $prefix . 'faqdata_revisions', |
|
| 320 | - $prefix . 'faqdata_tags', |
|
| 321 | - $prefix . 'faqdata_user', |
|
| 322 | - $prefix . 'faqglossary', |
|
| 323 | - $prefix . 'faqgroup', |
|
| 324 | - $prefix . 'faqgroup_right', |
|
| 325 | - $prefix . 'faqinstances', |
|
| 326 | - $prefix . 'faqinstances_config', |
|
| 327 | - $prefix . 'faqnews', |
|
| 328 | - $prefix . 'faqquestions', |
|
| 329 | - $prefix . 'faqright', |
|
| 330 | - $prefix . 'faqsearches', |
|
| 331 | - $prefix . 'faqsessions', |
|
| 332 | - $prefix . 'faqstopwords', |
|
| 333 | - $prefix . 'faqtags', |
|
| 334 | - $prefix . 'faquser', |
|
| 335 | - $prefix . 'faquser_group', |
|
| 336 | - $prefix . 'faquser_right', |
|
| 337 | - $prefix . 'faquserdata', |
|
| 338 | - $prefix . 'faquserlogin', |
|
| 339 | - $prefix . 'faqvisits', |
|
| 340 | - $prefix . 'faqvoting' |
|
| 306 | + $prefix.'faqadminlog', |
|
| 307 | + $prefix.'faqattachment', |
|
| 308 | + $prefix.'faqattachment_file', |
|
| 309 | + $prefix.'faqcaptcha', |
|
| 310 | + $prefix.'faqcategories', |
|
| 311 | + $prefix.'faqcategory_group', |
|
| 312 | + $prefix.'faqcategory_user', |
|
| 313 | + $prefix.'faqcategoryrelations', |
|
| 314 | + $prefix.'faqchanges', |
|
| 315 | + $prefix.'faqcomments', |
|
| 316 | + $prefix.'faqconfig', |
|
| 317 | + $prefix.'faqdata', |
|
| 318 | + $prefix.'faqdata_group', |
|
| 319 | + $prefix.'faqdata_revisions', |
|
| 320 | + $prefix.'faqdata_tags', |
|
| 321 | + $prefix.'faqdata_user', |
|
| 322 | + $prefix.'faqglossary', |
|
| 323 | + $prefix.'faqgroup', |
|
| 324 | + $prefix.'faqgroup_right', |
|
| 325 | + $prefix.'faqinstances', |
|
| 326 | + $prefix.'faqinstances_config', |
|
| 327 | + $prefix.'faqnews', |
|
| 328 | + $prefix.'faqquestions', |
|
| 329 | + $prefix.'faqright', |
|
| 330 | + $prefix.'faqsearches', |
|
| 331 | + $prefix.'faqsessions', |
|
| 332 | + $prefix.'faqstopwords', |
|
| 333 | + $prefix.'faqtags', |
|
| 334 | + $prefix.'faquser', |
|
| 335 | + $prefix.'faquser_group', |
|
| 336 | + $prefix.'faquser_right', |
|
| 337 | + $prefix.'faquserdata', |
|
| 338 | + $prefix.'faquserlogin', |
|
| 339 | + $prefix.'faqvisits', |
|
| 340 | + $prefix.'faqvoting' |
|
| 341 | 341 | ); |
| 342 | 342 | } |
| 343 | 343 | |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | */ |
| 117 | 117 | public function escape($string) |
| 118 | 118 | { |
| 119 | - return sqlite_escape_string($string); |
|
| 119 | + return sqlite_escape_string($string); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @param string |
| 66 | 66 | * @param string |
| 67 | 67 | * |
| 68 | - * @return boolean |
|
| 68 | + * @return null|boolean |
|
| 69 | 69 | */ |
| 70 | 70 | public function connect($host, $user, $passwd, $db = '') |
| 71 | 71 | { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * @param integer $offset |
| 85 | 85 | * @param integer $rowcount |
| 86 | 86 | * |
| 87 | - * @return mixed $result |
|
| 87 | + * @return SQLite3Result $result |
|
| 88 | 88 | */ |
| 89 | 89 | public function query($query, $offset = 0, $rowcount = 0) |
| 90 | 90 | { |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * |
| 151 | 151 | * @param SQLite3Result $result |
| 152 | 152 | * |
| 153 | - * @return array |
|
| 153 | + * @return SQLite3Result |
|
| 154 | 154 | */ |
| 155 | 155 | public function fetchAssoc($result) |
| 156 | 156 | { |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | /** |
| 203 | 203 | * Logs the queries |
| 204 | 204 | * |
| 205 | - * @return integer |
|
| 205 | + * @return string |
|
| 206 | 206 | */ |
| 207 | 207 | public function log() |
| 208 | 208 | { |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | * |
| 235 | 235 | * @param string $prefix Table prefix |
| 236 | 236 | * |
| 237 | - * @return array |
|
| 237 | + * @return string[] |
|
| 238 | 238 | */ |
| 239 | 239 | public function getTableNames($prefix = '') |
| 240 | 240 | { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | public function fetchObject($result) |
| 126 | 126 | { |
| 127 | - $result->fetchedByPMF= true; |
|
| 127 | + $result->fetchedByPMF = true; |
|
| 128 | 128 | $return = $result->fetchArray(SQLITE3_ASSOC); |
| 129 | 129 | |
| 130 | 130 | return $return |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public function fetchArray($result) |
| 143 | 143 | { |
| 144 | - $result->fetchedByPMF= true; |
|
| 144 | + $result->fetchedByPMF = true; |
|
| 145 | 145 | return $result->fetchArray(); |
| 146 | 146 | } |
| 147 | 147 | |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | public function fetchAssoc($result) |
| 156 | 156 | { |
| 157 | - $result->fetchedByPMF= true; |
|
| 157 | + $result->fetchedByPMF = true; |
|
| 158 | 158 | return $result->fetchArray(SQLITE3_ASSOC); |
| 159 | 159 | } |
| 160 | 160 | |
@@ -171,11 +171,11 @@ discard block |
||
| 171 | 171 | { |
| 172 | 172 | $ret = array(); |
| 173 | 173 | if (false === $result) { |
| 174 | - throw new Exception('Error while fetching result: ' . $this->error()); |
|
| 174 | + throw new Exception('Error while fetching result: '.$this->error()); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - $result->fetchedByPMF= true; |
|
| 178 | - while( $row=$result->fetchArray(SQLITE3_ASSOC) ) { |
|
| 177 | + $result->fetchedByPMF = true; |
|
| 178 | + while ($row = $result->fetchArray(SQLITE3_ASSOC)) { |
|
| 179 | 179 | $ret[] = (object)$row; |
| 180 | 180 | } |
| 181 | 181 | |
@@ -190,9 +190,9 @@ discard block |
||
| 190 | 190 | */ |
| 191 | 191 | public function numRows($result) |
| 192 | 192 | { |
| 193 | - !isset( $result->fetchedByPMF ) || !$result->fetchedByPMF || die( "Do not call numRows() after you've fetched one or more result records, because PMF_DB_Sqlite3::numRows() has to reset the resultset at its end." ); |
|
| 194 | - $numberOfRows= 0; |
|
| 195 | - while( $result->fetchArray(SQLITE3_NUM) ) { |
|
| 193 | + !isset($result->fetchedByPMF) || !$result->fetchedByPMF || die("Do not call numRows() after you've fetched one or more result records, because PMF_DB_Sqlite3::numRows() has to reset the resultset at its end."); |
|
| 194 | + $numberOfRows = 0; |
|
| 195 | + while ($result->fetchArray(SQLITE3_NUM)) { |
|
| 196 | 196 | $numberOfRows++; |
| 197 | 197 | } |
| 198 | 198 | $result->reset(); |
@@ -239,41 +239,41 @@ discard block |
||
| 239 | 239 | public function getTableNames($prefix = '') |
| 240 | 240 | { |
| 241 | 241 | return $this->tableNames[] = array( |
| 242 | - $prefix . 'faqadminlog', |
|
| 243 | - $prefix . 'faqattachment', |
|
| 244 | - $prefix . 'faqattachment_file', |
|
| 245 | - $prefix . 'faqcaptcha', |
|
| 246 | - $prefix . 'faqcategories', |
|
| 247 | - $prefix . 'faqcategory_group', |
|
| 248 | - $prefix . 'faqcategory_user', |
|
| 249 | - $prefix . 'faqcategoryrelations', |
|
| 250 | - $prefix . 'faqchanges', |
|
| 251 | - $prefix . 'faqcomments', |
|
| 252 | - $prefix . 'faqconfig', |
|
| 253 | - $prefix . 'faqdata', |
|
| 254 | - $prefix . 'faqdata_group', |
|
| 255 | - $prefix . 'faqdata_revisions', |
|
| 256 | - $prefix . 'faqdata_tags', |
|
| 257 | - $prefix . 'faqdata_user', |
|
| 258 | - $prefix . 'faqglossary', |
|
| 259 | - $prefix . 'faqgroup', |
|
| 260 | - $prefix . 'faqgroup_right', |
|
| 261 | - $prefix . 'faqinstances', |
|
| 262 | - $prefix . 'faqinstances_config', |
|
| 263 | - $prefix . 'faqnews', |
|
| 264 | - $prefix . 'faqquestions', |
|
| 265 | - $prefix . 'faqright', |
|
| 266 | - $prefix . 'faqsearches', |
|
| 267 | - $prefix . 'faqsessions', |
|
| 268 | - $prefix . 'faqstopwords', |
|
| 269 | - $prefix . 'faqtags', |
|
| 270 | - $prefix . 'faquser', |
|
| 271 | - $prefix . 'faquser_group', |
|
| 272 | - $prefix . 'faquser_right', |
|
| 273 | - $prefix . 'faquserdata', |
|
| 274 | - $prefix . 'faquserlogin', |
|
| 275 | - $prefix . 'faqvisits', |
|
| 276 | - $prefix . 'faqvoting' |
|
| 242 | + $prefix.'faqadminlog', |
|
| 243 | + $prefix.'faqattachment', |
|
| 244 | + $prefix.'faqattachment_file', |
|
| 245 | + $prefix.'faqcaptcha', |
|
| 246 | + $prefix.'faqcategories', |
|
| 247 | + $prefix.'faqcategory_group', |
|
| 248 | + $prefix.'faqcategory_user', |
|
| 249 | + $prefix.'faqcategoryrelations', |
|
| 250 | + $prefix.'faqchanges', |
|
| 251 | + $prefix.'faqcomments', |
|
| 252 | + $prefix.'faqconfig', |
|
| 253 | + $prefix.'faqdata', |
|
| 254 | + $prefix.'faqdata_group', |
|
| 255 | + $prefix.'faqdata_revisions', |
|
| 256 | + $prefix.'faqdata_tags', |
|
| 257 | + $prefix.'faqdata_user', |
|
| 258 | + $prefix.'faqglossary', |
|
| 259 | + $prefix.'faqgroup', |
|
| 260 | + $prefix.'faqgroup_right', |
|
| 261 | + $prefix.'faqinstances', |
|
| 262 | + $prefix.'faqinstances_config', |
|
| 263 | + $prefix.'faqnews', |
|
| 264 | + $prefix.'faqquestions', |
|
| 265 | + $prefix.'faqright', |
|
| 266 | + $prefix.'faqsearches', |
|
| 267 | + $prefix.'faqsessions', |
|
| 268 | + $prefix.'faqstopwords', |
|
| 269 | + $prefix.'faqtags', |
|
| 270 | + $prefix.'faquser', |
|
| 271 | + $prefix.'faquser_group', |
|
| 272 | + $prefix.'faquser_right', |
|
| 273 | + $prefix.'faquserdata', |
|
| 274 | + $prefix.'faquserlogin', |
|
| 275 | + $prefix.'faqvisits', |
|
| 276 | + $prefix.'faqvoting' |
|
| 277 | 277 | ); |
| 278 | 278 | } |
| 279 | 279 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * SQL Server Authentication |
| 75 | 75 | * @param string $database Specifies the name of the database in use for the connection being established |
| 76 | 76 | * |
| 77 | - * @return boolean true, if connected, otherwise false |
|
| 77 | + * @return null|boolean true, if connected, otherwise false |
|
| 78 | 78 | */ |
| 79 | 79 | public function connect($host, $user, $password, $database = '') |
| 80 | 80 | { |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * @param integer $offset |
| 114 | 114 | * @param integer $rowcount |
| 115 | 115 | * |
| 116 | - * @return mixed $result |
|
| 116 | + * @return resource $result |
|
| 117 | 117 | */ |
| 118 | 118 | public function query($query, $offset = 0, $rowcount = 0) |
| 119 | 119 | { |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | /** |
| 208 | 208 | * Logs the queries |
| 209 | 209 | * |
| 210 | - * @return integer |
|
| 210 | + * @return string |
|
| 211 | 211 | */ |
| 212 | 212 | public function log() |
| 213 | 213 | { |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | /** |
| 268 | 268 | * Returns the error string. |
| 269 | 269 | * |
| 270 | - * @return mixed |
|
| 270 | + * @return string|null |
|
| 271 | 271 | */ |
| 272 | 272 | public function error() |
| 273 | 273 | { |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | * |
| 310 | 310 | * @param string $prefix Table prefix |
| 311 | 311 | * |
| 312 | - * @return array |
|
| 312 | + * @return string[] |
|
| 313 | 313 | */ |
| 314 | 314 | public function getTableNames($prefix = '') |
| 315 | 315 | { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | { |
| 183 | 183 | $ret = array(); |
| 184 | 184 | if (false === $result) { |
| 185 | - throw new Exception('Error while fetching result: ' . $this->error()); |
|
| 185 | + throw new Exception('Error while fetching result: '.$this->error()); |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | while ($row = $this->fetchObject($result)) { |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | $errors = sqlsrv_errors(); |
| 275 | 275 | |
| 276 | 276 | if (null !== $errors) { |
| 277 | - return $errors[0]['SQLSTATE'] . ': ' . $errors[0]['message']; |
|
| 277 | + return $errors[0]['SQLSTATE'].': '.$errors[0]['message']; |
|
| 278 | 278 | } else { |
| 279 | 279 | return null; |
| 280 | 280 | } |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | public function clientVersion() |
| 289 | 289 | { |
| 290 | 290 | $client_info = sqlsrv_client_info($this->conn); |
| 291 | - return $client_info['DriverODBCVer'] . ' ' . $client_info['DriverVer']; |
|
| 291 | + return $client_info['DriverODBCVer'].' '.$client_info['DriverVer']; |
|
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | /** |
@@ -314,41 +314,41 @@ discard block |
||
| 314 | 314 | public function getTableNames($prefix = '') |
| 315 | 315 | { |
| 316 | 316 | return $this->tableNames[] = array( |
| 317 | - $prefix . 'faqadminlog', |
|
| 318 | - $prefix . 'faqattachment', |
|
| 319 | - $prefix . 'faqattachment_file', |
|
| 320 | - $prefix . 'faqcaptcha', |
|
| 321 | - $prefix . 'faqcategories', |
|
| 322 | - $prefix . 'faqcategory_group', |
|
| 323 | - $prefix . 'faqcategory_user', |
|
| 324 | - $prefix . 'faqcategoryrelations', |
|
| 325 | - $prefix . 'faqchanges', |
|
| 326 | - $prefix . 'faqcomments', |
|
| 327 | - $prefix . 'faqconfig', |
|
| 328 | - $prefix . 'faqdata', |
|
| 329 | - $prefix . 'faqdata_group', |
|
| 330 | - $prefix . 'faqdata_revisions', |
|
| 331 | - $prefix . 'faqdata_tags', |
|
| 332 | - $prefix . 'faqdata_user', |
|
| 333 | - $prefix . 'faqglossary', |
|
| 334 | - $prefix . 'faqgroup', |
|
| 335 | - $prefix . 'faqgroup_right', |
|
| 336 | - $prefix . 'faqinstances', |
|
| 337 | - $prefix . 'faqinstances_config', |
|
| 338 | - $prefix . 'faqnews', |
|
| 339 | - $prefix . 'faqquestions', |
|
| 340 | - $prefix . 'faqright', |
|
| 341 | - $prefix . 'faqsearches', |
|
| 342 | - $prefix . 'faqsessions', |
|
| 343 | - $prefix . 'faqstopwords', |
|
| 344 | - $prefix . 'faqtags', |
|
| 345 | - $prefix . 'faquser', |
|
| 346 | - $prefix . 'faquser_group', |
|
| 347 | - $prefix . 'faquser_right', |
|
| 348 | - $prefix . 'faquserdata', |
|
| 349 | - $prefix . 'faquserlogin', |
|
| 350 | - $prefix . 'faqvisits', |
|
| 351 | - $prefix . 'faqvoting' |
|
| 317 | + $prefix.'faqadminlog', |
|
| 318 | + $prefix.'faqattachment', |
|
| 319 | + $prefix.'faqattachment_file', |
|
| 320 | + $prefix.'faqcaptcha', |
|
| 321 | + $prefix.'faqcategories', |
|
| 322 | + $prefix.'faqcategory_group', |
|
| 323 | + $prefix.'faqcategory_user', |
|
| 324 | + $prefix.'faqcategoryrelations', |
|
| 325 | + $prefix.'faqchanges', |
|
| 326 | + $prefix.'faqcomments', |
|
| 327 | + $prefix.'faqconfig', |
|
| 328 | + $prefix.'faqdata', |
|
| 329 | + $prefix.'faqdata_group', |
|
| 330 | + $prefix.'faqdata_revisions', |
|
| 331 | + $prefix.'faqdata_tags', |
|
| 332 | + $prefix.'faqdata_user', |
|
| 333 | + $prefix.'faqglossary', |
|
| 334 | + $prefix.'faqgroup', |
|
| 335 | + $prefix.'faqgroup_right', |
|
| 336 | + $prefix.'faqinstances', |
|
| 337 | + $prefix.'faqinstances_config', |
|
| 338 | + $prefix.'faqnews', |
|
| 339 | + $prefix.'faqquestions', |
|
| 340 | + $prefix.'faqright', |
|
| 341 | + $prefix.'faqsearches', |
|
| 342 | + $prefix.'faqsessions', |
|
| 343 | + $prefix.'faqstopwords', |
|
| 344 | + $prefix.'faqtags', |
|
| 345 | + $prefix.'faquser', |
|
| 346 | + $prefix.'faquser_group', |
|
| 347 | + $prefix.'faquser_right', |
|
| 348 | + $prefix.'faquserdata', |
|
| 349 | + $prefix.'faquserlogin', |
|
| 350 | + $prefix.'faqvisits', |
|
| 351 | + $prefix.'faqvoting' |
|
| 352 | 352 | ); |
| 353 | 353 | } |
| 354 | 354 | |
@@ -100,10 +100,10 @@ discard block |
||
| 100 | 100 | private function setConnectionOptions($user, $passwd, $database) |
| 101 | 101 | { |
| 102 | 102 | $this->connectionOptions = array( |
| 103 | - 'UID' => $user, |
|
| 104 | - 'PWD' => $passwd, |
|
| 105 | - 'Database' => $database, |
|
| 106 | - 'CharacterSet' => 'UTF-8'); |
|
| 103 | + 'UID' => $user, |
|
| 104 | + 'PWD' => $passwd, |
|
| 105 | + 'Database' => $database, |
|
| 106 | + 'CharacterSet' => 'UTF-8'); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -256,8 +256,8 @@ discard block |
||
| 256 | 256 | max(%s) as current_id |
| 257 | 257 | FROM |
| 258 | 258 | %s", |
| 259 | - $id, |
|
| 260 | - $table); |
|
| 259 | + $id, |
|
| 260 | + $table); |
|
| 261 | 261 | |
| 262 | 262 | $result = $this->query($select); |
| 263 | 263 | sqlsrv_fetch($result); |
@@ -1025,7 +1025,7 @@ discard block |
||
| 1025 | 1025 | * @param array $categories Array of categories |
| 1026 | 1026 | * @param integer $record_id Record id |
| 1027 | 1027 | * @param string $language Language |
| 1028 | - * @return integer |
|
| 1028 | + * @return boolean |
|
| 1029 | 1029 | */ |
| 1030 | 1030 | public function addCategoryRelations(Array $categories, $record_id, $language) |
| 1031 | 1031 | { |
@@ -1447,7 +1447,7 @@ discard block |
||
| 1447 | 1447 | * |
| 1448 | 1448 | * @param integer $record_id Record id |
| 1449 | 1449 | * @param string $record_lang Record language |
| 1450 | - * @return array |
|
| 1450 | + * @return boolean |
|
| 1451 | 1451 | */ |
| 1452 | 1452 | public function addNewRevision($record_id, $record_lang) |
| 1453 | 1453 | { |
@@ -2155,7 +2155,7 @@ discard block |
||
| 2155 | 2155 | /** |
| 2156 | 2156 | * Returns a new question |
| 2157 | 2157 | * |
| 2158 | - * @param integer $question_id |
|
| 2158 | + * @param integer $id_question |
|
| 2159 | 2159 | * @return array |
| 2160 | 2160 | * @access public |
| 2161 | 2161 | * @since 2006-11-11 |
@@ -2409,7 +2409,7 @@ discard block |
||
| 2409 | 2409 | * Build a logic sequence, for a WHERE statement, of those category IDs |
| 2410 | 2410 | * children of the provided category ID, if any |
| 2411 | 2411 | * |
| 2412 | - * @param $nCatid |
|
| 2412 | + * @param integer $nCatid |
|
| 2413 | 2413 | * @param $logicOp |
| 2414 | 2414 | * @param $oCat |
| 2415 | 2415 | * @return string |
@@ -2437,13 +2437,13 @@ discard block |
||
| 2437 | 2437 | /** |
| 2438 | 2438 | * Build the SQL query for retrieving faq records according to the constraints provided |
| 2439 | 2439 | * |
| 2440 | - * @param $QueryType |
|
| 2441 | - * @param $nCatid |
|
| 2442 | - * @param $bDownwards |
|
| 2443 | - * @param $lang |
|
| 2444 | - * @param $date |
|
| 2440 | + * @param string $QueryType |
|
| 2441 | + * @param integer $nCatid |
|
| 2442 | + * @param boolean $bDownwards |
|
| 2443 | + * @param string $lang |
|
| 2444 | + * @param string $date |
|
| 2445 | 2445 | * @param $faqid |
| 2446 | - * @return array |
|
| 2446 | + * @return string |
|
| 2447 | 2447 | * @access private |
| 2448 | 2448 | * @since 2005-11-02 |
| 2449 | 2449 | * @author Matteo Scaramuccia <[email protected]> |
@@ -28,20 +28,20 @@ discard block |
||
| 28 | 28 | /** |
| 29 | 29 | * SQL constants definitions |
| 30 | 30 | */ |
| 31 | -define('FAQ_SQL_YES', 'y'); |
|
| 32 | -define('FAQ_SQL_NO', 'n'); |
|
| 31 | +define('FAQ_SQL_YES', 'y'); |
|
| 32 | +define('FAQ_SQL_NO', 'n'); |
|
| 33 | 33 | define('FAQ_SQL_ACTIVE_YES', 'yes'); |
| 34 | -define('FAQ_SQL_ACTIVE_NO', 'no'); |
|
| 34 | +define('FAQ_SQL_ACTIVE_NO', 'no'); |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Query type definitions |
| 38 | 38 | */ |
| 39 | -define('FAQ_QUERY_TYPE_DEFAULT', 'faq_default'); |
|
| 40 | -define('FAQ_QUERY_TYPE_APPROVAL', 'faq_approval'); |
|
| 41 | -define('FAQ_QUERY_TYPE_EXPORT_PDF', 'faq_export_pdf'); |
|
| 39 | +define('FAQ_QUERY_TYPE_DEFAULT', 'faq_default'); |
|
| 40 | +define('FAQ_QUERY_TYPE_APPROVAL', 'faq_approval'); |
|
| 41 | +define('FAQ_QUERY_TYPE_EXPORT_PDF', 'faq_export_pdf'); |
|
| 42 | 42 | define('FAQ_QUERY_TYPE_EXPORT_XHTML', 'faq_export_xhtml'); |
| 43 | -define('FAQ_QUERY_TYPE_EXPORT_XML', 'faq_export_xml'); |
|
| 44 | -define('FAQ_QUERY_TYPE_RSS_LATEST', 'faq_rss_latest'); |
|
| 43 | +define('FAQ_QUERY_TYPE_EXPORT_XML', 'faq_export_xml'); |
|
| 44 | +define('FAQ_QUERY_TYPE_RSS_LATEST', 'faq_rss_latest'); |
|
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * Sorting type definitions |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | $visits = $row->visits; |
| 257 | 257 | } |
| 258 | 258 | |
| 259 | - $url = sprintf( |
|
| 259 | + $url = sprintf( |
|
| 260 | 260 | '%s?%saction=artikel&cat=%d&id=%d&artlang=%s', |
| 261 | 261 | PMF_Link::getSystemRelativeUri(), |
| 262 | 262 | $sids, |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | $row->lang |
| 266 | 266 | ); |
| 267 | 267 | $oLink = new PMF_Link($url, $this->_config); |
| 268 | - $oLink->itemTitle = $oLink->text = $oLink->tooltip = $row->thema;; |
|
| 268 | + $oLink->itemTitle = $oLink->text = $oLink->tooltip = $row->thema; ; |
|
| 269 | 269 | |
| 270 | 270 | $faqdata[] = array( |
| 271 | 271 | 'record_id' => $row->id, |
@@ -379,20 +379,20 @@ discard block |
||
| 379 | 379 | |
| 380 | 380 | $result = $this->_config->getDb()->query($query); |
| 381 | 381 | $num = $this->_config->getDb()->numRows($result); |
| 382 | - $pages = (int)ceil($num / $numPerPage); |
|
| 382 | + $pages = (int)ceil($num/$numPerPage); |
|
| 383 | 383 | |
| 384 | 384 | if ($page == 1) { |
| 385 | 385 | $first = 0; |
| 386 | 386 | } else { |
| 387 | - $first = $page * $numPerPage - $numPerPage; |
|
| 387 | + $first = $page*$numPerPage - $numPerPage; |
|
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | if ($num > 0) { |
| 391 | 391 | if ($pages > 1) { |
| 392 | 392 | $output .= sprintf('<p><strong>%s %s %s</strong></p>', |
| 393 | - $this->pmf_lang['msgPage'] . $page, |
|
| 393 | + $this->pmf_lang['msgPage'].$page, |
|
| 394 | 394 | $this->pmf_lang['msgVoteFrom'], |
| 395 | - $pages . $this->pmf_lang['msgPages']); |
|
| 395 | + $pages.$this->pmf_lang['msgPages']); |
|
| 396 | 396 | } |
| 397 | 397 | $output .= '<ul class="phpmyfaq_ul">'; |
| 398 | 398 | |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | $displayedCounter = 0; |
| 401 | 401 | $renderedItems = array(); |
| 402 | 402 | while (($row = $this->_config->getDb()->fetchObject($result)) && $displayedCounter < $numPerPage) { |
| 403 | - $counter ++; |
|
| 403 | + $counter++; |
|
| 404 | 404 | if ($counter <= $first) { |
| 405 | 405 | continue; |
| 406 | 406 | } |
@@ -564,20 +564,20 @@ discard block |
||
| 564 | 564 | $result = $this->_config->getDb()->query($query); |
| 565 | 565 | |
| 566 | 566 | $num = $this->_config->getDb()->numRows($result); |
| 567 | - $pages = ceil($num / $this->_config->get('records.numberOfRecordsPerPage')); |
|
| 567 | + $pages = ceil($num/$this->_config->get('records.numberOfRecordsPerPage')); |
|
| 568 | 568 | |
| 569 | 569 | if ($page == 1) { |
| 570 | 570 | $first = 0; |
| 571 | 571 | } else { |
| 572 | - $first = ($page * $this->_config->get('records.numberOfRecordsPerPage')) - $this->_config->get('records.numberOfRecordsPerPage'); |
|
| 572 | + $first = ($page*$this->_config->get('records.numberOfRecordsPerPage')) - $this->_config->get('records.numberOfRecordsPerPage'); |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | if ($num > 0) { |
| 576 | 576 | if ($pages > 1) { |
| 577 | 577 | $output .= sprintf('<p><strong>%s %s %s</strong></p>', |
| 578 | - $this->pmf_lang['msgPage'] . $page, |
|
| 578 | + $this->pmf_lang['msgPage'].$page, |
|
| 579 | 579 | $this->pmf_lang['msgVoteFrom'], |
| 580 | - $pages . $this->pmf_lang['msgPages']); |
|
| 580 | + $pages.$this->pmf_lang['msgPages']); |
|
| 581 | 581 | } |
| 582 | 582 | $output .= '<ul class="phpmyfaq_ul">'; |
| 583 | 583 | $counter = 0; |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | |
| 586 | 586 | $lastFaqId = 0; |
| 587 | 587 | while (($row = $this->_config->getDb()->fetchObject($result)) && $displayedCounter < $this->_config->get('records.numberOfRecordsPerPage')) { |
| 588 | - $counter ++; |
|
| 588 | + $counter++; |
|
| 589 | 589 | if ($counter <= $first) { |
| 590 | 590 | continue; |
| 591 | 591 | } |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | $listItem = sprintf( |
| 618 | 618 | '<li>%s<br /><small>(%s)</small></li>', |
| 619 | 619 | $oLink->toHtmlAnchor(), |
| 620 | - $this->plr->GetMsg('plmsgViews',$visits) |
|
| 620 | + $this->plr->GetMsg('plmsgViews', $visits) |
|
| 621 | 621 | ); |
| 622 | 622 | |
| 623 | 623 | $output .= $listItem; |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | fd.lang = '%s' |
| 695 | 695 | %s", |
| 696 | 696 | PMF_Db::getTablePrefix(), |
| 697 | - isset($revisionId) ? 'faqdata_revisions': 'faqdata', |
|
| 697 | + isset($revisionId) ? 'faqdata_revisions' : 'faqdata', |
|
| 698 | 698 | PMF_Db::getTablePrefix(), |
| 699 | 699 | PMF_Db::getTablePrefix(), |
| 700 | 700 | $id, |
@@ -1633,9 +1633,9 @@ discard block |
||
| 1633 | 1633 | $result = $this->getLatestData(PMF_NUMBER_RECORDS_LATEST, $this->_config->getLanguage()->getLanguage()); |
| 1634 | 1634 | $output = array(); |
| 1635 | 1635 | |
| 1636 | - if (count ($result) > 0) { |
|
| 1636 | + if (count($result) > 0) { |
|
| 1637 | 1637 | foreach ($result as $row) { |
| 1638 | - $output['url'][] = $row['url']; |
|
| 1638 | + $output['url'][] = $row['url']; |
|
| 1639 | 1639 | $output['title'][] = PMF_Utils::makeShorterText($row['thema'], 8); |
| 1640 | 1640 | $output['date'][] = $date->format(PMF_Date::createIsoDate($row['datum'])); |
| 1641 | 1641 | } |
@@ -1780,7 +1780,7 @@ discard block |
||
| 1780 | 1780 | fd.lang = \''.$language.'\''; |
| 1781 | 1781 | } |
| 1782 | 1782 | $query .= ' |
| 1783 | - ' . $this->queryPermission($this->groupSupport) . ' |
|
| 1783 | + ' . $this->queryPermission($this->groupSupport).' |
|
| 1784 | 1784 | ORDER BY |
| 1785 | 1785 | avg DESC'; |
| 1786 | 1786 | |
@@ -1879,7 +1879,7 @@ discard block |
||
| 1879 | 1879 | fd.lang = \''.$language.'\''; |
| 1880 | 1880 | } |
| 1881 | 1881 | $query .= ' |
| 1882 | - ' . $this->queryPermission($this->groupSupport) . ' |
|
| 1882 | + ' . $this->queryPermission($this->groupSupport).' |
|
| 1883 | 1883 | ORDER BY |
| 1884 | 1884 | fv.visits DESC'; |
| 1885 | 1885 | |
@@ -1985,7 +1985,7 @@ discard block |
||
| 1985 | 1985 | fd.lang = \''.$language.'\''; |
| 1986 | 1986 | } |
| 1987 | 1987 | $query .= ' |
| 1988 | - ' . $this->queryPermission($this->groupSupport) . ' |
|
| 1988 | + ' . $this->queryPermission($this->groupSupport).' |
|
| 1989 | 1989 | ORDER BY |
| 1990 | 1990 | fd.datum DESC'; |
| 1991 | 1991 | |
@@ -1995,7 +1995,7 @@ discard block |
||
| 1995 | 1995 | |
| 1996 | 1996 | $i = 0; |
| 1997 | 1997 | $oldId = 0; |
| 1998 | - while (($row = $this->_config->getDb()->fetchObject($result)) && $i < $count ) { |
|
| 1998 | + while (($row = $this->_config->getDb()->fetchObject($result)) && $i < $count) { |
|
| 1999 | 1999 | if ($oldId != $row->id) { |
| 2000 | 2000 | |
| 2001 | 2001 | if ($this->groupSupport) { |
@@ -2294,7 +2294,7 @@ discard block |
||
| 2294 | 2294 | */ |
| 2295 | 2295 | function createChangeEntry($id, $userId, $text, $lang, $revision_id = 0) |
| 2296 | 2296 | { |
| 2297 | - if ( !is_numeric($id) |
|
| 2297 | + if (!is_numeric($id) |
|
| 2298 | 2298 | && !is_numeric($userId) |
| 2299 | 2299 | && !is_string($text) |
| 2300 | 2300 | && !is_string($lang) |
@@ -2851,7 +2851,7 @@ discard block |
||
| 2851 | 2851 | ); |
| 2852 | 2852 | } |
| 2853 | 2853 | |
| 2854 | - return $output . $extraout; |
|
| 2854 | + return $output.$extraout; |
|
| 2855 | 2855 | } |
| 2856 | 2856 | |
| 2857 | 2857 | /** |
@@ -75,31 +75,31 @@ discard block |
||
| 75 | 75 | private $_config; |
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | - * Language strings |
|
| 79 | - * |
|
| 80 | - * @var string |
|
| 81 | - */ |
|
| 78 | + * Language strings |
|
| 79 | + * |
|
| 80 | + * @var string |
|
| 81 | + */ |
|
| 82 | 82 | private $pmf_lang; |
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | - * Plural form support |
|
| 86 | - * |
|
| 87 | - * @var PMF_Language_Plurals |
|
| 88 | - */ |
|
| 85 | + * Plural form support |
|
| 86 | + * |
|
| 87 | + * @var PMF_Language_Plurals |
|
| 88 | + */ |
|
| 89 | 89 | private $plr; |
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | - * The current FAQ record |
|
| 93 | - * |
|
| 94 | - * @var array |
|
| 95 | - */ |
|
| 92 | + * The current FAQ record |
|
| 93 | + * |
|
| 94 | + * @var array |
|
| 95 | + */ |
|
| 96 | 96 | public $faqRecord = array(); |
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | - * All current FAQ records in an array |
|
| 100 | - * |
|
| 101 | - * @var array |
|
| 102 | - */ |
|
| 99 | + * All current FAQ records in an array |
|
| 100 | + * |
|
| 101 | + * @var array |
|
| 102 | + */ |
|
| 103 | 103 | public $faqRecords = array(); |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -1184,8 +1184,8 @@ discard block |
||
| 1184 | 1184 | |
| 1185 | 1185 | if ($row = $this->_config->getDb()->fetchObject($result)) { |
| 1186 | 1186 | return array('id' => $row->id, |
| 1187 | - 'lang' => $row->lang, |
|
| 1188 | - 'content' => $row->content); |
|
| 1187 | + 'lang' => $row->lang, |
|
| 1188 | + 'content' => $row->content); |
|
| 1189 | 1189 | } |
| 1190 | 1190 | |
| 1191 | 1191 | return null; |
@@ -1512,7 +1512,7 @@ discard block |
||
| 1512 | 1512 | */ |
| 1513 | 1513 | public function getRecordPreview($recordId, $wordCount = 12) |
| 1514 | 1514 | { |
| 1515 | - $answerPreview = ''; |
|
| 1515 | + $answerPreview = ''; |
|
| 1516 | 1516 | |
| 1517 | 1517 | if (isset($this->faqRecord['id']) && ($this->faqRecord['id'] == $recordId)) { |
| 1518 | 1518 | $answerPreview = $this->faqRecord['content']; |
@@ -1677,8 +1677,8 @@ discard block |
||
| 1677 | 1677 | * @since 2006-11-04 |
| 1678 | 1678 | * @author Thorsten Rinne <[email protected]> |
| 1679 | 1679 | */ |
| 1680 | - function getVisibilityOfQuestion($question_id) |
|
| 1681 | - { |
|
| 1680 | + function getVisibilityOfQuestion($question_id) |
|
| 1681 | + { |
|
| 1682 | 1682 | $query = sprintf(' |
| 1683 | 1683 | SELECT |
| 1684 | 1684 | is_visible |
@@ -1695,7 +1695,7 @@ discard block |
||
| 1695 | 1695 | return $row->is_visible; |
| 1696 | 1696 | } |
| 1697 | 1697 | return null; |
| 1698 | - } |
|
| 1698 | + } |
|
| 1699 | 1699 | |
| 1700 | 1700 | /** |
| 1701 | 1701 | * Sets the visibilty of a question |
@@ -2210,8 +2210,8 @@ discard block |
||
| 2210 | 2210 | * @param $all boolean If true, then return visible and unvisble questions; otherwise only visible ones |
| 2211 | 2211 | * @return array |
| 2212 | 2212 | */ |
| 2213 | - public function getAllOpenQuestions($all = true) |
|
| 2214 | - { |
|
| 2213 | + public function getAllOpenQuestions($all = true) |
|
| 2214 | + { |
|
| 2215 | 2215 | $questions = array(); |
| 2216 | 2216 | |
| 2217 | 2217 | $query = sprintf(" |
@@ -2240,7 +2240,7 @@ discard block |
||
| 2240 | 2240 | } |
| 2241 | 2241 | } |
| 2242 | 2242 | return $questions; |
| 2243 | - } |
|
| 2243 | + } |
|
| 2244 | 2244 | |
| 2245 | 2245 | /** |
| 2246 | 2246 | * Updates an existing voting record |
@@ -2347,7 +2347,7 @@ discard block |
||
| 2347 | 2347 | $record_id |
| 2348 | 2348 | ); |
| 2349 | 2349 | |
| 2350 | - if ($result = $this->_config->getDb()->query($query)) { |
|
| 2350 | + if ($result = $this->_config->getDb()->query($query)) { |
|
| 2351 | 2351 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
| 2352 | 2352 | $entries[] = array( |
| 2353 | 2353 | 'revision_id' => $row->revision_id, |
@@ -2435,19 +2435,19 @@ discard block |
||
| 2435 | 2435 | } |
| 2436 | 2436 | |
| 2437 | 2437 | /** |
| 2438 | - * Build the SQL query for retrieving faq records according to the constraints provided |
|
| 2439 | - * |
|
| 2440 | - * @param $QueryType |
|
| 2441 | - * @param $nCatid |
|
| 2442 | - * @param $bDownwards |
|
| 2443 | - * @param $lang |
|
| 2444 | - * @param $date |
|
| 2445 | - * @param $faqid |
|
| 2446 | - * @return array |
|
| 2447 | - * @access private |
|
| 2448 | - * @since 2005-11-02 |
|
| 2449 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 2450 | - */ |
|
| 2438 | + * Build the SQL query for retrieving faq records according to the constraints provided |
|
| 2439 | + * |
|
| 2440 | + * @param $QueryType |
|
| 2441 | + * @param $nCatid |
|
| 2442 | + * @param $bDownwards |
|
| 2443 | + * @param $lang |
|
| 2444 | + * @param $date |
|
| 2445 | + * @param $faqid |
|
| 2446 | + * @return array |
|
| 2447 | + * @access private |
|
| 2448 | + * @since 2005-11-02 |
|
| 2449 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 2450 | + */ |
|
| 2451 | 2451 | private function _getSQLQuery($QueryType, $nCatid, $bDownwards, $lang, $date, $faqid = 0) |
| 2452 | 2452 | { |
| 2453 | 2453 | $now = date('YmdHis'); |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | /** |
| 164 | 164 | * Get all categories in <option> tags |
| 165 | 165 | * |
| 166 | - * @param array|integer $categoryId Category ID or array of category IDs |
|
| 166 | + * @param integer $categoryId Category ID or array of category IDs |
|
| 167 | 167 | * |
| 168 | 168 | * @return string |
| 169 | 169 | */ |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $numCategories = $this->Category->height(); |
| 60 | 60 | |
| 61 | 61 | if ($numCategories > 0) { |
| 62 | - for ($y = 0 ;$y < $numCategories; $y = $this->Category->getNextLineTree($y)) { |
|
| 62 | + for ($y = 0; $y < $numCategories; $y = $this->Category->getNextLineTree($y)) { |
|
| 63 | 63 | |
| 64 | 64 | list($name, $categoryId, $description) = $this->Category->getLineDisplay($y); |
| 65 | 65 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | $categories .= ">"; |
| 204 | - $categories .= $indent . $cat['name'] . "</option>\n"; |
|
| 204 | + $categories .= $indent.$cat['name']."</option>\n"; |
|
| 205 | 205 | $i++; |
| 206 | 206 | } |
| 207 | 207 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | /** |
| 120 | 120 | * Returns all instances |
| 121 | 121 | * |
| 122 | - * @return array |
|
| 122 | + * @return PMF_DB_Driver |
|
| 123 | 123 | */ |
| 124 | 124 | public function getAllInstances() |
| 125 | 125 | { |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * Adds a configuration item for the database |
| 262 | 262 | * |
| 263 | 263 | * @param string $name |
| 264 | - * @param mixed $value |
|
| 264 | + * @param string $value |
|
| 265 | 265 | * |
| 266 | 266 | * @return boolean |
| 267 | 267 | */ |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function addInstance(Array $data) |
| 78 | 78 | { |
| 79 | - $this->setId($this->config->getDb()->nextId(PMF_Db::getTablePrefix() . 'faqinstances', 'id')); |
|
| 79 | + $this->setId($this->config->getDb()->nextId(PMF_Db::getTablePrefix().'faqinstances', 'id')); |
|
| 80 | 80 | |
| 81 | 81 | $insert = sprintf( |
| 82 | 82 | "INSERT INTO %sfaqinstances VALUES (%d, '%s', '%s', '%s', %s, %s)", |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $this->config->getDb()->now() |
| 90 | 90 | ); |
| 91 | 91 | |
| 92 | - if (! $this->config->getDb()->query($insert)) { |
|
| 92 | + if (!$this->config->getDb()->query($insert)) { |
|
| 93 | 93 | return 0; |
| 94 | 94 | } |
| 95 | 95 | |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | foreach ($deletes as $delete) { |
| 251 | 251 | $success = $this->config->getDb()->query($delete); |
| 252 | - if (! $success) { |
|
| 252 | + if (!$success) { |
|
| 253 | 253 | return false; |
| 254 | 254 | } |
| 255 | 255 | } |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | */ |
| 291 | 291 | public function getConfig($name) |
| 292 | 292 | { |
| 293 | - if (! isset($this->instanceConfig[$name])) { |
|
| 293 | + if (!isset($this->instanceConfig[$name])) { |
|
| 294 | 294 | $this->getInstanceConfig($this->getId()); |
| 295 | 295 | } |
| 296 | 296 | |