@@ -216,6 +216,6 @@ |
||
| 216 | 216 | $score += $object->relevance_keywords; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - return round($score / 3 * 100); |
|
| 219 | + return round($score/3*100); |
|
| 220 | 220 | } |
| 221 | 221 | } |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | foreach ($botBlacklist as $bot) { |
| 90 | - if ((bool) PMF_String::strstr($agent, $bot)) { |
|
| 90 | + if ((bool)PMF_String::strstr($agent, $bot)) { |
|
| 91 | 91 | ++$bots; |
| 92 | 92 | } |
| 93 | 93 | } |
@@ -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 | } |
@@ -427,8 +427,8 @@ discard block |
||
| 427 | 427 | $users = $faqsession->getUsersOnline(); |
| 428 | 428 | $totUsers = $users[0] + $users[1]; |
| 429 | 429 | $usersOnline = $plr->getMsg('plmsgUserOnline', $totUsers).' | '. |
| 430 | - $plr->getMsg('plmsgGuestOnline', $users[0]). |
|
| 431 | - $plr->getMsg('plmsgRegisteredOnline', $users[1]); |
|
| 430 | + $plr->getMsg('plmsgGuestOnline', $users[0]). |
|
| 431 | + $plr->getMsg('plmsgRegisteredOnline', $users[1]); |
|
| 432 | 432 | } else { |
| 433 | 433 | $usersOnline = ''; |
| 434 | 434 | } |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | 'switchLanguages' => PMF_Language::selectLanguages($LANGCODE, true), |
| 485 | 485 | 'userOnline' => $usersOnline, |
| 486 | 486 | 'copyright' => 'powered by <a href="http://www.phpmyfaq.de" target="_blank">phpMyFAQ</a> '. |
| 487 | - $faqConfig->get('main.currentVersion'), |
|
| 487 | + $faqConfig->get('main.currentVersion'), |
|
| 488 | 488 | 'registerUser' => $faqConfig->get('security.enableRegistration') ? '<a href="?action=register">'.$PMF_LANG['msgRegistration'].'</a>' : '', |
| 489 | 489 | 'sendPassword' => '<a href="?action=password">'.$PMF_LANG['lostPassword'].'</a>', |
| 490 | 490 | 'msgFullName' => $PMF_LANG['ad_user_loggedin'].$user->getLogin(), |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | 'dir' => $PMF_LANG['dir'], |
| 476 | 476 | 'writeSendAdress' => '?'.$sids.'action=search', |
| 477 | 477 | 'searchBox' => $PMF_LANG['msgSearch'], |
| 478 | - 'categoryId' => ($cat === 0) ? '%' : (int) $cat, |
|
| 478 | + 'categoryId' => ($cat === 0) ? '%' : (int)$cat, |
|
| 479 | 479 | 'headerCategories' => $PMF_LANG['msgFullCategories'], |
| 480 | 480 | 'msgCategory' => $PMF_LANG['msgCategory'], |
| 481 | 481 | 'msgExportAllFaqs' => $PMF_LANG['msgExportAllFaqs'], |
@@ -519,7 +519,7 @@ discard block |
||
| 519 | 519 | array( |
| 520 | 520 | 'writeSendAdress' => '?'.$sids.'action=search', |
| 521 | 521 | 'searchBox' => $PMF_LANG['msgSearch'], |
| 522 | - 'categoryId' => ($cat === 0) ? '%' : (int) $cat, |
|
| 522 | + 'categoryId' => ($cat === 0) ? '%' : (int)$cat, |
|
| 523 | 523 | 'msgSearch' => sprintf( |
| 524 | 524 | '<a class="help" href="%sindex.php?action=search">%s</a>', |
| 525 | 525 | $faqSystem->getSystemUri($faqConfig), |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | 'allCategories' => '<a href="'.$faqSystem->getSystemUri($faqConfig).'showcat.html">'.$PMF_LANG['msgShowAllCategories'].'</a>', |
| 555 | 555 | 'faqOverview' => '<a href="'.$faqSystem->getSystemUri($faqConfig).'overview.html">'.$PMF_LANG['faqOverview'].'</a>', |
| 556 | 556 | 'showSitemap' => '<a href="'.$faqSystem->getSystemUri($faqConfig).'sitemap/A/'.$LANGCODE.'.html">'.$PMF_LANG['msgSitemap'].'</a>', |
| 557 | - 'opensearch' => $faqSystem->getSystemUri($faqConfig).'opensearch.html', ); |
|
| 557 | + 'opensearch' => $faqSystem->getSystemUri($faqConfig).'opensearch.html',); |
|
| 558 | 558 | } else { |
| 559 | 559 | $tplNavigation = array( |
| 560 | 560 | 'msgSearch' => '<a href="index.php?'.$sids.'action=search">'.$PMF_LANG['msgAdvancedSearch'].'</a>', |
@@ -568,7 +568,7 @@ discard block |
||
| 568 | 568 | 'faqOverview' => '<a href="index.php?'.$sids.'action=overview">'.$PMF_LANG['faqOverview'].'</a>', |
| 569 | 569 | 'backToHome' => '<a href="index.php?'.$sids.'">'.$PMF_LANG['msgHome'].'</a>', |
| 570 | 570 | 'showSitemap' => '<a href="index.php?'.$sids.'action=sitemap&lang='.$LANGCODE.'">'.$PMF_LANG['msgSitemap'].'</a>', |
| 571 | - 'opensearch' => $faqSystem->getSystemUri($faqConfig).'opensearch.php', ); |
|
| 571 | + 'opensearch' => $faqSystem->getSystemUri($faqConfig).'opensearch.php',); |
|
| 572 | 572 | } |
| 573 | 573 | |
| 574 | 574 | $tplNavigation['faqHome'] = $faqConfig->getDefaultUrl(); |
@@ -662,7 +662,7 @@ discard block |
||
| 662 | 662 | ); |
| 663 | 663 | } else { |
| 664 | 664 | $tpl->parseBlock('rightBox', 'latestEntriesListError', array( |
| 665 | - 'errorMsgLatest' => $latestEntriesParams['error'], ) |
|
| 665 | + 'errorMsgLatest' => $latestEntriesParams['error'],) |
|
| 666 | 666 | ); |
| 667 | 667 | } |
| 668 | 668 | |
@@ -664,14 +664,14 @@ |
||
| 664 | 664 | $PMF_LANG['ad_entry_visibility'] = 'Objavi?'; |
| 665 | 665 | |
| 666 | 666 | // added v2.0.0 - 2006-01-02 by Lars |
| 667 | -$PMF_LANG['ad_user_error_password'] = "Molimo unesite lozinku. "; |
|
| 668 | -$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Lozinke se ne poklapaju. "; |
|
| 669 | -$PMF_LANG['ad_user_error_loginInvalid'] = "Unešeno korisničko ime nije nađeno."; |
|
| 670 | -$PMF_LANG['ad_user_error_noEmail'] = "Unesite važeću email adresu. "; |
|
| 671 | -$PMF_LANG['ad_user_error_noRealName'] = "Unesite Vaše pravo ime. "; |
|
| 672 | -$PMF_LANG['ad_user_error_delete'] = "Korisnički nalog ne može biti izbrisan. "; |
|
| 673 | -$PMF_LANG['ad_user_error_noId'] = "Nije priložen ID. "; |
|
| 674 | -$PMF_LANG['ad_user_error_protectedAccount'] = "Korisnički nalog je zaštićen. "; |
|
| 667 | +$PMF_LANG['ad_user_error_password'] = "Molimo unesite lozinku. "; |
|
| 668 | +$PMF_LANG['ad_user_error_passwordsDontMatch'] = "Lozinke se ne poklapaju. "; |
|
| 669 | +$PMF_LANG['ad_user_error_loginInvalid'] = "Unešeno korisničko ime nije nađeno."; |
|
| 670 | +$PMF_LANG['ad_user_error_noEmail'] = "Unesite važeću email adresu. "; |
|
| 671 | +$PMF_LANG['ad_user_error_noRealName'] = "Unesite Vaše pravo ime. "; |
|
| 672 | +$PMF_LANG['ad_user_error_delete'] = "Korisnički nalog ne može biti izbrisan. "; |
|
| 673 | +$PMF_LANG['ad_user_error_noId'] = "Nije priložen ID. "; |
|
| 674 | +$PMF_LANG['ad_user_error_protectedAccount'] = "Korisnički nalog je zaštićen. "; |
|
| 675 | 675 | $PMF_LANG['ad_user_deleteUser'] = "Obriši korisnika"; |
| 676 | 676 | $PMF_LANG['ad_user_status'] = "Status:"; |
| 677 | 677 | $PMF_LANG['ad_user_lastModified'] = "zadnji put menjano:"; |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - uasort($relatedTags, function ($a, $b) { |
|
| 114 | + uasort($relatedTags, function($a, $b) { |
|
| 115 | 115 | return ($b - $a); |
| 116 | 116 | } |
| 117 | 117 | ); |
@@ -47,8 +47,8 @@ |
||
| 47 | 47 | |
| 48 | 48 | $send2friendLink = sprintf('%sindex.php?action=artikel&cat=%d&id=%d&artlang=%s', |
| 49 | 49 | $faqConfig->getDefaultUrl(), |
| 50 | - (int) $cat, |
|
| 51 | - (int) $id, |
|
| 50 | + (int)$cat, |
|
| 51 | + (int)$id, |
|
| 52 | 52 | urlencode($artlang)); |
| 53 | 53 | |
| 54 | 54 | $captchaHelper = new PMF_Helper_Captcha($faqConfig); |
@@ -568,7 +568,7 @@ discard block |
||
| 568 | 568 | foreach ($query as $key => $executeQuery) { |
| 569 | 569 | $result = $faqConfig->getDb()->query($executeQuery); |
| 570 | 570 | echo '.'; |
| 571 | - if (!($key % 100)) { |
|
| 571 | + if (!($key%100)) { |
|
| 572 | 572 | echo '<br />'; |
| 573 | 573 | } |
| 574 | 574 | if (!$result) { |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | } |
| 589 | 589 | usleep(10000); |
| 590 | 590 | ++$count; |
| 591 | - if (!($count % 10)) { |
|
| 591 | + if (!($count%10)) { |
|
| 592 | 592 | ob_flush(); |
| 593 | 593 | } |
| 594 | 594 | } |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | if (version_compare($version, '2.8.0-alpha2', '>=')) { |
| 102 | 102 | if (!$faqConfig->get('main.maintenanceMode')) { |
| 103 | 103 | echo '<p class="alert alert-warning"><strong>Warning!</strong> Your phpMyFAQ installation is '. |
| 104 | - 'not in maintenance mode, you should enable the maintenance mode in your administration '. |
|
| 105 | - 'backend before running the update!</p>'; |
|
| 104 | + 'not in maintenance mode, you should enable the maintenance mode in your administration '. |
|
| 105 | + 'backend before running the update!</p>'; |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | ?> |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | // 2.5 versions only |
| 169 | 169 | if (version_compare($version, '2.6.0-alpha', '<') && !is_writeable('../template')) { |
| 170 | 170 | echo '<p class="alert alert-danger text-center"><strong>Please change the directory ../template '. |
| 171 | - 'and its contents writable (777 on Linux/UNIX).</strong></p>'; |
|
| 171 | + 'and its contents writable (777 on Linux/UNIX).</strong></p>'; |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | // We only support updates from 2.6+ |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | if (file_exists(PMF_ROOT_DIR.'/config/database.php')) { |
| 215 | 215 | if (!copy(PMF_ROOT_DIR.'/config/database.php', PMF_ROOT_DIR.'/config/database.bak.php')) { |
| 216 | 216 | echo '<p class="alert alert-danger"><strong>Error:</strong> The backup file ../config/database.bak.php '. |
| 217 | - 'could not be written. Please correct this!</p>'; |
|
| 217 | + 'could not be written. Please correct this!</p>'; |
|
| 218 | 218 | } else { |
| 219 | 219 | $checkDatabaseSetupFile = true; |
| 220 | 220 | } |
@@ -574,8 +574,8 @@ discard block |
||
| 574 | 574 | if (!$result) { |
| 575 | 575 | echo '</div>'; |
| 576 | 576 | echo '<p class="alert alert-danger"><strong>Error:</strong> Please update your version of phpMyFAQ '. |
| 577 | - 'once again or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.'. |
|
| 578 | - '</p>'; |
|
| 577 | + 'once again or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.'. |
|
| 578 | + '</p>'; |
|
| 579 | 579 | printf( |
| 580 | 580 | '<p class="alert alert-danger"><strong>DB error:</strong> %s</p>', |
| 581 | 581 | $faqConfig->getDb()->error() |
@@ -851,7 +851,7 @@ discard block |
||
| 851 | 851 | printf('<span title="%s">.</span>', $executeQuery); |
| 852 | 852 | if (!$result) { |
| 853 | 853 | echo '<p class="alert alert-danger"><strong>Error:</strong> Please install your version of phpMyFAQ once again '. |
| 854 | - 'or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.</p>'; |
|
| 854 | + 'or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.</p>'; |
|
| 855 | 855 | printf('<p class="error"><strong>DB error:</strong> %s</p>', $faqConfig->getDb()->error()); |
| 856 | 856 | printf('<code>%s</code>', htmlentities($executeQuery)); |
| 857 | 857 | PMF_System::renderFooter(); |
@@ -38,7 +38,6 @@ |
||
| 38 | 38 | * @author Anatoliy Belsky <[email protected]> |
| 39 | 39 | * @copyright 2009-2015 phpMyFAQ Team |
| 40 | 40 | * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
| 41 | - |
|
| 42 | 41 | * @link http://www.phpmyfaq.de |
| 43 | 42 | * @since 2009-04-06 |
| 44 | 43 | */ |