@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | define('IS_VALID_PHPMYFAQ', null); |
| 50 | 50 | |
| 51 | - require PMF_ROOT_DIR. '/inc/Bootstrap.php'; |
|
| 51 | + require PMF_ROOT_DIR.'/inc/Bootstrap.php'; |
|
| 52 | 52 | |
| 53 | 53 | // Preload English strings |
| 54 | - require_once PMF_ROOT_DIR . '/lang/language_en.php'; |
|
| 54 | + require_once PMF_ROOT_DIR.'/lang/language_en.php'; |
|
| 55 | 55 | |
| 56 | 56 | if ((LANGCODE != 'en') && PMF_Language::isASupportedLanguage(LANGCODE)) { |
| 57 | 57 | // Overwrite English strings with the ones we have in the current language |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $_records = $faq->faqRecords; |
| 80 | 80 | $tot = count($_records); |
| 81 | 81 | $end = microtime(true); |
| 82 | - $output .= ' #'.$tot.', done in '.round($end - $start, 4).' sec.'.($isRequestedByWebLocalhost ? '' : "\n");; |
|
| 82 | + $output .= ' #'.$tot.', done in '.round($end - $start, 4).' sec.'.($isRequestedByWebLocalhost ? '' : "\n"); ; |
|
| 83 | 83 | $output .= ($isRequestedByWebLocalhost ? '' : "\n"); |
| 84 | 84 | if ($isRequestedByWebLocalhost) { |
| 85 | 85 | echo '<pre>'; |
@@ -1,26 +1,26 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Performs an Automatic Link Verification over all the faq records |
|
| 4 | - * |
|
| 5 | - * You can set a cron entry: |
|
| 6 | - * a. using PHP CLI |
|
| 7 | - * b. using a Web Hit to this file |
|
| 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 CLI |
|
| 17 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 18 | - * @author Thorsten Rinne <[email protected]> |
|
| 19 | - * @copyright 2006-2016 phpMyFAQ Team |
|
| 20 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 21 | - * @link http://www.phpmyfaq.de |
|
| 22 | - * @since 2006-09-17 |
|
| 23 | - */ |
|
| 3 | + * Performs an Automatic Link Verification over all the faq records |
|
| 4 | + * |
|
| 5 | + * You can set a cron entry: |
|
| 6 | + * a. using PHP CLI |
|
| 7 | + * b. using a Web Hit to this file |
|
| 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 CLI |
|
| 17 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 18 | + * @author Thorsten Rinne <[email protected]> |
|
| 19 | + * @copyright 2006-2016 phpMyFAQ Team |
|
| 20 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 21 | + * @link http://www.phpmyfaq.de |
|
| 22 | + * @since 2006-09-17 |
|
| 23 | + */ |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * This is the flag with which you define the language of this cron script |
@@ -19,16 +19,16 @@ |
||
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | $protocol = 'http'; |
| 22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
| 22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
| 23 | 23 | $protocol = 'https'; |
| 24 | 24 | } |
| 25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 26 | 26 | exit(); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | $faqsession->userTracking('open_questions', 0); |
| 30 | 30 | |
| 31 | -$tpl->parse ( |
|
| 31 | +$tpl->parse( |
|
| 32 | 32 | 'writeContent', |
| 33 | 33 | array( |
| 34 | 34 | 'msgOpenQuestions' => $PMF_LANG['msgOpenQuestions'], |
@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | // Set language |
| 53 | 53 | // |
| 54 | 54 | if (PMF_Language::isASupportedLanguage($language)) { |
| 55 | - require PMF_LANGUAGE_DIR . '/language_' . $language . '.php'; |
|
| 55 | + require PMF_LANGUAGE_DIR.'/language_'.$language.'.php'; |
|
| 56 | 56 | } else { |
| 57 | - require PMF_LANGUAGE_DIR . '/language_en.php'; |
|
| 57 | + require PMF_LANGUAGE_DIR.'/language_en.php'; |
|
| 58 | 58 | } |
| 59 | 59 | $faqConfig->setLanguage($Language); |
| 60 | 60 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | $searchString = PMF_Filter::filterInput(INPUT_GET, 'q', FILTER_SANITIZE_STRIPPED); |
| 96 | 96 | $searchResults = $search->search($searchString, false); |
| 97 | - $url = $faqConfig->get('main.referenceURL') . '/index.php?action=artikel&cat=%d&id=%d&artlang=%s'; |
|
| 97 | + $url = $faqConfig->get('main.referenceURL').'/index.php?action=artikel&cat=%d&id=%d&artlang=%s'; |
|
| 98 | 98 | |
| 99 | 99 | $faqSearchResult->reviewResultset($searchResults); |
| 100 | 100 | |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | // Found an article language? |
| 37 | 37 | $lang = PMF_Filter::filterInput(INPUT_POST, 'artlang', FILTER_SANITIZE_STRING); |
| 38 | -if (is_null($lang) && !PMF_Language::isASupportedLanguage($lang) ) { |
|
| 38 | +if (is_null($lang) && !PMF_Language::isASupportedLanguage($lang)) { |
|
| 39 | 39 | $lang = PMF_Filter::filterInput(INPUT_GET, 'artlang', FILTER_SANITIZE_STRING); |
| 40 | - if (is_null($lang) && !PMF_Language::isASupportedLanguage($lang) ) { |
|
| 40 | + if (is_null($lang) && !PMF_Language::isASupportedLanguage($lang)) { |
|
| 41 | 41 | $lang = $LANGCODE; |
| 42 | 42 | } |
| 43 | 43 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | // authenticate with session information |
| 57 | 57 | $user = PMF_User_CurrentUser::getFromCookie($faqConfig); |
| 58 | -if (! $user instanceof PMF_User_CurrentUser) { |
|
| 58 | +if (!$user instanceof PMF_User_CurrentUser) { |
|
| 59 | 59 | $user = PMF_User_CurrentUser::getFromSession($faqConfig); |
| 60 | 60 | } |
| 61 | 61 | if ($user instanceof PMF_User_CurrentUser) { |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | // Get current user and group id - default: -1 |
| 84 | 84 | if (!is_null($user) && $user instanceof PMF_User_CurrentUser) { |
| 85 | - $current_user = $user->getUserId(); |
|
| 85 | + $current_user = $user->getUserId(); |
|
| 86 | 86 | if ($user->perm instanceof PMF_Perm_Medium) { |
| 87 | 87 | $current_groups = $user->perm->getUserGroups($current_user); |
| 88 | 88 | } else { |
@@ -138,14 +138,14 @@ discard block |
||
| 138 | 138 | $faq->getRecord($id); |
| 139 | 139 | $faq->faqRecord['category_id'] = $currentCategory; |
| 140 | 140 | |
| 141 | - $filename = 'FAQ-' . $id . '-' . $lang . '.pdf'; |
|
| 141 | + $filename = 'FAQ-'.$id.'-'.$lang.'.pdf'; |
|
| 142 | 142 | $pdfFile = $pdf->generateFile($faq->faqRecord, $filename); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | if (preg_match("/MSIE/i", $_SERVER["HTTP_USER_AGENT"])) { |
| 146 | 146 | $headers[] = "Content-type: application/pdf"; |
| 147 | 147 | $headers[] = "Content-Transfer-Encoding: binary"; |
| 148 | - $headers[] = "Content-Disposition: attachment; filename=" . $filename; |
|
| 148 | + $headers[] = "Content-Disposition: attachment; filename=".$filename; |
|
| 149 | 149 | } else { |
| 150 | 150 | $headers[] = "Content-Type: application/pdf"; |
| 151 | 151 | } |
@@ -75,8 +75,9 @@ |
||
| 75 | 75 | // check user rights, set them TRUE |
| 76 | 76 | $allUserRights = $user->perm->getAllUserRights($user->getUserId()); |
| 77 | 77 | foreach ($allRights as $right) { |
| 78 | - if (in_array($right['right_id'], $allUserRights)) |
|
| 79 | - $permission[$right['name']] = true; |
|
| 78 | + if (in_array($right['right_id'], $allUserRights)) { |
|
| 79 | + $permission[$right['name']] = true; |
|
| 80 | + } |
|
| 80 | 81 | } |
| 81 | 82 | } |
| 82 | 83 | |
@@ -1,25 +1,25 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * PDF export |
|
| 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 Frontend |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @author Peter Beauvain <[email protected]> |
|
| 15 | - * @author Olivier Plathey <[email protected]> |
|
| 16 | - * @author Krzysztof Kruszynski <[email protected]> |
|
| 17 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 18 | - * @copyright 2003-2016 phpMyFAQ Team |
|
| 19 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 20 | - * @link http://www.phpmyfaq.de |
|
| 21 | - * @since 2003-02-12 |
|
| 22 | - */ |
|
| 3 | + * PDF export |
|
| 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 Frontend |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @author Peter Beauvain <[email protected]> |
|
| 15 | + * @author Olivier Plathey <[email protected]> |
|
| 16 | + * @author Krzysztof Kruszynski <[email protected]> |
|
| 17 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 18 | + * @copyright 2003-2016 phpMyFAQ Team |
|
| 19 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 20 | + * @link http://www.phpmyfaq.de |
|
| 21 | + * @since 2003-02-12 |
|
| 22 | + */ |
|
| 23 | 23 | |
| 24 | 24 | define('IS_VALID_PHPMYFAQ', null); |
| 25 | 25 | |
@@ -20,10 +20,10 @@ |
||
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | $protocol = 'http'; |
| 23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
| 23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
| 24 | 24 | $protocol = 'https'; |
| 25 | 25 | } |
| 26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 27 | 27 | exit(); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | $protocol = 'http'; |
| 22 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
| 22 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
| 23 | 23 | $protocol = 'https'; |
| 24 | 24 | } |
| 25 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 25 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 26 | 26 | exit(); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $tpl->parse( |
| 80 | 80 | 'writeContent', |
| 81 | 81 | array( |
| 82 | - 'categoryHeader' => $PMF_LANG['msgEntriesIn'] . $catName, |
|
| 82 | + 'categoryHeader' => $PMF_LANG['msgEntriesIn'].$catName, |
|
| 83 | 83 | 'categoryDescription' => $catDescription, |
| 84 | 84 | 'categoryFaqsHeader' => $PMF_LANG['msgEntries'], |
| 85 | 85 | 'categoryContent' => $records, |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 23 | 23 | $protocol = 'http'; |
| 24 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
| 24 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
| 25 | 25 | $protocol = 'https'; |
| 26 | 26 | } |
| 27 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 27 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 28 | 28 | exit(); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -41,14 +41,14 @@ discard block |
||
| 41 | 41 | $newsId = PMF_Filter::filterInput(INPUT_GET, 'newsid', FILTER_VALIDATE_INT); |
| 42 | 42 | |
| 43 | 43 | if (is_null($newsId)) { |
| 44 | - header('Location: http://'.$_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 44 | + header('Location: http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 45 | 45 | exit(); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $faqsession->userTracking('news_view', $categoryId); |
| 49 | 49 | |
| 50 | 50 | // Define the header of the page |
| 51 | -$newsMainHeader = $faqConfig->get('main.titleFAQ') . $PMF_LANG['msgNews']; |
|
| 51 | +$newsMainHeader = $faqConfig->get('main.titleFAQ').$PMF_LANG['msgNews']; |
|
| 52 | 52 | $newsFeed = ' <a href="feed/news/rss.php" target="_blank"><img id="newsRSS" src="assets/img/feed.png" width="16" height="16" alt="RSS" /></a>'; |
| 53 | 53 | |
| 54 | 54 | // Get all data from the news record |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | 'writeContent' => $newsContent, |
| 116 | 116 | 'writeDateMsg' => $newsDate, |
| 117 | 117 | 'msgAboutThisNews' => $PMF_LANG['msgAboutThisNews'], |
| 118 | - 'writeAuthor' => ($news['active'] && (!$expired)) ? $PMF_LANG['msgAuthor'] . ': ' . $news['authorName'] : '', |
|
| 118 | + 'writeAuthor' => ($news['active'] && (!$expired)) ? $PMF_LANG['msgAuthor'].': '.$news['authorName'] : '', |
|
| 119 | 119 | 'editThisEntry' => $editThisEntry, |
| 120 | 120 | 'writeCommentMsg' => $commentMessage, |
| 121 | 121 | 'msgWriteComment' => $PMF_LANG['newsWriteComment'], |
@@ -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:"; |
@@ -20,10 +20,10 @@ |
||
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | $protocol = 'http'; |
| 23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
| 23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
| 24 | 24 | $protocol = 'https'; |
| 25 | 25 | } |
| 26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 27 | 27 | exit(); |
| 28 | 28 | } |
| 29 | 29 | |