@@ -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, |
@@ -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'], |
@@ -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:"; |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Serbian language file |
|
4 | - * |
|
5 | - * @author Vanja Hrustic <[email protected]> |
|
6 | - * @author Slavisa Milojkovic <[email protected]> |
|
7 | - * @since 2004-06-24 |
|
8 | - * @copyright 2006-2016 phpMyFAQ Team |
|
9 | - * @version $Id: language_sr.php,v 1.26 2008-05-31 11:49:42 thorstenr Exp $ |
|
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 | - */ |
|
3 | + * Serbian language file |
|
4 | + * |
|
5 | + * @author Vanja Hrustic <[email protected]> |
|
6 | + * @author Slavisa Milojkovic <[email protected]> |
|
7 | + * @since 2004-06-24 |
|
8 | + * @copyright 2006-2016 phpMyFAQ Team |
|
9 | + * @version $Id: language_sr.php,v 1.26 2008-05-31 11:49:42 thorstenr Exp $ |
|
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 | 15 | |
16 | 16 | $PMF_LANG["metaCharset"] = "UTF-8"; |
17 | 17 | $PMF_LANG["metaLanguage"] = "sr"; |
@@ -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 | { |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | |
226 | 226 | while ($row = $this->_config->getDb()->fetchArray($result)) { |
227 | 227 | $this->categoryName[$row['id']] = $row; |
228 | - $this->categories[$row['id']] =& $this->categoryName[$row['id']]; |
|
229 | - $this->children[$row['parent_id']][$row['id']] =& $this->categoryName[$row['id']]; |
|
228 | + $this->categories[$row['id']] = & $this->categoryName[$row['id']]; |
|
229 | + $this->children[$row['parent_id']][$row['id']] = & $this->categoryName[$row['id']]; |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | return $this->categories; |
@@ -392,8 +392,8 @@ discard block |
||
392 | 392 | $symbol = 'minus'; |
393 | 393 | } else { |
394 | 394 | $temp = isset($this->children[$thisParent_id]) ? array_keys($this->children[$thisParent_id]) : array(); |
395 | - if (isset($temp[count($temp)-1])) { |
|
396 | - $symbol = ($id == $temp[count($temp)-1]) ? 'angle' : 'medium'; |
|
395 | + if (isset($temp[count($temp) - 1])) { |
|
396 | + $symbol = ($id == $temp[count($temp) - 1]) ? 'angle' : 'medium'; |
|
397 | 397 | } |
398 | 398 | } |
399 | 399 | |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | $childs = array(); |
467 | 467 | |
468 | 468 | if (isset($this->children[$id])) { |
469 | - foreach(array_keys($this->children[$id]) as $childId) { |
|
469 | + foreach (array_keys($this->children[$id]) as $childId) { |
|
470 | 470 | $childs = array_merge($childs, array($childId)); |
471 | 471 | $childs = array_merge($childs, $this->getChildNodes($childId)); |
472 | 472 | } |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | $open = 0; |
620 | 620 | $this->expandAll(); |
621 | 621 | |
622 | - for ($y = 0 ;$y < $this->height(); $y = $this->getNextLineTree($y)) { |
|
622 | + for ($y = 0; $y < $this->height(); $y = $this->getNextLineTree($y)) { |
|
623 | 623 | |
624 | 624 | list($categoryName, $parent, $description) = $this->getLineDisplay($y); |
625 | 625 | $level = $this->treeTab[$y]['level']; |
@@ -661,14 +661,14 @@ discard block |
||
661 | 661 | $num_entries = ''; |
662 | 662 | } else { |
663 | 663 | $totFaqRecords += $number[$parent]; |
664 | - $num_entries = '<span class="rssCategoryLink"> ('.$plr->GetMsg('plmsgEntries',$number[$parent]); |
|
664 | + $num_entries = '<span class="rssCategoryLink"> ('.$plr->GetMsg('plmsgEntries', $number[$parent]); |
|
665 | 665 | $num_entries .= sprintf( |
666 | 666 | ' <a href="feed/category/rss.php?category_id=%d&category_lang=%s" target="_blank"><img id="category_%d_RSS" src="assets/img/feed.png" width="16" height="16" alt="RSS"></a>', |
667 | 667 | $parent, |
668 | 668 | $this->language, |
669 | 669 | $parent |
670 | 670 | ); |
671 | - $num_entries .= ')</span>'; |
|
671 | + $num_entries .= ')</span>'; |
|
672 | 672 | } |
673 | 673 | |
674 | 674 | $url = sprintf( |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | $oLink->text = $categoryName; |
683 | 683 | $oLink->tooltip = $description; |
684 | 684 | |
685 | - $output .= $oLink->toHtmlAnchor() . $num_entries; |
|
685 | + $output .= $oLink->toHtmlAnchor().$num_entries; |
|
686 | 686 | $open = $level; |
687 | 687 | } |
688 | 688 | |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | return $l + 1; |
726 | 726 | } else { |
727 | 727 | for ($i = $l + 1; $i < $this->height(); $i++) { |
728 | - if ($this->treeTab[$i]["level"]<=$this->treeTab[$l]["level"]) { |
|
728 | + if ($this->treeTab[$i]["level"] <= $this->treeTab[$l]["level"]) { |
|
729 | 729 | return $i; |
730 | 730 | } |
731 | 731 | } |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | ); |
766 | 766 | |
767 | 767 | $oLink = new PMF_Link($url, $this->_config); |
768 | - $oLink->id = 'category_' . $categoryId; |
|
768 | + $oLink->id = 'category_'.$categoryId; |
|
769 | 769 | $oLink->itemTitle = $categoryName; |
770 | 770 | $oLink->text = $categoryName; |
771 | 771 | |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | return sprintf( |
847 | 847 | '<ul class="%s">%s</ul>', |
848 | 848 | $useCssClass, |
849 | - implode('<li class="divider">' . $separator . '</li>', $temp) |
|
849 | + implode('<li class="divider">'.$separator.'</li>', $temp) |
|
850 | 850 | ); |
851 | 851 | } else { |
852 | 852 | return implode($separator, $temp); |
@@ -1314,7 +1314,7 @@ discard block |
||
1314 | 1314 | if ($lang == $selected_lang) { |
1315 | 1315 | $output .= " selected=\"selected\""; |
1316 | 1316 | } |
1317 | - $output .= ">".$langname."</option>\n"; |
|
1317 | + $output .= ">".$langname."</option>\n"; |
|
1318 | 1318 | } |
1319 | 1319 | } |
1320 | 1320 | |
@@ -1341,10 +1341,10 @@ discard block |
||
1341 | 1341 | $query .= ' ORDER BY id'; |
1342 | 1342 | $result = $this->_config->getDb()->query($query); |
1343 | 1343 | while ($row = $this->_config->getDb()->fetchArray($result)) { |
1344 | - if (!array_key_exists($row['id'],$this->categoryName)) { |
|
1344 | + if (!array_key_exists($row['id'], $this->categoryName)) { |
|
1345 | 1345 | $this->categoryName[$row['id']] = $row; |
1346 | - $this->categories[] =& $this->categoryName[$row['id']]; |
|
1347 | - $this->children[$row['parent_id']][$row['id']] =& $this->categoryName[$row['id']]; |
|
1346 | + $this->categories[] = & $this->categoryName[$row['id']]; |
|
1347 | + $this->children[$row['parent_id']][$row['id']] = & $this->categoryName[$row['id']]; |
|
1348 | 1348 | } |
1349 | 1349 | } |
1350 | 1350 | } |
@@ -574,10 +574,10 @@ discard block |
||
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
577 | - * print the static tree with the number of records |
|
578 | - * |
|
579 | - * @return string |
|
580 | - */ |
|
577 | + * print the static tree with the number of records |
|
578 | + * |
|
579 | + * @return string |
|
580 | + */ |
|
581 | 581 | public function viewTree() |
582 | 582 | { |
583 | 583 | global $sids, $PMF_LANG, $plr; |
@@ -1225,7 +1225,7 @@ discard block |
||
1225 | 1225 | PMF_Db::getTablePrefix(), |
1226 | 1226 | $category_id); |
1227 | 1227 | if (!$delete_all) { |
1228 | - $query .= " AND lang = '".$category_lang."'"; |
|
1228 | + $query .= " AND lang = '".$category_lang."'"; |
|
1229 | 1229 | } |
1230 | 1230 | $this->_config->getDb()->query($query); |
1231 | 1231 | |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | PMF_Db::getTablePrefix(), |
1250 | 1250 | $category_id); |
1251 | 1251 | if (!$delete_all) { |
1252 | - $query .= " AND category_lang = '".$category_lang."'"; |
|
1252 | + $query .= " AND category_lang = '".$category_lang."'"; |
|
1253 | 1253 | } |
1254 | 1254 | $this->_config->getDb()->query($query); |
1255 | 1255 | |
@@ -1273,7 +1273,7 @@ discard block |
||
1273 | 1273 | $translated = array(); |
1274 | 1274 | |
1275 | 1275 | foreach ($existcatlang as $language) { |
1276 | - $query = sprintf(" |
|
1276 | + $query = sprintf(" |
|
1277 | 1277 | SELECT |
1278 | 1278 | name, description |
1279 | 1279 | FROM |
@@ -1282,13 +1282,13 @@ discard block |
||
1282 | 1282 | id = %d |
1283 | 1283 | AND |
1284 | 1284 | lang = '%s'", |
1285 | - PMF_Db::getTablePrefix(), |
|
1286 | - $category_id, |
|
1287 | - $language); |
|
1288 | - $result = $this->_config->getDb()->query($query); |
|
1289 | - if ($row = $this->_config->getDb()->fetchArray($result)) { |
|
1290 | - $translated[$languageCodes[strtoupper($language)]] = $row['name'].('' == $row['description'] ? '' : ' ('.$row['description'].')'); |
|
1291 | - } |
|
1285 | + PMF_Db::getTablePrefix(), |
|
1286 | + $category_id, |
|
1287 | + $language); |
|
1288 | + $result = $this->_config->getDb()->query($query); |
|
1289 | + if ($row = $this->_config->getDb()->fetchArray($result)) { |
|
1290 | + $translated[$languageCodes[strtoupper($language)]] = $row['name'].('' == $row['description'] ? '' : ' ('.$row['description'].')'); |
|
1291 | + } |
|
1292 | 1292 | } |
1293 | 1293 | ksort($translated); |
1294 | 1294 | |
@@ -1342,9 +1342,9 @@ discard block |
||
1342 | 1342 | $result = $this->_config->getDb()->query($query); |
1343 | 1343 | while ($row = $this->_config->getDb()->fetchArray($result)) { |
1344 | 1344 | if (!array_key_exists($row['id'],$this->categoryName)) { |
1345 | - $this->categoryName[$row['id']] = $row; |
|
1346 | - $this->categories[] =& $this->categoryName[$row['id']]; |
|
1347 | - $this->children[$row['parent_id']][$row['id']] =& $this->categoryName[$row['id']]; |
|
1345 | + $this->categoryName[$row['id']] = $row; |
|
1346 | + $this->categories[] =& $this->categoryName[$row['id']]; |
|
1347 | + $this->children[$row['parent_id']][$row['id']] =& $this->categoryName[$row['id']]; |
|
1348 | 1348 | } |
1349 | 1349 | } |
1350 | 1350 | } |
@@ -1540,8 +1540,8 @@ discard block |
||
1540 | 1540 | fd.lang = fcr.category_lang |
1541 | 1541 | ORDER BY |
1542 | 1542 | fcr.category_id, fd.id', |
1543 | - PMF_Db::getTablePrefix(), |
|
1544 | - PMF_Db::getTablePrefix()); |
|
1543 | + PMF_Db::getTablePrefix(), |
|
1544 | + PMF_Db::getTablePrefix()); |
|
1545 | 1545 | $result = $this->_config->getDb()->query($query); |
1546 | 1546 | |
1547 | 1547 | if ($this->_config->getDb()->numRows($result) > 0) { |
@@ -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,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'], |
@@ -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 |