@@ -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); |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Interface translation tool functionality |
|
| 4 | - * |
|
| 5 | - * PHP Version 5.3 |
|
| 6 | - * |
|
| 7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
| 8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
| 9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
| 10 | - * |
|
| 11 | - * @category phpMyFAQ |
|
| 12 | - * @package PMF_TransTool |
|
| 13 | - * @author Anatoliy Belsky <[email protected]> |
|
| 14 | - * @copyright 2009-2016 phpMyFAQ Team |
|
| 15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 16 | - * @link http://www.phpmyfaq.de |
|
| 17 | - * @since 2009-05-12 |
|
| 18 | - */ |
|
| 3 | + * Interface translation tool functionality |
|
| 4 | + * |
|
| 5 | + * PHP Version 5.3 |
|
| 6 | + * |
|
| 7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
| 8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
| 9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
| 10 | + * |
|
| 11 | + * @category phpMyFAQ |
|
| 12 | + * @package PMF_TransTool |
|
| 13 | + * @author Anatoliy Belsky <[email protected]> |
|
| 14 | + * @copyright 2009-2016 phpMyFAQ Team |
|
| 15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 16 | + * @link http://www.phpmyfaq.de |
|
| 17 | + * @since 2009-05-12 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | exit(); |
@@ -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 | { |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | if (isset($this->userId) && is_int($this->userId)) { |
| 242 | 242 | return (int)$this->userId; |
| 243 | 243 | } |
| 244 | - $this->userId = -1; |
|
| 244 | + $this->userId = -1; |
|
| 245 | 245 | $this->errors[] = self::ERROR_USER_NO_USERID; |
| 246 | 246 | |
| 247 | 247 | return -1; |
@@ -266,18 +266,18 @@ discard block |
||
| 266 | 266 | FROM |
| 267 | 267 | %sfaquser |
| 268 | 268 | WHERE |
| 269 | - user_id = %d " . ( $allowBlockedUsers ? '' : "AND account_status != 'blocked'"), |
|
| 269 | + user_id = %d " . ($allowBlockedUsers ? '' : "AND account_status != 'blocked'"), |
|
| 270 | 270 | PMF_Db::getTablePrefix(), |
| 271 | - (int) $userId |
|
| 271 | + (int)$userId |
|
| 272 | 272 | ); |
| 273 | 273 | |
| 274 | 274 | $res = $this->config->getDb()->query($select); |
| 275 | 275 | if ($this->config->getDb()->numRows($res) != 1) { |
| 276 | - $this->errors[] = self::ERROR_USER_NO_USERID . 'error(): ' . $this->config->getDb()->error(); |
|
| 276 | + $this->errors[] = self::ERROR_USER_NO_USERID.'error(): '.$this->config->getDb()->error(); |
|
| 277 | 277 | return false; |
| 278 | 278 | } |
| 279 | 279 | $user = $this->config->getDb()->fetchArray($res); |
| 280 | - $this->userId = (int) $user['user_id']; |
|
| 280 | + $this->userId = (int)$user['user_id']; |
|
| 281 | 281 | $this->login = (string)$user['login']; |
| 282 | 282 | $this->status = (string)$user['account_status']; |
| 283 | 283 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | |
| 298 | 298 | $res = $this->config->getDb()->query($select); |
| 299 | 299 | if ($this->config->getDb()->numRows($res) != 1) { |
| 300 | - $this->errors[] = self::ERROR_USER_NO_USERLOGINDATA . 'error(): ' . $this->config->getDb()->error(); |
|
| 300 | + $this->errors[] = self::ERROR_USER_NO_USERLOGINDATA.'error(): '.$this->config->getDb()->error(); |
|
| 301 | 301 | return false; |
| 302 | 302 | } |
| 303 | 303 | } |
@@ -341,9 +341,9 @@ discard block |
||
| 341 | 341 | return false; |
| 342 | 342 | } |
| 343 | 343 | $user = $this->config->getDb()->fetchArray($res); |
| 344 | - $this->userId = (int) $user['user_id']; |
|
| 345 | - $this->login = (string) $user['login']; |
|
| 346 | - $this->status = (string) $user['account_status']; |
|
| 344 | + $this->userId = (int)$user['user_id']; |
|
| 345 | + $this->login = (string)$user['login']; |
|
| 346 | + $this->status = (string)$user['account_status']; |
|
| 347 | 347 | |
| 348 | 348 | // get user-data |
| 349 | 349 | if (!$this->userdata instanceof PMF_User_UserData) { |
@@ -388,9 +388,9 @@ discard block |
||
| 388 | 388 | return false; |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | - $this->userId = (int) $user['user_id']; |
|
| 392 | - $this->login = (string) $user['login']; |
|
| 393 | - $this->status = (string) $user['account_status']; |
|
| 391 | + $this->userId = (int)$user['user_id']; |
|
| 392 | + $this->login = (string)$user['login']; |
|
| 393 | + $this->status = (string)$user['account_status']; |
|
| 394 | 394 | |
| 395 | 395 | // get user-data |
| 396 | 396 | if (!$this->userdata instanceof PMF_User_UserData) { |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | |
| 506 | 506 | // set user-ID |
| 507 | 507 | if (0 == $userId) { |
| 508 | - $this->userId = (int) $this->config->getDb()->nextId(PMF_Db::getTablePrefix() . 'faquser', 'user_id'); |
|
| 508 | + $this->userId = (int)$this->config->getDb()->nextId(PMF_Db::getTablePrefix().'faquser', 'user_id'); |
|
| 509 | 509 | } else { |
| 510 | 510 | $this->userId = $userId; |
| 511 | 511 | } |
@@ -575,7 +575,7 @@ discard block |
||
| 575 | 575 | } |
| 576 | 576 | |
| 577 | 577 | if (isset($this->allowedStatus[$this->status]) && $this->allowedStatus[$this->status] == self::STATUS_USER_PROTECTED) { |
| 578 | - $this->errors[] = self::ERROR_USER_CANNOT_DELETE_USER . self::STATUS_USER_PROTECTED; |
|
| 578 | + $this->errors[] = self::ERROR_USER_CANNOT_DELETE_USER.self::STATUS_USER_PROTECTED; |
|
| 579 | 579 | return false; |
| 580 | 580 | } |
| 581 | 581 | |
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | |
| 593 | 593 | $res = $this->config->getDb()->query($delete); |
| 594 | 594 | if (!$res) { |
| 595 | - $this->errors[] = self::ERROR_USER_CANNOT_DELETE_USER . 'error(): ' . $this->config->getDb()->error(); |
|
| 595 | + $this->errors[] = self::ERROR_USER_CANNOT_DELETE_USER.'error(): '.$this->config->getDb()->error(); |
|
| 596 | 596 | return false; |
| 597 | 597 | } |
| 598 | 598 | |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | |
| 608 | 608 | $readOnly = 0; |
| 609 | 609 | $authCount = 0; |
| 610 | - $delete = array(); |
|
| 610 | + $delete = array(); |
|
| 611 | 611 | foreach ($this->authContainer as $auth) { |
| 612 | 612 | $authCount++; |
| 613 | 613 | if ($auth->setReadOnly()) { |
@@ -745,7 +745,7 @@ discard block |
||
| 745 | 745 | */ |
| 746 | 746 | public function isValidLogin($login) |
| 747 | 747 | { |
| 748 | - $login = (string) $login; |
|
| 748 | + $login = (string)$login; |
|
| 749 | 749 | |
| 750 | 750 | if (strlen($login) < $this->loginMinLength || !preg_match($this->validUsername, $login)) { |
| 751 | 751 | $this->errors[] = self::ERROR_USER_LOGIN_INVALID; |
@@ -863,8 +863,8 @@ discard block |
||
| 863 | 863 | */ |
| 864 | 864 | private function createPassword() |
| 865 | 865 | { |
| 866 | - srand((double)microtime() * 1000000); |
|
| 867 | - return (string) uniqid(rand()); |
|
| 866 | + srand((double)microtime()*1000000); |
|
| 867 | + return (string)uniqid(rand()); |
|
| 868 | 868 | } |
| 869 | 869 | |
| 870 | 870 | /** |
@@ -329,8 +329,7 @@ |
||
| 329 | 329 | if ($nextline < 1) { |
| 330 | 330 | $nextline = 2; |
| 331 | 331 | } |
| 332 | - } |
|
| 333 | - else { |
|
| 332 | + } else { |
|
| 334 | 333 | $nextline += rand(1, 7); |
| 335 | 334 | } |
| 336 | 335 | $w1 += rand(-4, 4); |
@@ -1,27 +1,27 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Creates a new user object. |
|
| 4 | - * |
|
| 5 | - * A user are recognized by the session-id using getUserBySessionId(), by his |
|
| 6 | - * using getUserById() or by his nickname (login) using getUserByLogin(). New |
|
| 7 | - * are created using createNewUser(). |
|
| 8 | - * |
|
| 9 | - * PHP Version 5.3 |
|
| 10 | - * |
|
| 11 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
| 12 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
| 13 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
| 14 | - * |
|
| 15 | - * @category phpMyFAQ |
|
| 16 | - * @package User |
|
| 17 | - * @author Lars Tiedemann <[email protected]> |
|
| 18 | - * @author Thorsten Rinne <[email protected]> |
|
| 19 | - * @author Sarah Hermann <[email protected]> |
|
| 20 | - * @copyright 2005-2016 phpMyFAQ Team |
|
| 21 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 22 | - * @link http://www.phpmyfaq.de |
|
| 23 | - * @since 2005-09-17 |
|
| 24 | - */ |
|
| 3 | + * Creates a new user object. |
|
| 4 | + * |
|
| 5 | + * A user are recognized by the session-id using getUserBySessionId(), by his |
|
| 6 | + * using getUserById() or by his nickname (login) using getUserByLogin(). New |
|
| 7 | + * are created using createNewUser(). |
|
| 8 | + * |
|
| 9 | + * PHP Version 5.3 |
|
| 10 | + * |
|
| 11 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
| 12 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
| 13 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
| 14 | + * |
|
| 15 | + * @category phpMyFAQ |
|
| 16 | + * @package User |
|
| 17 | + * @author Lars Tiedemann <[email protected]> |
|
| 18 | + * @author Thorsten Rinne <[email protected]> |
|
| 19 | + * @author Sarah Hermann <[email protected]> |
|
| 20 | + * @copyright 2005-2016 phpMyFAQ Team |
|
| 21 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 22 | + * @link http://www.phpmyfaq.de |
|
| 23 | + * @since 2005-09-17 |
|
| 24 | + */ |
|
| 25 | 25 | |
| 26 | 26 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 27 | 27 | exit(); |
@@ -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 |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The userdata class provides methods to manage user information. |
|
| 4 | - * |
|
| 5 | - * PHP Version 5.3 |
|
| 6 | - * |
|
| 7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
| 8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
| 9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
| 10 | - * |
|
| 11 | - * @category phpMyFAQ |
|
| 12 | - * @package User |
|
| 13 | - * @author Lars Tiedemann <[email protected]> |
|
| 14 | - * @copyright 2005-2016 phpMyFAQ Team |
|
| 15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 16 | - * @link http://www.phpmyfaq.de |
|
| 17 | - * @since 2005-09-18 |
|
| 18 | - */ |
|
| 3 | + * The userdata class provides methods to manage user information. |
|
| 4 | + * |
|
| 5 | + * PHP Version 5.3 |
|
| 6 | + * |
|
| 7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
| 8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
| 9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
| 10 | + * |
|
| 11 | + * @category phpMyFAQ |
|
| 12 | + * @package User |
|
| 13 | + * @author Lars Tiedemann <[email protected]> |
|
| 14 | + * @copyright 2005-2016 phpMyFAQ Team |
|
| 15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 16 | + * @link http://www.phpmyfaq.de |
|
| 17 | + * @since 2005-09-18 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | exit(); |
@@ -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 = "<code>" . $string . "</code><br />\n"; |
|
| 326 | + $ret = "<code>".$string."</code><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 .= ": <code>" . $string . "</code><br />\n"; |
|
| 333 | + $ret .= $debug[2]['function'].'() in line '.$debug[2]['line']; |
|
| 334 | + $ret .= ": <code>".$string."</code><br />\n"; |
|
| 335 | 335 | } |
| 336 | 336 | } |
| 337 | 337 | return $ret; |
@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Utilities - Functions and Classes common to the whole phpMyFAQ architecture. |
|
| 4 | - * |
|
| 5 | - * PHP Version 5.3 |
|
| 6 | - * |
|
| 7 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
| 8 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
| 9 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
| 10 | - * |
|
| 11 | - * @category phpMyFAQ |
|
| 12 | - * @package PMF_Utils |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | - * @copyright 2005-2016 phpMyFAQ Team |
|
| 16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 17 | - * @link http://www.phpmyfaq.de |
|
| 18 | - * @since 2005-11-01 |
|
| 19 | - */ |
|
| 3 | + * Utilities - Functions and Classes common to the whole phpMyFAQ architecture. |
|
| 4 | + * |
|
| 5 | + * PHP Version 5.3 |
|
| 6 | + * |
|
| 7 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
| 8 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
| 9 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
| 10 | + * |
|
| 11 | + * @category phpMyFAQ |
|
| 12 | + * @package PMF_Utils |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | + * @copyright 2005-2016 phpMyFAQ Team |
|
| 16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 17 | + * @link http://www.phpmyfaq.de |
|
| 18 | + * @since 2005-11-01 |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | exit(); |
@@ -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 | |
@@ -641,14 +641,14 @@ discard block |
||
| 641 | 641 | $PMF_LANG['ad_entry_visibility'] = "公開發佈? (Publish?)"; |
| 642 | 642 | |
| 643 | 643 | // added v2.0.0 - 2006-01-02 by Lars 開發者 |
| 644 | -$PMF_LANG['ad_user_error_password'] = "請輸入密碼。 "; |
|
| 645 | -$PMF_LANG['ad_user_error_passwordsDontMatch'] = "密碼不不符合。 (Passwords do not match.) "; |
|
| 646 | -$PMF_LANG['ad_user_error_loginInvalid'] = "使用者名稱是無效的。 (The specified user name is invalid.)"; |
|
| 647 | -$PMF_LANG['ad_user_error_noEmail'] = "請輸入一個有效的 email 地址。(Please enter a valid mail address.) "; |
|
| 648 | -$PMF_LANG['ad_user_error_noRealName'] = "請輸入您的真實姓名。(Please enter your real name. )"; |
|
| 649 | -$PMF_LANG['ad_user_error_delete'] = "使用者帳號不能被刪除。(User account could not be deleted. )"; |
|
| 650 | -$PMF_LANG['ad_user_error_noId'] = "沒有指定 ID。 (No ID specified.) "; |
|
| 651 | -$PMF_LANG['ad_user_error_protectedAccount'] = "使用者帳號受到保護。(User account is protected. )"; |
|
| 644 | +$PMF_LANG['ad_user_error_password'] = "請輸入密碼。 "; |
|
| 645 | +$PMF_LANG['ad_user_error_passwordsDontMatch'] = "密碼不不符合。 (Passwords do not match.) "; |
|
| 646 | +$PMF_LANG['ad_user_error_loginInvalid'] = "使用者名稱是無效的。 (The specified user name is invalid.)"; |
|
| 647 | +$PMF_LANG['ad_user_error_noEmail'] = "請輸入一個有效的 email 地址。(Please enter a valid mail address.) "; |
|
| 648 | +$PMF_LANG['ad_user_error_noRealName'] = "請輸入您的真實姓名。(Please enter your real name. )"; |
|
| 649 | +$PMF_LANG['ad_user_error_delete'] = "使用者帳號不能被刪除。(User account could not be deleted. )"; |
|
| 650 | +$PMF_LANG['ad_user_error_noId'] = "沒有指定 ID。 (No ID specified.) "; |
|
| 651 | +$PMF_LANG['ad_user_error_protectedAccount'] = "使用者帳號受到保護。(User account is protected. )"; |
|
| 652 | 652 | $PMF_LANG['ad_user_deleteUser'] = "刪除使用者 (Delete User)"; |
| 653 | 653 | $PMF_LANG['ad_user_status'] = "狀態: (Status:)"; |
| 654 | 654 | $PMF_LANG['ad_user_lastModified'] = "最後一次修改: (last modified:)"; |
@@ -986,7 +986,7 @@ discard block |
||
| 986 | 986 | $PMF_LANG['msgSecureSwitch'] = "切換到安全模式來登入! (Switch to secure mode to login!)"; |
| 987 | 987 | |
| 988 | 988 | // added 2.6.0-alpha - 2009-10-03 by Anatoliy Belsky 開發者 |
| 989 | -$PMF_LANG['msgTransToolNoteFileSaving'] = "請注意,請按儲存(save)按鈕才會儲存檔案。(Please note that no files will we written until you click save button)"; |
|
| 989 | +$PMF_LANG['msgTransToolNoteFileSaving'] = "請注意,請按儲存(save)按鈕才會儲存檔案。(Please note that no files will we written until you click save button)"; |
|
| 990 | 990 | $PMF_LANG['msgTransToolPageBufferRecorded'] = "頁面 %d 暫存 buffer 記錄成功 (Page %d buffer recorded successfully)"; |
| 991 | 991 | $PMF_LANG['msgTransToolErrorRecordingPageBuffer'] = "錯誤記錄頁面 %d 暫存 buffer (Error recording page %d buffer)"; |
| 992 | 992 | $PMF_LANG['msgTransToolRecordingPageBuffer'] = "記錄頁面 %d 暫存 buffer (Recording page %d buffer)"; |
@@ -998,9 +998,9 @@ discard block |
||
| 998 | 998 | $PMF_LANG['msgAttachmentInvalid'] = "附加檔案無效,請通報管理員。(The attachment is invalid, please inform admin.)"; |
| 999 | 999 | |
| 1000 | 1000 | // added 2.6.0-alpha - 2009-11-02 by max 開發者 |
| 1001 | -$LANG_CONF['search.numberSearchTerms'] = array(0 => "input", 1 => "Number of listed search terms"); |
|
| 1001 | +$LANG_CONF['search.numberSearchTerms'] = array(0 => "input", 1 => "Number of listed search terms"); |
|
| 1002 | 1002 | $LANG_CONF['records.orderingPopularFaqs'] = array(0 => "select", 1 => "排列熱門的 FAQ's<br> Sorting of the top FAQ's"); |
| 1003 | -$PMF_LANG['list_all_users'] = "列出所有使用者 (List all users)"; |
|
| 1003 | +$PMF_LANG['list_all_users'] = "列出所有使用者 (List all users)"; |
|
| 1004 | 1004 | |
| 1005 | 1005 | $PMF_LANG['records.orderingPopularFaqs.visits'] = "列出最多訪問的 entries (list most visited entries)"; |
| 1006 | 1006 | $PMF_LANG['records.orderingPopularFaqs.voting'] = "列出最多得票的 entries (list most voted entries)"; |
@@ -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"; |
@@ -679,14 +679,14 @@ |
||
| 679 | 679 | $PMF_LANG['ad_entry_visibility'] = 'Publish?'; |
| 680 | 680 | |
| 681 | 681 | // added v2.0.0 - 2006-01-02 by Lars |
| 682 | -$PMF_LANG['ad_user_error_password'] = "Please enter a password. "; |
|
| 683 | -$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Passwords do not match. "; |
|
| 684 | -$PMF_LANG['ad_user_error_loginInvalid'] = "The specified user name is invalid."; |
|
| 685 | -$PMF_LANG['ad_user_error_noEmail'] = "Please enter a valid mail adress. "; |
|
| 686 | -$PMF_LANG['ad_user_error_noRealName'] = "Please enter your real name. "; |
|
| 687 | -$PMF_LANG['ad_user_error_delete'] = "User account could not be deleted. "; |
|
| 688 | -$PMF_LANG['ad_user_error_noId'] = "No ID specified. "; |
|
| 689 | -$PMF_LANG['ad_user_error_protectedAccount'] = "User account is protected. "; |
|
| 682 | +$PMF_LANG['ad_user_error_password'] = "Please enter a password. "; |
|
| 683 | +$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Passwords do not match. "; |
|
| 684 | +$PMF_LANG['ad_user_error_loginInvalid'] = "The specified user name is invalid."; |
|
| 685 | +$PMF_LANG['ad_user_error_noEmail'] = "Please enter a valid mail adress. "; |
|
| 686 | +$PMF_LANG['ad_user_error_noRealName'] = "Please enter your real name. "; |
|
| 687 | +$PMF_LANG['ad_user_error_delete'] = "User account could not be deleted. "; |
|
| 688 | +$PMF_LANG['ad_user_error_noId'] = "No ID specified. "; |
|
| 689 | +$PMF_LANG['ad_user_error_protectedAccount'] = "User account is protected. "; |
|
| 690 | 690 | $PMF_LANG['ad_user_deleteUser'] = "Delete User"; |
| 691 | 691 | $PMF_LANG['ad_user_status'] = "Status:"; |
| 692 | 692 | $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:"; |
@@ -671,14 +671,14 @@ |
||
| 671 | 671 | $PMF_LANG['ad_entry_visibility'] = 'Yayınla?'; |
| 672 | 672 | |
| 673 | 673 | // added v2.0.0 - 2006-01-02 by Lars |
| 674 | -$PMF_LANG['ad_user_error_password'] = "Şifre giriniz. "; |
|
| 675 | -$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Şifreler uyuşmuyor. "; |
|
| 676 | -$PMF_LANG['ad_user_error_loginInvalid'] = "Belirtilen kullanıcı adı geçersiz."; |
|
| 677 | -$PMF_LANG['ad_user_error_noEmail'] = "Geçerli bir e-posta adresi giriniz. "; |
|
| 678 | -$PMF_LANG['ad_user_error_noRealName'] = "Adınızı giriniz. "; |
|
| 679 | -$PMF_LANG['ad_user_error_delete'] = "Kullanıcı hesabı silinemedi. "; |
|
| 680 | -$PMF_LANG['ad_user_error_noId'] = "ID belirtilmedi. "; |
|
| 681 | -$PMF_LANG['ad_user_error_protectedAccount'] = "Kullanıcı hesabı korumalı. "; |
|
| 674 | +$PMF_LANG['ad_user_error_password'] = "Şifre giriniz. "; |
|
| 675 | +$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Şifreler uyuşmuyor. "; |
|
| 676 | +$PMF_LANG['ad_user_error_loginInvalid'] = "Belirtilen kullanıcı adı geçersiz."; |
|
| 677 | +$PMF_LANG['ad_user_error_noEmail'] = "Geçerli bir e-posta adresi giriniz. "; |
|
| 678 | +$PMF_LANG['ad_user_error_noRealName'] = "Adınızı giriniz. "; |
|
| 679 | +$PMF_LANG['ad_user_error_delete'] = "Kullanıcı hesabı silinemedi. "; |
|
| 680 | +$PMF_LANG['ad_user_error_noId'] = "ID belirtilmedi. "; |
|
| 681 | +$PMF_LANG['ad_user_error_protectedAccount'] = "Kullanıcı hesabı korumalı. "; |
|
| 682 | 682 | $PMF_LANG['ad_user_deleteUser'] = "Kullanıcıyı Sil"; |
| 683 | 683 | $PMF_LANG['ad_user_status'] = "Durum:"; |
| 684 | 684 | $PMF_LANG['ad_user_lastModified'] = "Son değişiklik:"; |