@@ -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>'; |
@@ -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 |
@@ -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, |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Frontend for categories or list of records |
|
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 | - * @copyright 2002-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 2002-08-27 |
|
18 | - */ |
|
3 | + * Frontend for categories or list of records |
|
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 | + * @copyright 2002-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 2002-08-27 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
@@ -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'], |
@@ -1,23 +1,23 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Shows the page with the news record and - when available - the user |
|
4 | - * comments |
|
5 | - * |
|
6 | - * PHP Version 5.3 |
|
7 | - * |
|
8 | - * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
9 | - * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
10 | - * obtain one at http://mozilla.org/MPL/2.0/. |
|
11 | - * |
|
12 | - * @category phpMyFAQ |
|
13 | - * @package Frontend |
|
14 | - * @author Thorsten Rinne <[email protected]> |
|
15 | - * @author Matteo Scaramuccia <[email protected]> |
|
16 | - * @copyright 2006-2016 phpMyFAQ Team |
|
17 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
18 | - * @link http://www.phpmyfaq.de |
|
19 | - * @since 2006-07-23 |
|
20 | - */ |
|
3 | + * Shows the page with the news record and - when available - the user |
|
4 | + * comments |
|
5 | + * |
|
6 | + * PHP Version 5.3 |
|
7 | + * |
|
8 | + * This Source Code Form is subject to the terms of the Mozilla Public License, |
|
9 | + * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
|
10 | + * obtain one at http://mozilla.org/MPL/2.0/. |
|
11 | + * |
|
12 | + * @category phpMyFAQ |
|
13 | + * @package Frontend |
|
14 | + * @author Thorsten Rinne <[email protected]> |
|
15 | + * @author Matteo Scaramuccia <[email protected]> |
|
16 | + * @copyright 2006-2016 phpMyFAQ Team |
|
17 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
18 | + * @link http://www.phpmyfaq.de |
|
19 | + * @since 2006-07-23 |
|
20 | + */ |
|
21 | 21 | |
22 | 22 | if (!defined('IS_VALID_PHPMYFAQ')) { |
23 | 23 | $protocol = 'http'; |
@@ -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 |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Snippet for writing a comment |
|
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 | - * @copyright 2002-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 2002-08-29 |
|
18 | - */ |
|
3 | + * Snippet for writing a comment |
|
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 | + * @copyright 2002-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 2002-08-29 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |