@@ -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"; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | foreach ($userList as $single_user) { |
| 67 | 67 | $user->getUserById($single_user, true); |
| 68 | 68 | $users[] = array('user_id' => $user->getUserId(), |
| 69 | - 'login' => $user->getLogin(), ); |
|
| 69 | + 'login' => $user->getLogin(), ); |
|
| 70 | 70 | } |
| 71 | 71 | echo json_encode($users); |
| 72 | 72 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | foreach ($memberList as $single_member) { |
| 79 | 79 | $user->getUserById($single_member, true); |
| 80 | 80 | $members[] = array('user_id' => $user->getUserId(), |
| 81 | - 'login' => $user->getLogin(), ); |
|
| 81 | + 'login' => $user->getLogin(), ); |
|
| 82 | 82 | } |
| 83 | 83 | echo json_encode($members); |
| 84 | 84 | } |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | <div class="row"> |
| 177 | 177 | <div class="col"> |
| 178 | 178 | <?php |
| 179 | - // We only support updates from 2.8+ |
|
| 179 | + // We only support updates from 2.8+ |
|
| 180 | 180 | if (version_compare($version, '2.8.0', '>')) { |
| 181 | 181 | printf( |
| 182 | 182 | '<div class="alert alert-success text-center" role="alert">Your current phpMyFAQ version: %s %s</div>', |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | if (file_exists(PMF_ROOT_DIR.'/config/database.php')) { |
| 219 | 219 | if (!copy(PMF_ROOT_DIR.'/config/database.php', PMF_ROOT_DIR.'/config/database.bak.php')) { |
| 220 | 220 | echo '<p class="alert alert-danger"><strong>Error:</strong> The backup file ../config/database.bak.php '. |
| 221 | - 'could not be written. Please correct this!</p>'; |
|
| 221 | + 'could not be written. Please correct this!</p>'; |
|
| 222 | 222 | } else { |
| 223 | 223 | $checkDatabaseSetupFile = true; |
| 224 | 224 | $updateMessages[] = 'A backup of your database configuration file has been made.'; |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | printf('<span title="%s"><i aria-hidden="true" class="fas fa-circle"></i></span>', $executeQuery); |
| 700 | 700 | if (!$result) { |
| 701 | 701 | echo '<p class="alert alert-danger"><strong>Error:</strong> Please update your version of phpMyFAQ once again '. |
| 702 | - 'or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.</p>'; |
|
| 702 | + 'or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.</p>'; |
|
| 703 | 703 | printf('<p class="error"><strong>DB error:</strong> %s</p>', $faqConfig->getDb()->error()); |
| 704 | 704 | printf('<code>%s</code>', htmlentities($executeQuery)); |
| 705 | 705 | System::renderFooter(); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $changeFreq = PMF_SITEMAP_GOOGLE_CHANGEFREQ_DAILY; |
| 79 | 79 | } |
| 80 | 80 | $node = |
| 81 | - '<url>' |
|
| 81 | + '<url>' |
|
| 82 | 82 | .'<loc>'.Strings::htmlspecialchars($location).'</loc>' |
| 83 | 83 | .'<lastmod>'.$lastModified.'</lastmod>' |
| 84 | 84 | .'<changefreq>'.$changeFreq.'</changefreq>' |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | // Sitemap header |
| 111 | 111 | $siteMap = |
| 112 | - '<?xml version="1.0" encoding="UTF-8"?>' |
|
| 112 | + '<?xml version="1.0" encoding="UTF-8"?>' |
|
| 113 | 113 | .'<urlset xmlns="http://www.google.com/schemas/sitemap/0.9"' |
| 114 | 114 | .' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' |
| 115 | 115 | .' xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.9' |
@@ -688,8 +688,8 @@ discard block |
||
| 688 | 688 | |
| 689 | 689 | $message = array( |
| 690 | 690 | 'success' => trim($PMF_LANG['successMessage']). |
| 691 | - ' '. |
|
| 692 | - trim($PMF_LANG['msgRegThankYou']), |
|
| 691 | + ' '. |
|
| 692 | + trim($PMF_LANG['msgRegThankYou']), |
|
| 693 | 693 | ); |
| 694 | 694 | } |
| 695 | 695 | } else { |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | $attached = Filter::filterInput(INPUT_POST, 'message', FILTER_SANITIZE_STRIPPED); |
| 792 | 792 | $mailto = Filter::filterInputArray(INPUT_POST, |
| 793 | 793 | array('mailto' => array('filter' => FILTER_VALIDATE_EMAIL, |
| 794 | - 'flags' => FILTER_REQUIRE_ARRAY | FILTER_NULL_ON_FAILURE, |
|
| 794 | + 'flags' => FILTER_REQUIRE_ARRAY | FILTER_NULL_ON_FAILURE, |
|
| 795 | 795 | ), |
| 796 | 796 | ) |
| 797 | 797 | ); |
@@ -215,7 +215,7 @@ |
||
| 215 | 215 | $tagName = trim($tagName); |
| 216 | 216 | if (Strings::strlen($tagName) > 0) { |
| 217 | 217 | if (!in_array(Strings::strtolower($tagName), |
| 218 | - array_map(array('String', 'strtolower'), $currentTags))) { |
|
| 218 | + array_map(array('String', 'strtolower'), $currentTags))) { |
|
| 219 | 219 | // Create the new tag |
| 220 | 220 | $newTagId = $this->config->getDb()->nextId(Db::getTablePrefix().'faqtags', 'tagging_id'); |
| 221 | 221 | $query = sprintf(" |
@@ -323,8 +323,8 @@ |
||
| 323 | 323 | %sfaquser |
| 324 | 324 | WHERE |
| 325 | 325 | user_id = %d', |
| 326 | - Db::getTablePrefix(), |
|
| 327 | - $this->getUserId() |
|
| 326 | + Db::getTablePrefix(), |
|
| 327 | + $this->getUserId() |
|
| 328 | 328 | ); |
| 329 | 329 | |
| 330 | 330 | $res = $this->config->getDb()->query($select); |
@@ -139,18 +139,18 @@ discard block |
||
| 139 | 139 | return $filename; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - /** |
|
| 143 | - * Clean the filename of any uploaded file by the user and force an error |
|
| 144 | - * when calling is_uploaded_file($_FILES[key]['tmp_name']) if the cleanup goes wrong. |
|
| 145 | - */ |
|
| 146 | - private static function _cleanFilenames() |
|
| 147 | - { |
|
| 148 | - reset($_FILES); |
|
| 149 | - foreach ($_FILES as $key => $value) { |
|
| 150 | - if (is_array($_FILES[$key]['name'])) { |
|
| 151 | - reset($_FILES[$key]['name']); |
|
| 152 | - // We have a multiple upload with the same name for <input /> |
|
| 153 | - foreach ($_FILES[$key]['name'] as $idx => $valu2) { |
|
| 142 | + /** |
|
| 143 | + * Clean the filename of any uploaded file by the user and force an error |
|
| 144 | + * when calling is_uploaded_file($_FILES[key]['tmp_name']) if the cleanup goes wrong. |
|
| 145 | + */ |
|
| 146 | + private static function _cleanFilenames() |
|
| 147 | + { |
|
| 148 | + reset($_FILES); |
|
| 149 | + foreach ($_FILES as $key => $value) { |
|
| 150 | + if (is_array($_FILES[$key]['name'])) { |
|
| 151 | + reset($_FILES[$key]['name']); |
|
| 152 | + // We have a multiple upload with the same name for <input /> |
|
| 153 | + foreach ($_FILES[$key]['name'] as $idx => $valu2) { |
|
| 154 | 154 | $_FILES[$key]['name'][$idx] = self::_basicFilenameClean($_FILES[$key]['name'][$idx]); |
| 155 | 155 | if ('' == $_FILES[$key]['name'][$idx]) { |
| 156 | 156 | $_FILES[$key]['type'][$idx] = ''; |
@@ -159,19 +159,19 @@ discard block |
||
| 159 | 159 | $_FILES[$key]['error'][$idx] = UPLOAD_ERR_NO_FILE; |
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | - reset($_FILES[$key]['name']); |
|
| 163 | - } else { |
|
| 164 | - $_FILES[$key]['name'] = self::_basicFilenameClean($_FILES[$key]['name']); |
|
| 165 | - if ('' == $_FILES[$key]['name']) { |
|
| 166 | - $_FILES[$key]['type'] = ''; |
|
| 167 | - $_FILES[$key]['tmp_name'] = ''; |
|
| 168 | - $_FILES[$key]['size'] = 0; |
|
| 169 | - $_FILES[$key]['error'] = UPLOAD_ERR_NO_FILE; |
|
| 170 | - } |
|
| 171 | - } |
|
| 172 | - } |
|
| 173 | - reset($_FILES); |
|
| 174 | - } |
|
| 162 | + reset($_FILES[$key]['name']); |
|
| 163 | + } else { |
|
| 164 | + $_FILES[$key]['name'] = self::_basicFilenameClean($_FILES[$key]['name']); |
|
| 165 | + if ('' == $_FILES[$key]['name']) { |
|
| 166 | + $_FILES[$key]['type'] = ''; |
|
| 167 | + $_FILES[$key]['tmp_name'] = ''; |
|
| 168 | + $_FILES[$key]['size'] = 0; |
|
| 169 | + $_FILES[$key]['error'] = UPLOAD_ERR_NO_FILE; |
|
| 170 | + } |
|
| 171 | + } |
|
| 172 | + } |
|
| 173 | + reset($_FILES); |
|
| 174 | + } |
|
| 175 | 175 | |
| 176 | 176 | /** |
| 177 | 177 | * Cleans a html string from some xss issues. |
@@ -77,14 +77,14 @@ |
||
| 77 | 77 | return mb_detect_encoding($str, 'UTF-8', true); |
| 78 | 78 | } else { |
| 79 | 79 | $regex = '/^([\x00-\x7f]|' |
| 80 | - .'[\xc2-\xdf][\x80-\xbf]|' |
|
| 81 | - .'\xe0[\xa0-\xbf][\x80-\xbf]|' |
|
| 82 | - .'[\xe1-\xec][\x80-\xbf]{2}|' |
|
| 83 | - .'\xed[\x80-\x9f][\x80-\xbf]|' |
|
| 84 | - .'[\xee-\xef][\x80-\xbf]{2}|' |
|
| 85 | - .'\xf0[\x90-\xbf][\x80-\xbf]{2}|' |
|
| 86 | - .'[\xf1-\xf3][\x80-\xbf]{3}|' |
|
| 87 | - .'\xf4[\x80-\x8f][\x80-\xbf]{2})*$/'; |
|
| 80 | + .'[\xc2-\xdf][\x80-\xbf]|' |
|
| 81 | + .'\xe0[\xa0-\xbf][\x80-\xbf]|' |
|
| 82 | + .'[\xe1-\xec][\x80-\xbf]{2}|' |
|
| 83 | + .'\xed[\x80-\x9f][\x80-\xbf]|' |
|
| 84 | + .'[\xee-\xef][\x80-\xbf]{2}|' |
|
| 85 | + .'\xf0[\x90-\xbf][\x80-\xbf]{2}|' |
|
| 86 | + .'[\xf1-\xf3][\x80-\xbf]{3}|' |
|
| 87 | + .'\xf4[\x80-\x8f][\x80-\xbf]{2})*$/'; |
|
| 88 | 88 | |
| 89 | 89 | return preg_match($regex, $str) === 1; |
| 90 | 90 | } |