@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * phpMyFAQ SQL Server Driver for PHP based search classes |
|
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_Search_Database |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2010-2015 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-07-06 |
|
18 | - */ |
|
3 | + * phpMyFAQ SQL Server Driver for PHP based search classes |
|
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_Search_Database |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2010-2015 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-07-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * phpMyFAQ database based search classes |
|
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 Search |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2010-2015 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-06-06 |
|
18 | - */ |
|
3 | + * phpMyFAQ database based search classes |
|
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 Search |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2010-2015 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-06-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | if (empty($this->joinedTable)) { |
163 | 163 | return ''; |
164 | 164 | } else { |
165 | - return ' LEFT JOIN ' . $this->joinedTable . ' ON '; |
|
165 | + return ' LEFT JOIN '.$this->joinedTable.' ON '; |
|
166 | 166 | } |
167 | 167 | } |
168 | 168 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | if (empty($resultColumns)) { |
194 | 194 | $resultColumns = $column; |
195 | 195 | } else { |
196 | - $resultColumns .= ', ' . $column; |
|
196 | + $resultColumns .= ', '.$column; |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $joinedColumns = ''; |
225 | 225 | |
226 | 226 | foreach ($this->joinedColumns as $column) { |
227 | - $joinedColumns .= $column . ' AND '; |
|
227 | + $joinedColumns .= $column.' AND '; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | return PMF_String::substr($joinedColumns, 0, -4); |
@@ -280,9 +280,9 @@ discard block |
||
280 | 280 | if (count($this->conditions)) { |
281 | 281 | foreach ($this->conditions as $column => $value) { |
282 | 282 | if (is_array($value)) { |
283 | - $conditions .= ' AND ' . $column . ' IN (' . implode(', ', $value) . ')'; |
|
283 | + $conditions .= ' AND '.$column.' IN ('.implode(', ', $value).')'; |
|
284 | 284 | } else { |
285 | - $conditions .= ' AND ' . $column . ' = ' . $value; |
|
285 | + $conditions .= ' AND '.$column.' = '.$value; |
|
286 | 286 | } |
287 | 287 | } |
288 | 288 | } |
@@ -305,10 +305,10 @@ discard block |
||
305 | 305 | $where = ''; |
306 | 306 | |
307 | 307 | for ($i = 0; $i < $numKeys; $i++) { |
308 | - if (strlen($where) != 0 ) { |
|
309 | - $where = $where . " OR"; |
|
308 | + if (strlen($where) != 0) { |
|
309 | + $where = $where." OR"; |
|
310 | 310 | } |
311 | - $where = $where . " ("; |
|
311 | + $where = $where." ("; |
|
312 | 312 | for ($j = 0; $j < $numMatch; $j++) { |
313 | 313 | if ($j != 0) { |
314 | 314 | $where = $where." OR "; |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Abstract class for phpMyFAQ search classes |
|
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 Search |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2010-2015 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-06-06 |
|
18 | - */ |
|
3 | + * Abstract class for phpMyFAQ search classes |
|
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 Search |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2010-2015 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-06-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Interface for phpMyFAQ search classes |
|
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 Search |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2010-2015 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-06-06 |
|
18 | - */ |
|
3 | + * Interface for phpMyFAQ search classes |
|
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 Search |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2010-2015 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-06-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Exception class for phpMyFAQ search classes |
|
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 Search |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2010-2015 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-06-06 |
|
18 | - */ |
|
3 | + * Exception class for phpMyFAQ search classes |
|
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 Search |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2010-2015 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-06-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @return mixed |
46 | 46 | */ |
47 | - public static function filterInput ($type, $variable_name, $filter, $default = null) |
|
47 | + public static function filterInput($type, $variable_name, $filter, $default = null) |
|
48 | 48 | { |
49 | 49 | $return = filter_input($type, $variable_name, $filter); |
50 | 50 | return (is_null($return) || $return === false) ? $default : $return; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @param array $definition Definition |
58 | 58 | * @return mixed |
59 | 59 | */ |
60 | - public static function filterInputArray ($type, Array $definition) |
|
60 | + public static function filterInputArray($type, Array $definition) |
|
61 | 61 | { |
62 | 62 | return filter_input_array($type, $definition); |
63 | 63 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * @param mixed $default Default value |
71 | 71 | * @return mixed |
72 | 72 | */ |
73 | - public static function filterVar ($variable, $filter, $default = null) |
|
73 | + public static function filterVar($variable, $filter, $default = null) |
|
74 | 74 | { |
75 | 75 | $return = filter_var($variable, $filter); |
76 | 76 | return ($return === false) ? $default : $return; |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Helper class for phpMyFAQ FAQs |
|
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 Helper |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2010-2015 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-11-12 |
|
18 | - */ |
|
3 | + * Helper class for phpMyFAQ FAQs |
|
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 Helper |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2010-2015 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-11-12 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -117,7 +117,7 @@ |
||
117 | 117 | $faq->faqRecord['id'] |
118 | 118 | ); |
119 | 119 | |
120 | - $oLink = new PMF_Link(PMF_Link::getSystemRelativeUri() . $faqUrl, $this->_config); |
|
120 | + $oLink = new PMF_Link(PMF_Link::getSystemRelativeUri().$faqUrl, $this->_config); |
|
121 | 121 | $oLink->itemTitle = $faq->faqRecord['title']; |
122 | 122 | $availableLanguages = $this->_config->getLanguage()->languageAvailable($faq->faqRecord['id']); |
123 | 123 |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Helper class for phpMyFAQ search |
|
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 Helper |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2009-2015 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 2009-09-07 |
|
18 | - */ |
|
3 | + * Helper class for phpMyFAQ search |
|
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 Helper |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2009-2015 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 2009-09-07 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -293,10 +293,10 @@ discard block |
||
293 | 293 | |
294 | 294 | if (PMF_String::strlen($searchItems[0]) > 1) { |
295 | 295 | foreach ($searchItems as $item) { |
296 | - if (PMF_String::strlen($item) > 2) { |
|
297 | - $question = PMF_Utils::setHighlightedString($question, $item); |
|
298 | - $answerPreview = PMF_Utils::setHighlightedString($answerPreview, $item); |
|
299 | - } |
|
296 | + if (PMF_String::strlen($item) > 2) { |
|
297 | + $question = PMF_Utils::setHighlightedString($question, $item); |
|
298 | + $answerPreview = PMF_Utils::setHighlightedString($answerPreview, $item); |
|
299 | + } |
|
300 | 300 | } |
301 | 301 | } |
302 | 302 |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | return sprintf( |
115 | 115 | '<a class="searchplugin" href="#" onclick="window.external.AddSearchProvider(\'%s\'); return false;">%s</a>', |
116 | - $this->_config->get('main.referenceURL') . '/opensearch.php', |
|
116 | + $this->_config->get('main.referenceURL').'/opensearch.php', |
|
117 | 117 | $this->translation['opensearch_plugin_install'] |
118 | 118 | ); |
119 | 119 | } |
@@ -240,8 +240,8 @@ discard block |
||
240 | 240 | $confPerPage = $this->_config->get('records.numberOfRecordsPerPage'); |
241 | 241 | $numOfResults = $resultSet->getNumberOfResults(); |
242 | 242 | |
243 | - $totalPages = ceil($numOfResults / $confPerPage); |
|
244 | - $lastPage = $currentPage * $confPerPage; |
|
243 | + $totalPages = ceil($numOfResults/$confPerPage); |
|
244 | + $lastPage = $currentPage*$confPerPage; |
|
245 | 245 | $firstPage = $lastPage - $confPerPage; |
246 | 246 | if ($lastPage > $numOfResults) { |
247 | 247 | $lastPage = $numOfResults; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $this->translation['msgPage'], |
261 | 261 | $currentPage, |
262 | 262 | $this->translation['msgVoteFrom'], |
263 | - $this->plurals->GetMsg('plmsgPagesTotal',$totalPages) |
|
263 | + $this->plurals->GetMsg('plmsgPagesTotal', $totalPages) |
|
264 | 264 | ); |
265 | 265 | } |
266 | 266 | |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | $oLink->itemTitle = $result->question; |
377 | 377 | $oLink->text = $result->question; |
378 | 378 | $oLink->tooltip = $result->question; |
379 | - $html .= '<li>' . $oLink->toHtmlAnchor() . '</li>'; |
|
379 | + $html .= '<li>'.$oLink->toHtmlAnchor().'</li>'; |
|
380 | 380 | } |
381 | 381 | $html .= '</ul>'; |
382 | 382 | } |
@@ -406,6 +406,6 @@ discard block |
||
406 | 406 | } |
407 | 407 | } |
408 | 408 | |
409 | - return $html . '</ul>'; |
|
409 | + return $html.'</ul>'; |
|
410 | 410 | } |
411 | 411 | } |
412 | 412 | \ No newline at end of file |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Linkverifier Helper 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 PMF_Helper |
|
13 | - * @author Thorsten Rinne <[email protected]> |
|
14 | - * @copyright 2012-2015 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-09-03 |
|
18 | - */ |
|
3 | + * Linkverifier Helper 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 PMF_Helper |
|
13 | + * @author Thorsten Rinne <[email protected]> |
|
14 | + * @copyright 2012-2015 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-09-03 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |