@@ -440,7 +440,7 @@ |
||
| 440 | 440 | $i++; |
| 441 | 441 | if ($max - $min > 0) { |
| 442 | 442 | $CSSRelevanceLevel = |
| 443 | - (int)($CSSRelevanceMinLevel + $CSSRelevanceMaxLevel * ($tag['count'] - $min) / ($max - $min)); |
|
| 443 | + (int)($CSSRelevanceMinLevel + $CSSRelevanceMaxLevel*($tag['count'] - $min)/($max - $min)); |
|
| 444 | 444 | } |
| 445 | 445 | $class = 'relevance'.$CSSRelevanceLevel; |
| 446 | 446 | $html .= '<span class="'.$class.'">'; |
@@ -1,23 +1,23 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The main Tags class |
|
| 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 PMF_Tags |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | - * @author Georgi Korchev <[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-08-10 |
|
| 20 | - */ |
|
| 3 | + * The main Tags class |
|
| 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 PMF_Tags |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | + * @author Georgi Korchev <[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-08-10 |
|
| 20 | + */ |
|
| 21 | 21 | |
| 22 | 22 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 23 | 23 | exit(); |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | $tagName = trim($tagName); |
| 211 | 211 | if (PMF_String::strlen($tagName) > 0) { |
| 212 | 212 | if (!in_array(PMF_String::strtolower($tagName), |
| 213 | - array_map(array('PMF_String', 'strtolower'), $currentTags))) { |
|
| 213 | + array_map(array('PMF_String', 'strtolower'), $currentTags))) { |
|
| 214 | 214 | // Create the new tag |
| 215 | 215 | $newTagId = $this->_config->getDb()->nextId(PMF_Db::getTablePrefix().'faqtags', 'tagging_id'); |
| 216 | 216 | $query = sprintf(" |
@@ -65,12 +65,12 @@ |
||
| 65 | 65 | $hashtags = ''; |
| 66 | 66 | |
| 67 | 67 | if ($tags != '') { |
| 68 | - $hashtags = '#' . str_replace(',', ' #', $tags); |
|
| 68 | + $hashtags = '#'.str_replace(',', ' #', $tags); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $message = PMF_String::htmlspecialchars($question); |
| 72 | - $message .= ' ' . $hashtags; |
|
| 73 | - $message .= ' ' . $link; |
|
| 72 | + $message .= ' '.$hashtags; |
|
| 73 | + $message .= ' '.$link; |
|
| 74 | 74 | |
| 75 | 75 | $this->connection->post('statuses/update', array('status' => $message)); |
| 76 | 76 | } |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Service class for Twitter support |
|
| 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 Services |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @copyright 2010-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 2010-09-05 |
|
| 18 | - */ |
|
| 3 | + * Service class for Twitter support |
|
| 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 Services |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @copyright 2010-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 2010-09-05 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | exit(); |
@@ -59,18 +59,18 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public function getImage($email, $params = array()) |
| 61 | 61 | { |
| 62 | - $imageUrl = $this->getUrl() . 'avatar/' . $this->getHash($email); |
|
| 62 | + $imageUrl = $this->getUrl().'avatar/'.$this->getHash($email); |
|
| 63 | 63 | |
| 64 | 64 | $opts = array(); |
| 65 | 65 | |
| 66 | 66 | if (isset($params['default'])) { |
| 67 | - $opts[] = 'default='. $params['default']; |
|
| 67 | + $opts[] = 'default='.$params['default']; |
|
| 68 | 68 | } |
| 69 | 69 | if (isset($params['size'])) { |
| 70 | - $opts[] = 'size='. $params['size']; |
|
| 70 | + $opts[] = 'size='.$params['size']; |
|
| 71 | 71 | } |
| 72 | 72 | if (isset($params['rating'])) { |
| 73 | - $opts[] = 'rating='. $params['rating']; |
|
| 73 | + $opts[] = 'rating='.$params['rating']; |
|
| 74 | 74 | } |
| 75 | 75 | if (isset($params['force_default']) && $params['force_default'] === true) { |
| 76 | 76 | $opts[] = 'forcedefault=y'; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $params['class'] = ''; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - $gravatar = $imageUrl . (sizeof($opts) > 0 ? '?' . implode($opts, '&') : false); |
|
| 82 | + $gravatar = $imageUrl.(sizeof($opts) > 0 ? '?'.implode($opts, '&') : false); |
|
| 83 | 83 | |
| 84 | 84 | return sprintf( |
| 85 | 85 | '<img src="%s" class="%s" alt="Gravatar">', |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | if (0 == $bots && false == $banned) { |
| 113 | 113 | if (!isset($sid)) { |
| 114 | - $sid = $this->config->getDb()->nextId(PMF_Db::getTablePrefix() . 'faqsessions', 'sid'); |
|
| 114 | + $sid = $this->config->getDb()->nextId(PMF_Db::getTablePrefix().'faqsessions', 'sid'); |
|
| 115 | 115 | // Sanity check: force the session cookie to contains the current $sid |
| 116 | 116 | if (!is_null($sidc) && (!$sidc != $sid)) { |
| 117 | 117 | self::setCookie(self::PMF_COOKIE_NAME_SESSIONID, $sid); |
@@ -132,15 +132,15 @@ discard block |
||
| 132 | 132 | $this->config->getDb()->query($query); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - $data = $sid.';' . |
|
| 136 | - str_replace(';', ',', $action) . ';' . |
|
| 137 | - $id . ';' . |
|
| 138 | - $remoteAddr . ';' . |
|
| 139 | - str_replace(';', ',', $_SERVER['QUERY_STRING']) . ';' . |
|
| 140 | - str_replace(';', ',', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '') . ';' . |
|
| 141 | - str_replace(';', ',', urldecode($_SERVER['HTTP_USER_AGENT'])) . ';' . |
|
| 142 | - $_SERVER['REQUEST_TIME'] . ";\n"; |
|
| 143 | - $file = './data/tracking' . date('dmY'); |
|
| 135 | + $data = $sid.';'. |
|
| 136 | + str_replace(';', ',', $action).';'. |
|
| 137 | + $id.';'. |
|
| 138 | + $remoteAddr.';'. |
|
| 139 | + str_replace(';', ',', $_SERVER['QUERY_STRING']).';'. |
|
| 140 | + str_replace(';', ',', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '').';'. |
|
| 141 | + str_replace(';', ',', urldecode($_SERVER['HTTP_USER_AGENT'])).';'. |
|
| 142 | + $_SERVER['REQUEST_TIME'].";\n"; |
|
| 143 | + $file = './data/tracking'.date('dmY'); |
|
| 144 | 144 | file_put_contents($file, $data, FILE_APPEND); |
| 145 | 145 | } |
| 146 | 146 | } |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | |
| 339 | 339 | $timeNow = ($_SERVER['REQUEST_TIME'] - $activityTimeWindow); |
| 340 | 340 | |
| 341 | - if (! $this->config->get('security.enableLoginOnly')) { |
|
| 341 | + if (!$this->config->get('security.enableLoginOnly')) { |
|
| 342 | 342 | // Count all sids within the time window for public installations |
| 343 | 343 | // @todo add a new field in faqsessions in order to find out only sids of anonymous users |
| 344 | 344 | $query = sprintf(" |
@@ -1,21 +1,21 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The main User session class |
|
| 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 PMF_Session |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @copyright 2007-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 2007-03-31 |
|
| 18 | - */ |
|
| 3 | + * The main User session class |
|
| 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 PMF_Session |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @copyright 2007-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 2007-03-31 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | exit(); |
@@ -170,8 +170,8 @@ discard block |
||
| 170 | 170 | $result = $this->config->getDb()->query($query); |
| 171 | 171 | |
| 172 | 172 | if ($result) { |
| 173 | - $res = $this->config->getDb()->fetchObject($result); |
|
| 174 | - $timestamp = $res->time; |
|
| 173 | + $res = $this->config->getDb()->fetchObject($result); |
|
| 174 | + $timestamp = $res->time; |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | return $timestamp; |
@@ -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[] =& $this->categoryName[$row['id']]; |
|
| 229 | - $this->children[$row['parent_id']][$row['id']] =& $this->categoryName[$row['id']]; |
|
| 228 | + $this->categories[] = & $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); |
@@ -1308,7 +1308,7 @@ discard block |
||
| 1308 | 1308 | if ($lang == $selected_lang) { |
| 1309 | 1309 | $output .= " selected=\"selected\""; |
| 1310 | 1310 | } |
| 1311 | - $output .= ">".$langname."</option>\n"; |
|
| 1311 | + $output .= ">".$langname."</option>\n"; |
|
| 1312 | 1312 | } |
| 1313 | 1313 | } |
| 1314 | 1314 | |
@@ -1335,10 +1335,10 @@ discard block |
||
| 1335 | 1335 | $query .= ' ORDER BY id'; |
| 1336 | 1336 | $result = $this->_config->getDb()->query($query); |
| 1337 | 1337 | while ($row = $this->_config->getDb()->fetchArray($result)) { |
| 1338 | - if (!array_key_exists($row['id'],$this->categoryName)) { |
|
| 1338 | + if (!array_key_exists($row['id'], $this->categoryName)) { |
|
| 1339 | 1339 | $this->categoryName[$row['id']] = $row; |
| 1340 | - $this->categories[] =& $this->categoryName[$row['id']]; |
|
| 1341 | - $this->children[$row['parent_id']][$row['id']] =& $this->categoryName[$row['id']]; |
|
| 1340 | + $this->categories[] = & $this->categoryName[$row['id']]; |
|
| 1341 | + $this->children[$row['parent_id']][$row['id']] = & $this->categoryName[$row['id']]; |
|
| 1342 | 1342 | } |
| 1343 | 1343 | } |
| 1344 | 1344 | } |
@@ -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 | { |
@@ -1,24 +1,24 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The main category class |
|
| 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 Category |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @author Lars Tiedemann <[email protected]> |
|
| 15 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 16 | - * @author Rudi Ferrari <[email protected]> |
|
| 17 | - * @copyright 2004-2016 phpMyFAQ Team |
|
| 18 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 19 | - * @link http://www.phpmyfaq.de |
|
| 20 | - * @since 2004-02-16 |
|
| 21 | - */ |
|
| 3 | + * The main category class |
|
| 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 Category |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @author Lars Tiedemann <[email protected]> |
|
| 15 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 16 | + * @author Rudi Ferrari <[email protected]> |
|
| 17 | + * @copyright 2004-2016 phpMyFAQ Team |
|
| 18 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 19 | + * @link http://www.phpmyfaq.de |
|
| 20 | + * @since 2004-02-16 |
|
| 21 | + */ |
|
| 22 | 22 | |
| 23 | 23 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 24 | 24 | exit(); |
@@ -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) { |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | while (($row = $this->_config->getDb()->fetchObject($result))) { |
| 107 | 107 | |
| 108 | 108 | $counter++; |
| 109 | - if (($showArchive && ($counter > $this->_config->get('records.numberOfShownNewsEntries'))) || |
|
| 109 | + if (($showArchive && ($counter > $this->_config->get('records.numberOfShownNewsEntries'))) || |
|
| 110 | 110 | ((!$showArchive) && (!$forceConfLimit) && |
| 111 | 111 | ($counter <= $this->_config->get('records.numberOfShownNewsEntries'))) || |
| 112 | 112 | ((!$showArchive) && $forceConfLimit)) { |
@@ -1,22 +1,22 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The News class for phpMyFAQ news |
|
| 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 PMF_News |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | - * @copyright 2006-2016 phpMyFAQ Team |
|
| 16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 17 | - * @link http://www.phpmyfaq.de |
|
| 18 | - * @since 2006-06-25 |
|
| 19 | - */ |
|
| 3 | + * The News class for phpMyFAQ news |
|
| 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 PMF_News |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | + * @copyright 2006-2016 phpMyFAQ Team |
|
| 16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 17 | + * @link http://www.phpmyfaq.de |
|
| 18 | + * @since 2006-06-25 |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | exit(); |
@@ -42,10 +42,10 @@ discard block |
||
| 42 | 42 | private $_config; |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | - * Language strings |
|
| 46 | - * |
|
| 47 | - * @var string |
|
| 48 | - */ |
|
| 45 | + * Language strings |
|
| 46 | + * |
|
| 47 | + * @var string |
|
| 48 | + */ |
|
| 49 | 49 | private $pmf_lang; |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -152,9 +152,9 @@ discard block |
||
| 152 | 152 | foreach ($news as $item) { |
| 153 | 153 | |
| 154 | 154 | $url = sprintf('%s?action=news&newsid=%d&newslang=%s', |
| 155 | - PMF_Link::getSystemRelativeUri(), |
|
| 156 | - $item['id'], |
|
| 157 | - $item['lang']); |
|
| 155 | + PMF_Link::getSystemRelativeUri(), |
|
| 156 | + $item['id'], |
|
| 157 | + $item['lang']); |
|
| 158 | 158 | $oLink = new PMF_Link($url, $this->_config); |
| 159 | 159 | |
| 160 | 160 | if (isset($item['header'])) { |
@@ -291,10 +291,10 @@ |
||
| 291 | 291 | public function update(Array $newConfigs) |
| 292 | 292 | { |
| 293 | 293 | $runtimeConfigs = array( |
| 294 | - 'core.database', // PMF_DB_Driver |
|
| 295 | - 'core.instance', // PMF_Instance |
|
| 296 | - 'core.language', // Language |
|
| 297 | - 'core.ldap', // PMF_Ldap |
|
| 294 | + 'core.database', // PMF_DB_Driver |
|
| 295 | + 'core.instance', // PMF_Instance |
|
| 296 | + 'core.language', // Language |
|
| 297 | + 'core.ldap', // PMF_Ldap |
|
| 298 | 298 | 'core.ldapConfig' // $PMF_LDAP |
| 299 | 299 | ); |
| 300 | 300 | if (is_array($newConfigs)) { |
@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The main class for fetching the configuration, update and delete items. This |
|
| 4 | - * class is also a small Dependency Injection Container for phpMyFAQ. |
|
| 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 Configuration |
|
| 14 | - * @author Thorsten Rinne <[email protected]> |
|
| 15 | - * @copyright 2006-2016 phpMyFAQ Team |
|
| 16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 17 | - * @link http://www.phpmyfaq.de |
|
| 18 | - * @since 2006-01-04 |
|
| 19 | - */ |
|
| 3 | + * The main class for fetching the configuration, update and delete items. This |
|
| 4 | + * class is also a small Dependency Injection Container for phpMyFAQ. |
|
| 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 Configuration |
|
| 14 | + * @author Thorsten Rinne <[email protected]> |
|
| 15 | + * @copyright 2006-2016 phpMyFAQ Team |
|
| 16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 17 | + * @link http://www.phpmyfaq.de |
|
| 18 | + * @since 2006-01-04 |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | exit(); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | exit(); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | -require_once PMF_CONFIG_DIR . '/constants.php'; |
|
| 25 | +require_once PMF_CONFIG_DIR.'/constants.php'; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Export Class |
@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * XML, XHTML and PDF export - Classes and Functions |
|
| 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 Export |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 16 | - * @copyright 2005-2016 phpMyFAQ Team |
|
| 17 | - * @link http://www.phpmyfaq.de |
|
| 18 | - * @since 2005-11-02 |
|
| 19 | - */ |
|
| 3 | + * XML, XHTML and PDF export - Classes and Functions |
|
| 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 Export |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 16 | + * @copyright 2005-2016 phpMyFAQ Team |
|
| 17 | + * @link http://www.phpmyfaq.de |
|
| 18 | + * @since 2005-11-02 |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | exit(); |
@@ -86,11 +86,11 @@ |
||
| 86 | 86 | public function sendOpenQuestionAnswered($email, $userName, $url) |
| 87 | 87 | { |
| 88 | 88 | $this->mail->addTo($email, $userName); |
| 89 | - $this->mail->subject = $this->config->get('main.titleFAQ') . ' - ' . $this->pmfStr['msgQuestionAnswered']; |
|
| 89 | + $this->mail->subject = $this->config->get('main.titleFAQ').' - '.$this->pmfStr['msgQuestionAnswered']; |
|
| 90 | 90 | $this->mail->message = sprintf( |
| 91 | 91 | $this->pmfStr['msgMessageQuestionAnswered'], |
| 92 | 92 | $this->config->get('main.titleFAQ') |
| 93 | - ) . "\n\r" . $url; |
|
| 93 | + )."\n\r".$url; |
|
| 94 | 94 | $this->mail->send(); |
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | \ No newline at end of file |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The notification class for phpMyFAQ |
|
| 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 Notification |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @copyright 2012-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 2012-08-30 |
|
| 18 | - */ |
|
| 3 | + * The notification class for phpMyFAQ |
|
| 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 Notification |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @copyright 2012-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 2012-08-30 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | exit(); |