@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | /** |
| 103 | 103 | * Returns all available first letters |
| 104 | 104 | * |
| 105 | - * @return array |
|
| 105 | + * @return string |
|
| 106 | 106 | * @since 2007-03-30 |
| 107 | 107 | * @author Thorsten Rinne <[email protected]> |
| 108 | 108 | */ |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | * Returns all records from the current first letter |
| 209 | 209 | * |
| 210 | 210 | * @param string $letter Letter |
| 211 | - * @return array |
|
| 211 | + * @return string |
|
| 212 | 212 | * @since 2007-03-30 |
| 213 | 213 | * @author Thorsten Rinne <[email protected]> |
| 214 | 214 | */ |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | $this->_config->getLanguage()->getLanguage()); |
| 197 | 197 | $oLink = new PMF_Link($url, $this->_config); |
| 198 | 198 | $oLink->text = (string)$letters; |
| 199 | - $writeLetters .= '<li>' . $oLink->toHtmlAnchor().'</li>'; |
|
| 199 | + $writeLetters .= '<li>'.$oLink->toHtmlAnchor().'</li>'; |
|
| 200 | 200 | } |
| 201 | 201 | } |
| 202 | 202 | $writeLetters .= '</ul>'; |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | $writeMap = ''; |
| 234 | 234 | |
| 235 | - switch($this->type) { |
|
| 235 | + switch ($this->type) { |
|
| 236 | 236 | case 'db2': |
| 237 | 237 | case 'sqlite': |
| 238 | 238 | $query = sprintf(" |
@@ -331,12 +331,12 @@ discard block |
||
| 331 | 331 | $oLink->tooltip = $title; |
| 332 | 332 | |
| 333 | 333 | $writeMap .= '<li>'.$oLink->toHtmlAnchor().'<br />'."\n"; |
| 334 | - $writeMap .= PMF_Utils::chopString(strip_tags($row->snap), 25). " ...</li>\n"; |
|
| 334 | + $writeMap .= PMF_Utils::chopString(strip_tags($row->snap), 25)." ...</li>\n"; |
|
| 335 | 335 | } |
| 336 | 336 | $oldId = $row->id; |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | - $writeMap = empty($writeMap) ? '' : '<ul>' . $writeMap . '</ul>'; |
|
| 339 | + $writeMap = empty($writeMap) ? '' : '<ul>'.$writeMap.'</ul>'; |
|
| 340 | 340 | |
| 341 | 341 | return $writeMap; |
| 342 | 342 | } |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | * This function multiplies blocks |
| 267 | 267 | * |
| 268 | 268 | * @param string $block Blockname |
| 269 | - * @param array $blockContent Content of block |
|
| 269 | + * @param string $blockContent Content of block |
|
| 270 | 270 | * |
| 271 | 271 | * @return string implode('', $tmpBlock) |
| 272 | 272 | */ |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | * |
| 359 | 359 | * @param string $content Content to check |
| 360 | 360 | * |
| 361 | - * @return array |
|
| 361 | + * @return string |
|
| 362 | 362 | */ |
| 363 | 363 | private function _checkContent($content) |
| 364 | 364 | { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | foreach ($myTemplate as $templateName => $filename) { |
| 90 | 90 | $this->templates[$templateName] = $this->_include( |
| 91 | - 'assets/template/' . $tplSetName . '/' . $filename, |
|
| 91 | + 'assets/template/'.$tplSetName.'/'.$filename, |
|
| 92 | 92 | $templateName |
| 93 | 93 | ); |
| 94 | 94 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function merge($from, $into) |
| 106 | 106 | { |
| 107 | - $this->outputs[$into] = str_replace('{' . $from . '}', $this->outputs[$from], $this->outputs[$into]); |
|
| 107 | + $this->outputs[$into] = str_replace('{'.$from.'}', $this->outputs[$from], $this->outputs[$into]); |
|
| 108 | 108 | $this->outputs[$from] = null; |
| 109 | 109 | } |
| 110 | 110 | |
@@ -126,12 +126,12 @@ discard block |
||
| 126 | 126 | foreach ($rawBlocks as $key => $rawBlock) { |
| 127 | 127 | if (in_array($key, $this->blocksTouched) && $key != 'unblocked') { |
| 128 | 128 | $tmp = str_replace($rawBlock, $this->blocks[$templateName][$key], $tmp); |
| 129 | - $tmp = str_replace('[' . $key . ']', '', $tmp); |
|
| 130 | - $tmp = str_replace('[/' . $key . ']', '', $tmp); |
|
| 129 | + $tmp = str_replace('['.$key.']', '', $tmp); |
|
| 130 | + $tmp = str_replace('[/'.$key.']', '', $tmp); |
|
| 131 | 131 | } elseif ($key != 'unblocked') { |
| 132 | 132 | $tmp = str_replace($rawBlock, '', $tmp); |
| 133 | - $tmp = str_replace('[' . $key . ']', '', $tmp); |
|
| 134 | - $tmp = str_replace('[/' . $key . ']', '', $tmp); |
|
| 133 | + $tmp = str_replace('['.$key.']', '', $tmp); |
|
| 134 | + $tmp = str_replace('[/'.$key.']', '', $tmp); |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | } |
@@ -289,9 +289,9 @@ discard block |
||
| 289 | 289 | } else { |
| 290 | 290 | die('Wrong parameter length!'); |
| 291 | 291 | } |
| 292 | - } else{ |
|
| 292 | + } else { |
|
| 293 | 293 | //multiply strings to $multiplyTimes |
| 294 | - for ($i=0; $i<$multiplyTimes; $i++){ |
|
| 294 | + for ($i = 0; $i < $multiplyTimes; $i++) { |
|
| 295 | 295 | $replace[$var][] = $val; |
| 296 | 296 | } |
| 297 | 297 | } |
@@ -326,20 +326,20 @@ discard block |
||
| 326 | 326 | $unblocked = $tpl; |
| 327 | 327 | if (isset($tmpBlocks)) { |
| 328 | 328 | $blockCount = count($tmpBlocks[0]); |
| 329 | - for ($i = 0 ; $i < $blockCount; $i++) { |
|
| 329 | + for ($i = 0; $i < $blockCount; $i++) { |
|
| 330 | 330 | $name = ''; |
| 331 | 331 | //find block name |
| 332 | 332 | PMF_String::preg_match('/\[.+\]/', $tmpBlocks[0][$i], $name); |
| 333 | 333 | $name = PMF_String::preg_replace('/[\[\[\/\]]/', '', $name); |
| 334 | 334 | //remove block tags from block |
| 335 | - $res = str_replace('[' . $name[0] . ']','',$tmpBlocks[0][$i]); |
|
| 336 | - $res = str_replace('[/' . $name[0] . ']','',$res); |
|
| 335 | + $res = str_replace('['.$name[0].']', '', $tmpBlocks[0][$i]); |
|
| 336 | + $res = str_replace('[/'.$name[0].']', '', $res); |
|
| 337 | 337 | $tplBlocks[$name[0]] = $res; |
| 338 | 338 | |
| 339 | 339 | //unblocked content |
| 340 | 340 | $unblocked = str_replace($tplBlocks[$name[0]], '', $unblocked); |
| 341 | - $unblocked = str_replace('[' . $name[0] . ']','',$unblocked); |
|
| 342 | - $unblocked = str_replace('[/' . $name[0] . ']','',$unblocked); |
|
| 341 | + $unblocked = str_replace('['.$name[0].']', '', $unblocked); |
|
| 342 | + $unblocked = str_replace('[/'.$name[0].']', '', $unblocked); |
|
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | $hits = []; |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | $search = array('#<\?php#i', '#\{$\{#', '#<\?#', '#<\%#', '#`#', '#<script[^>]+php#mi'); |
| 367 | 367 | $phppattern1 = "<?php"; |
| 368 | 368 | $phppattern2 = "<?"; |
| 369 | - $replace = array($phppattern1, '', $phppattern2, '', '' ); |
|
| 369 | + $replace = array($phppattern1, '', $phppattern2, '', ''); |
|
| 370 | 370 | |
| 371 | 371 | // Hack: Backtick Fix |
| 372 | 372 | $content = str_replace('`', '´', $content); |
@@ -184,7 +184,7 @@ |
||
| 184 | 184 | * |
| 185 | 185 | * @param string $val Value |
| 186 | 186 | * |
| 187 | - * @return boolean |
|
| 187 | + * @return integer |
|
| 188 | 188 | */ |
| 189 | 189 | public function isValIgnorable($val) |
| 190 | 190 | { |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - $retval = floor(100 * $countTranslated / $countAll); |
|
| 128 | + $retval = floor(100*$countTranslated/$countAll); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | unset($exemplary, $toCheck); |
@@ -480,7 +480,7 @@ |
||
| 480 | 480 | * @param string $login Login name |
| 481 | 481 | * @param string $pass Password |
| 482 | 482 | * @param integer $userId User ID |
| 483 | - * @return mixed |
|
| 483 | + * @return boolean |
|
| 484 | 484 | */ |
| 485 | 485 | public function createUser($login, $pass = '', $userId = 0) |
| 486 | 486 | { |
@@ -653,8 +653,7 @@ |
||
| 653 | 653 | } |
| 654 | 654 | if (!$auth->changePassword($login, $pass)) { |
| 655 | 655 | continue; |
| 656 | - } |
|
| 657 | - else { |
|
| 656 | + } else { |
|
| 658 | 657 | $success = true; |
| 659 | 658 | } |
| 660 | 659 | } |
@@ -266,8 +266,8 @@ |
||
| 266 | 266 | %sfaquser |
| 267 | 267 | WHERE |
| 268 | 268 | user_id = %d", |
| 269 | - PMF_Db::getTablePrefix(), |
|
| 270 | - (int) $userId); |
|
| 269 | + PMF_Db::getTablePrefix(), |
|
| 270 | + (int) $userId); |
|
| 271 | 271 | |
| 272 | 272 | $res = $this->config->getDb()->query($select); |
| 273 | 273 | if ($this->config->getDb()->numRows($res) != 1) { |
@@ -267,15 +267,15 @@ discard block |
||
| 267 | 267 | WHERE |
| 268 | 268 | user_id = %d", |
| 269 | 269 | PMF_Db::getTablePrefix(), |
| 270 | - (int) $userId); |
|
| 270 | + (int)$userId); |
|
| 271 | 271 | |
| 272 | 272 | $res = $this->config->getDb()->query($select); |
| 273 | 273 | if ($this->config->getDb()->numRows($res) != 1) { |
| 274 | - $this->errors[] = self::ERROR_USER_NO_USERID . 'error(): ' . $this->config->getDb()->error(); |
|
| 274 | + $this->errors[] = self::ERROR_USER_NO_USERID.'error(): '.$this->config->getDb()->error(); |
|
| 275 | 275 | return false; |
| 276 | 276 | } |
| 277 | 277 | $user = $this->config->getDb()->fetchArray($res); |
| 278 | - $this->userId = (int) $user['user_id']; |
|
| 278 | + $this->userId = (int)$user['user_id']; |
|
| 279 | 279 | $this->login = (string)$user['login']; |
| 280 | 280 | $this->status = (string)$user['account_status']; |
| 281 | 281 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | |
| 296 | 296 | $res = $this->config->getDb()->query($select); |
| 297 | 297 | if ($this->config->getDb()->numRows($res) != 1) { |
| 298 | - $this->errors[] = self::ERROR_USER_NO_USERLOGINDATA . 'error(): ' . $this->config->getDb()->error(); |
|
| 298 | + $this->errors[] = self::ERROR_USER_NO_USERLOGINDATA.'error(): '.$this->config->getDb()->error(); |
|
| 299 | 299 | return false; |
| 300 | 300 | } |
| 301 | 301 | } |
@@ -339,9 +339,9 @@ discard block |
||
| 339 | 339 | return false; |
| 340 | 340 | } |
| 341 | 341 | $user = $this->config->getDb()->fetchArray($res); |
| 342 | - $this->userId = (int) $user['user_id']; |
|
| 343 | - $this->login = (string) $user['login']; |
|
| 344 | - $this->status = (string) $user['account_status']; |
|
| 342 | + $this->userId = (int)$user['user_id']; |
|
| 343 | + $this->login = (string)$user['login']; |
|
| 344 | + $this->status = (string)$user['account_status']; |
|
| 345 | 345 | |
| 346 | 346 | // get user-data |
| 347 | 347 | if (!$this->userdata instanceof PMF_User_UserData) { |
@@ -386,9 +386,9 @@ discard block |
||
| 386 | 386 | return false; |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | - $this->userId = (int) $user['user_id']; |
|
| 390 | - $this->login = (string) $user['login']; |
|
| 391 | - $this->status = (string) $user['account_status']; |
|
| 389 | + $this->userId = (int)$user['user_id']; |
|
| 390 | + $this->login = (string)$user['login']; |
|
| 391 | + $this->status = (string)$user['account_status']; |
|
| 392 | 392 | |
| 393 | 393 | // get user-data |
| 394 | 394 | if (!$this->userdata instanceof PMF_User_UserData) { |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | |
| 464 | 464 | // set user-ID |
| 465 | 465 | if (0 == $userId) { |
| 466 | - $this->userId = (int) $this->config->getDb()->nextId(PMF_Db::getTablePrefix() . 'faquser', 'user_id'); |
|
| 466 | + $this->userId = (int)$this->config->getDb()->nextId(PMF_Db::getTablePrefix().'faquser', 'user_id'); |
|
| 467 | 467 | } else { |
| 468 | 468 | $this->userId = $userId; |
| 469 | 469 | } |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | continue; |
| 504 | 504 | } |
| 505 | 505 | if (!$auth->add($login, $pass)) { |
| 506 | - $this->errors[] = self::ERROR_USER_CANNOT_CREATE_USER . 'in Auth ' . $name; |
|
| 506 | + $this->errors[] = self::ERROR_USER_CANNOT_CREATE_USER.'in Auth '.$name; |
|
| 507 | 507 | } else { |
| 508 | 508 | $success = true; |
| 509 | 509 | } |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | } |
| 535 | 535 | |
| 536 | 536 | if (isset($this->allowedStatus[$this->status]) && $this->allowedStatus[$this->status] == self::STATUS_USER_PROTECTED) { |
| 537 | - $this->errors[] = self::ERROR_USER_CANNOT_DELETE_USER . self::STATUS_USER_PROTECTED; |
|
| 537 | + $this->errors[] = self::ERROR_USER_CANNOT_DELETE_USER.self::STATUS_USER_PROTECTED; |
|
| 538 | 538 | return false; |
| 539 | 539 | } |
| 540 | 540 | |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | |
| 552 | 552 | $res = $this->config->getDb()->query($delete); |
| 553 | 553 | if (!$res) { |
| 554 | - $this->errors[] = self::ERROR_USER_CANNOT_DELETE_USER . 'error(): ' . $this->config->getDb()->error(); |
|
| 554 | + $this->errors[] = self::ERROR_USER_CANNOT_DELETE_USER.'error(): '.$this->config->getDb()->error(); |
|
| 555 | 555 | return false; |
| 556 | 556 | } |
| 557 | 557 | |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | |
| 567 | 567 | $readOnly = 0; |
| 568 | 568 | $authCount = 0; |
| 569 | - $delete = []; |
|
| 569 | + $delete = []; |
|
| 570 | 570 | foreach ($this->authContainer as $auth) { |
| 571 | 571 | $authCount++; |
| 572 | 572 | if ($auth->setReadOnly()) { |
@@ -684,10 +684,10 @@ discard block |
||
| 684 | 684 | { |
| 685 | 685 | $message = ''; |
| 686 | 686 | foreach ($this->errors as $error) { |
| 687 | - $message .= $error . "<br>\n"; |
|
| 687 | + $message .= $error."<br>\n"; |
|
| 688 | 688 | } |
| 689 | 689 | $this->errors = []; |
| 690 | - return $message . '<br>' . implode('<br>', debug_backtrace()); |
|
| 690 | + return $message.'<br>'.implode('<br>', debug_backtrace()); |
|
| 691 | 691 | } |
| 692 | 692 | |
| 693 | 693 | /** |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | */ |
| 705 | 705 | public function isValidLogin($login) |
| 706 | 706 | { |
| 707 | - $login = (string) $login; |
|
| 707 | + $login = (string)$login; |
|
| 708 | 708 | |
| 709 | 709 | if (strlen($login) < $this->loginMinLength || !preg_match($this->validUsername, $login)) { |
| 710 | 710 | $this->errors[] = self::ERROR_USER_LOGIN_INVALID; |
@@ -822,8 +822,8 @@ discard block |
||
| 822 | 822 | */ |
| 823 | 823 | private function createPassword() |
| 824 | 824 | { |
| 825 | - srand((double)microtime() * 1000000); |
|
| 826 | - return (string) uniqid(rand()); |
|
| 825 | + srand((double)microtime()*1000000); |
|
| 826 | + return (string)uniqid(rand()); |
|
| 827 | 827 | } |
| 828 | 828 | |
| 829 | 829 | /** |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | * Returns the field $field of the user data. If $field is an |
| 70 | 70 | * array, an associative array will be returned. |
| 71 | 71 | * |
| 72 | - * @param mixed $field Field(s) |
|
| 72 | + * @param string $field Field(s) |
|
| 73 | 73 | * @return mixed |
| 74 | 74 | */ |
| 75 | 75 | public function get($field) |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | $this->userId = $userId; |
| 183 | - $select = sprintf(" |
|
| 183 | + $select = sprintf(" |
|
| 184 | 184 | SELECT |
| 185 | 185 | last_modified, |
| 186 | 186 | display_name, |
@@ -240,13 +240,13 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | public function add($userId) |
| 242 | 242 | { |
| 243 | - $userId = (int) $userId; |
|
| 243 | + $userId = (int)$userId; |
|
| 244 | 244 | if (($userId <= 0) && ($userId != -1)) { |
| 245 | 245 | return false; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | $this->userId = $userId; |
| 249 | - $insert = sprintf(" |
|
| 249 | + $insert = sprintf(" |
|
| 250 | 250 | INSERT INTO |
| 251 | 251 | %sfaquserdata |
| 252 | 252 | (user_id, last_modified) |
@@ -274,13 +274,13 @@ discard block |
||
| 274 | 274 | */ |
| 275 | 275 | public function delete($userId) |
| 276 | 276 | { |
| 277 | - $userId = (int) $userId; |
|
| 277 | + $userId = (int)$userId; |
|
| 278 | 278 | if (($userId <= 0) && ($userId != -1)) { |
| 279 | 279 | return false; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | $this->userId = $userId; |
| 283 | - $delete = sprintf(" |
|
| 283 | + $delete = sprintf(" |
|
| 284 | 284 | DELETE FROM |
| 285 | 285 | %sfaquserdata |
| 286 | 286 | WHERE |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * |
| 123 | 123 | * @param string $lang Language |
| 124 | 124 | * |
| 125 | - * @return boolean |
|
| 125 | + * @return integer |
|
| 126 | 126 | */ |
| 127 | 127 | public static function isLanguage($lang) |
| 128 | 128 | { |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | * |
| 135 | 135 | * @param integer $date Date |
| 136 | 136 | * |
| 137 | - * @return integer |
|
| 137 | + * @return boolean |
|
| 138 | 138 | */ |
| 139 | 139 | public static function isLikeOnPMFDate($date) |
| 140 | 140 | { |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | /** |
| 316 | 316 | * debug_backtrace() wrapper function |
| 317 | 317 | * |
| 318 | - * @param $string |
|
| 318 | + * @param string $string |
|
| 319 | 319 | * |
| 320 | 320 | * @return string |
| 321 | 321 | */ |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | // Create the HTTP options for the HTTP stream context, see below |
| 67 | 67 | // Set phpMyFAQ agent related data |
| 68 | - $agent = 'phpMyFAQ/' . PMF_System::getVersion() . ' on PHP/' . PHP_VERSION; |
|
| 68 | + $agent = 'phpMyFAQ/'.PMF_System::getVersion().' on PHP/'.PHP_VERSION; |
|
| 69 | 69 | $opts = array( |
| 70 | 70 | 'header' => 'User-Agent: '.$agent."\r\n", |
| 71 | 71 | 'method' => 'GET' |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | // HTTP 1.1 Virtual Host |
| 74 | 74 | $urlParts = @parse_url($url); |
| 75 | 75 | if (isset($urlParts['host'])) { |
| 76 | - $opts['header'] = $opts['header'] . 'Host: ' . $urlParts['host'] . "\r\n"; |
|
| 76 | + $opts['header'] = $opts['header'].'Host: '.$urlParts['host']."\r\n"; |
|
| 77 | 77 | } |
| 78 | 78 | // Socket timeout |
| 79 | 79 | $opts['timeout'] = 5; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | // Unix: 13 Dec 1901 20:45:54 -> 19 Jan 2038 03:14:07, signed 32 bit |
| 99 | 99 | // Windows: 1 Jan 1970 -> 19 Jan 2038. |
| 100 | 100 | // So we will use: 1 Jan 2038 -> 2038-01-01, 00:00:01 |
| 101 | - return PMF_Utils::getPMFDate(mktime(0, 0 , 1, 1, 1, 2038)); |
|
| 101 | + return PMF_Utils::getPMFDate(mktime(0, 0, 1, 1, 1, 2038)); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | } |
| 147 | 147 | // Suppress last occurence of '%' |
| 148 | 148 | if (substr($testdate, -1, 1) == '%') { |
| 149 | - $testdate = substr($testdate, 0, strlen($testdate)-1); |
|
| 149 | + $testdate = substr($testdate, 0, strlen($testdate) - 1); |
|
| 150 | 150 | } |
| 151 | 151 | // PMF date consists of numbers only: YYYYMMDDhhmmss |
| 152 | 152 | return is_int($testdate); |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | if (count($data) > 1) { |
| 221 | 221 | $randomized_keys = array_rand($data, count($data)); |
| 222 | 222 | |
| 223 | - foreach($randomized_keys as $current_key) { |
|
| 223 | + foreach ($randomized_keys as $current_key) { |
|
| 224 | 224 | $shuffled_data[$current_key] = $data[$current_key]; |
| 225 | 225 | } |
| 226 | 226 | } else { |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | * |
| 240 | 240 | * @return string |
| 241 | 241 | */ |
| 242 | - public static function chopString ($string, $words) |
|
| 242 | + public static function chopString($string, $words) |
|
| 243 | 243 | { |
| 244 | 244 | $str = ''; |
| 245 | 245 | $pieces = explode(' ', $string); |
@@ -247,8 +247,8 @@ discard block |
||
| 247 | 247 | if ($words > $num) { |
| 248 | 248 | $words = $num; |
| 249 | 249 | } |
| 250 | - for ($i = 0; $i < $words; $i ++) { |
|
| 251 | - $str .= $pieces[$i] . ' '; |
|
| 250 | + for ($i = 0; $i < $words; $i++) { |
|
| 251 | + $str .= $pieces[$i].' '; |
|
| 252 | 252 | } |
| 253 | 253 | return $str; |
| 254 | 254 | } |
@@ -284,9 +284,9 @@ discard block |
||
| 284 | 284 | ); |
| 285 | 285 | |
| 286 | 286 | return PMF_String::preg_replace_callback( |
| 287 | - '/(' . $highlight . '="[^"]*")|' . |
|
| 288 | - '((' . implode('|', $attributes) . ')="[^"]*' . $highlight . '[^"]*")|' . |
|
| 289 | - '(' . $highlight . ')/mis', |
|
| 287 | + '/('.$highlight.'="[^"]*")|'. |
|
| 288 | + '(('.implode('|', $attributes).')="[^"]*'.$highlight.'[^"]*")|'. |
|
| 289 | + '('.$highlight.')/mis', |
|
| 290 | 290 | array('PMF_Utils', 'highlightNoLinks'), |
| 291 | 291 | $string); |
| 292 | 292 | } |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | $postfix = isset($matches[5]) ? $matches[5] : ''; |
| 306 | 306 | |
| 307 | 307 | if (!empty($item)) { |
| 308 | - return '<mark>' . $prefix . $item . $postfix . '</mark>'; |
|
| 308 | + return '<mark>'.$prefix.$item.$postfix.'</mark>'; |
|
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | // Fallback: the original matched string |
@@ -323,15 +323,15 @@ discard block |
||
| 323 | 323 | { |
| 324 | 324 | // sometimes Zend Optimizer causes segfaults with debug_backtrace() |
| 325 | 325 | if (extension_loaded('Zend Optimizer')) { |
| 326 | - $ret = "<pre>" . $string . "</pre><br>\n"; |
|
| 326 | + $ret = "<pre>".$string."</pre><br>\n"; |
|
| 327 | 327 | } else { |
| 328 | 328 | $debug = debug_backtrace(); |
| 329 | 329 | $ret = ''; |
| 330 | 330 | if (isset($debug[2]['class'])) { |
| 331 | - $ret = $debug[2]['file'] . ":<br>"; |
|
| 331 | + $ret = $debug[2]['file'].":<br>"; |
|
| 332 | 332 | $ret .= $debug[2]['class'].$debug[1]['type']; |
| 333 | - $ret .= $debug[2]['function'] . '() in line ' . $debug[2]['line']; |
|
| 334 | - $ret .= ": <pre>" . $string . "</pre><br>\n"; |
|
| 333 | + $ret .= $debug[2]['function'].'() in line '.$debug[2]['line']; |
|
| 334 | + $ret .= ": <pre>".$string."</pre><br>\n"; |
|
| 335 | 335 | } |
| 336 | 336 | } |
| 337 | 337 | return $ret; |
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | * @since 2012-04-11 |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -define('PMF_ROOT_DIR', dirname(__DIR__) . '/phpmyfaq'); |
|
| 22 | +define('PMF_ROOT_DIR', dirname(__DIR__).'/phpmyfaq'); |
|
| 23 | 23 | |
| 24 | -require PMF_ROOT_DIR . '/inc/PMF/System.php'; |
|
| 24 | +require PMF_ROOT_DIR.'/inc/PMF/System.php'; |
|
| 25 | 25 | |
| 26 | 26 | $system = new PMF_System(); |
| 27 | 27 | |
@@ -468,7 +468,7 @@ |
||
| 468 | 468 | $PMF_LANG["ad_start_comments"] = "Коментарів"; |
| 469 | 469 | |
| 470 | 470 | |
| 471 | - // Added v1.1 - 30.01.2002 - Bastian |
|
| 471 | + // Added v1.1 - 30.01.2002 - Bastian |
|
| 472 | 472 | |
| 473 | 473 | $PMF_LANG["ad_categ_paste"] = "вставити"; |
| 474 | 474 | $PMF_LANG["ad_categ_cut"] = "cut"; |
@@ -650,14 +650,14 @@ |
||
| 650 | 650 | $PMF_LANG["newsArchive"] = ". Архів новин"; |
| 651 | 651 | |
| 652 | 652 | // added v2.0.0 - 2006-01-02 by Lars |
| 653 | -$PMF_LANG['ad_user_error_password'] = "Please enter a password. "; |
|
| 654 | -$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Passwords do not match. "; |
|
| 655 | -$PMF_LANG['ad_user_error_loginInvalid'] = "The specified user name is invalid."; |
|
| 656 | -$PMF_LANG['ad_user_error_noEmail'] = "Please enter a valid mail adress. "; |
|
| 657 | -$PMF_LANG['ad_user_error_noRealName'] = "Please enter your real name. "; |
|
| 658 | -$PMF_LANG['ad_user_error_delete'] = "User account could not be deleted. "; |
|
| 659 | -$PMF_LANG['ad_user_error_noId'] = "No ID specified. "; |
|
| 660 | -$PMF_LANG['ad_user_error_protectedAccount'] = "User account is protected. "; |
|
| 653 | +$PMF_LANG['ad_user_error_password'] = "Please enter a password. "; |
|
| 654 | +$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Passwords do not match. "; |
|
| 655 | +$PMF_LANG['ad_user_error_loginInvalid'] = "The specified user name is invalid."; |
|
| 656 | +$PMF_LANG['ad_user_error_noEmail'] = "Please enter a valid mail adress. "; |
|
| 657 | +$PMF_LANG['ad_user_error_noRealName'] = "Please enter your real name. "; |
|
| 658 | +$PMF_LANG['ad_user_error_delete'] = "User account could not be deleted. "; |
|
| 659 | +$PMF_LANG['ad_user_error_noId'] = "No ID specified. "; |
|
| 660 | +$PMF_LANG['ad_user_error_protectedAccount'] = "User account is protected. "; |
|
| 661 | 661 | $PMF_LANG['ad_user_deleteUser'] = "Delete User"; |
| 662 | 662 | $PMF_LANG['ad_user_status'] = "Status:"; |
| 663 | 663 | $PMF_LANG['ad_user_lastModified'] = "last modified:"; |
@@ -657,14 +657,14 @@ |
||
| 657 | 657 | $PMF_LANG['ad_entry_visibility'] = 'Terbitkan?'; |
| 658 | 658 | |
| 659 | 659 | // added v2.0.0 - 2006-01-02 by Lars |
| 660 | -$PMF_LANG['ad_user_error_password'] = "Silakan masukkan kata sandi. "; |
|
| 661 | -$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Kata sandi tidak cocok. "; |
|
| 662 | -$PMF_LANG['ad_user_error_loginInvalid'] = "Nama pengguna yang dimaksud tidak benar."; |
|
| 663 | -$PMF_LANG['ad_user_error_noEmail'] = "Silakan masukkan alamat email yang benar. "; |
|
| 664 | -$PMF_LANG['ad_user_error_noRealName'] = "Silakan masukkan nama lengkap anda. "; |
|
| 665 | -$PMF_LANG['ad_user_error_delete'] = "Akun pengguna tidak bisa dihapus. "; |
|
| 666 | -$PMF_LANG['ad_user_error_noId'] = "Tidak ada ID yang dimasukkan. "; |
|
| 667 | -$PMF_LANG['ad_user_error_protectedAccount'] = "Akun pengguna diproteksi. "; |
|
| 660 | +$PMF_LANG['ad_user_error_password'] = "Silakan masukkan kata sandi. "; |
|
| 661 | +$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Kata sandi tidak cocok. "; |
|
| 662 | +$PMF_LANG['ad_user_error_loginInvalid'] = "Nama pengguna yang dimaksud tidak benar."; |
|
| 663 | +$PMF_LANG['ad_user_error_noEmail'] = "Silakan masukkan alamat email yang benar. "; |
|
| 664 | +$PMF_LANG['ad_user_error_noRealName'] = "Silakan masukkan nama lengkap anda. "; |
|
| 665 | +$PMF_LANG['ad_user_error_delete'] = "Akun pengguna tidak bisa dihapus. "; |
|
| 666 | +$PMF_LANG['ad_user_error_noId'] = "Tidak ada ID yang dimasukkan. "; |
|
| 667 | +$PMF_LANG['ad_user_error_protectedAccount'] = "Akun pengguna diproteksi. "; |
|
| 668 | 668 | $PMF_LANG['ad_user_deleteUser'] = "Hapus Pengguna"; |
| 669 | 669 | $PMF_LANG['ad_user_status'] = "Status:"; |
| 670 | 670 | $PMF_LANG['ad_user_lastModified'] = "edit terakhir:"; |