@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The main phpMyFAQ instances class for instance masters |
|
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_Instance |
|
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-03-31 |
|
18 | - */ |
|
3 | + * The main phpMyFAQ instances class for instance masters |
|
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_Instance |
|
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-03-31 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Abstract parent for the string wrapper classes |
|
4 | - * |
|
5 | - * PHP Version 5.3.0 |
|
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 String |
|
13 | - * @author Anatoliy Belsky <[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-04-06 |
|
18 | - */ |
|
3 | + * Abstract parent for the string wrapper classes |
|
4 | + * |
|
5 | + * PHP Version 5.3.0 |
|
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 String |
|
13 | + * @author Anatoliy Belsky <[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-04-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -73,14 +73,14 @@ discard block |
||
73 | 73 | return mb_detect_encoding($str, 'UTF-8', true); |
74 | 74 | } else { |
75 | 75 | $regex = '/^([\x00-\x7f]|' |
76 | - . '[\xc2-\xdf][\x80-\xbf]|' |
|
77 | - . '\xe0[\xa0-\xbf][\x80-\xbf]|' |
|
78 | - . '[\xe1-\xec][\x80-\xbf]{2}|' |
|
79 | - . '\xed[\x80-\x9f][\x80-\xbf]|' |
|
80 | - . '[\xee-\xef][\x80-\xbf]{2}|' |
|
81 | - . '\xf0[\x90-\xbf][\x80-\xbf]{2}|' |
|
82 | - . '[\xf1-\xf3][\x80-\xbf]{3}|' |
|
83 | - . '\xf4[\x80-\x8f][\x80-\xbf]{2})*$/'; |
|
76 | + . '[\xc2-\xdf][\x80-\xbf]|' |
|
77 | + . '\xe0[\xa0-\xbf][\x80-\xbf]|' |
|
78 | + . '[\xe1-\xec][\x80-\xbf]{2}|' |
|
79 | + . '\xed[\x80-\x9f][\x80-\xbf]|' |
|
80 | + . '[\xee-\xef][\x80-\xbf]{2}|' |
|
81 | + . '\xf0[\x90-\xbf][\x80-\xbf]{2}|' |
|
82 | + . '[\xf1-\xf3][\x80-\xbf]{3}|' |
|
83 | + . '\xf4[\x80-\x8f][\x80-\xbf]{2})*$/'; |
|
84 | 84 | return preg_match($regex, $str) === 1; |
85 | 85 | } |
86 | 86 | } |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The string wrapper class using single byte string functions |
|
4 | - * |
|
5 | - * PHP Version 5.3.0 |
|
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 String |
|
13 | - * @author Anatoliy Belsky <[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-04-06 |
|
18 | - */ |
|
3 | + * The string wrapper class using single byte string functions |
|
4 | + * |
|
5 | + * PHP Version 5.3.0 |
|
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 String |
|
13 | + * @author Anatoliy Belsky <[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-04-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function strstr($haystack, $needle, $part = false) |
162 | 162 | { |
163 | - return strstr($haystack, $needle, (boolean) $part); |
|
163 | + return strstr($haystack, $needle, (boolean)$part); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | /** |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | * |
263 | 263 | * @return array|string |
264 | 264 | */ |
265 | - public function preg_replace_callback($pattern, $callback, $subject, $limit= -1, &$count = 0) |
|
265 | + public function preg_replace_callback($pattern, $callback, $subject, $limit = -1, &$count = 0) |
|
266 | 266 | { |
267 | 267 | return preg_replace_callback($pattern, $callback, $subject, $limit, $count); |
268 | 268 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | * |
279 | 279 | * @return array|string|null |
280 | 280 | */ |
281 | - public function preg_replace($pattern, $replacement, $subject, $limit= -1, &$count = 0) |
|
281 | + public function preg_replace($pattern, $replacement, $subject, $limit = -1, &$count = 0) |
|
282 | 282 | { |
283 | 283 | return preg_replace($pattern, $replacement, $subject, $limit, $count); |
284 | 284 | } |
@@ -143,7 +143,7 @@ |
||
143 | 143 | * @param string $needle Needle |
144 | 144 | * @param boolean $part Part |
145 | 145 | * |
146 | - * @return string|false |
|
146 | + * @return string |
|
147 | 147 | */ |
148 | 148 | public function strstr($haystack, $needle, $part = false) |
149 | 149 | { |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The Installer class installs phpMyFAQ. Classy. |
|
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 Installer |
|
13 | - * @author Florian Anderiasch <[email protected]> |
|
14 | - * @copyright 2002-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-08-27 |
|
18 | - */ |
|
3 | + * The Installer class installs phpMyFAQ. Classy. |
|
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 Installer |
|
13 | + * @author Florian Anderiasch <[email protected]> |
|
14 | + * @copyright 2002-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-08-27 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -389,13 +389,13 @@ discard block |
||
389 | 389 | PMF_System::renderFooter(); |
390 | 390 | } |
391 | 391 | |
392 | - if (! function_exists('date_default_timezone_set')) { |
|
392 | + if (!function_exists('date_default_timezone_set')) { |
|
393 | 393 | echo '<p class="alert alert-error">Sorry, but setting a default timezone doesn\'t work in your environment!</p>'; |
394 | 394 | PMF_System::renderFooter(); |
395 | 395 | } |
396 | 396 | |
397 | - if (! $this->_system->checkDatabase()) { |
|
398 | - echo '<p class="alert alert-error">No supported database detected! Please install one of the following' . |
|
397 | + if (!$this->_system->checkDatabase()) { |
|
398 | + echo '<p class="alert alert-error">No supported database detected! Please install one of the following'. |
|
399 | 399 | ' database systems and enable the corresponding PHP extension in php.ini:</p>'; |
400 | 400 | echo '<ul>'; |
401 | 401 | foreach ($this->_system->getSupportedDatabases() as $database) { |
@@ -405,8 +405,8 @@ discard block |
||
405 | 405 | PMF_System::renderFooter(); |
406 | 406 | } |
407 | 407 | |
408 | - if (! $this->_system->checkRequiredExtensions()) { |
|
409 | - echo '<p class="alert alert-error">The following extensions are missing! Please enable the PHP extension(s) in ' . |
|
408 | + if (!$this->_system->checkRequiredExtensions()) { |
|
409 | + echo '<p class="alert alert-error">The following extensions are missing! Please enable the PHP extension(s) in '. |
|
410 | 410 | 'php.ini.</p>'; |
411 | 411 | echo '<ul>'; |
412 | 412 | foreach ($this->_system->getMissingExtensions() as $extension) { |
@@ -416,18 +416,18 @@ discard block |
||
416 | 416 | PMF_System::renderFooter(); |
417 | 417 | } |
418 | 418 | |
419 | - if (! $this->_system->checkRegisterGlobals()) { |
|
419 | + if (!$this->_system->checkRegisterGlobals()) { |
|
420 | 420 | echo '<p class="alert alert-error">Please disable register_globals!</p>'; |
421 | 421 | PMF_System::renderFooter(); |
422 | 422 | } |
423 | 423 | |
424 | - if (! $this->_system->checkMagicQuotesGpc()) { |
|
424 | + if (!$this->_system->checkMagicQuotesGpc()) { |
|
425 | 425 | echo '<p class="alert alert-error">Please disable magic_quotes_gpc!</p>'; |
426 | 426 | PMF_System::renderFooter(); |
427 | 427 | } |
428 | 428 | |
429 | - if (! $this->_system->checkphpMyFAQInstallation()) { |
|
430 | - echo '<p class="alert alert-error">It seems you\'re already running a version of phpMyFAQ. Please use the ' . |
|
429 | + if (!$this->_system->checkphpMyFAQInstallation()) { |
|
430 | + echo '<p class="alert alert-error">It seems you\'re already running a version of phpMyFAQ. Please use the '. |
|
431 | 431 | '<a href="update.php">update script</a>.</p>'; |
432 | 432 | PMF_System::renderFooter(); |
433 | 433 | } |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | */ |
441 | 441 | public function checkPreUpgrade() |
442 | 442 | { |
443 | - if (! $this->checkMinimumPhpVersion()) { |
|
443 | + if (!$this->checkMinimumPhpVersion()) { |
|
444 | 444 | printf( |
445 | 445 | '<p class="alert alert-error">Sorry, but you need PHP %s or later!</p>', |
446 | 446 | PMF_System::VERSION_MINIMUM_PHP |
@@ -448,18 +448,18 @@ discard block |
||
448 | 448 | PMF_System::renderFooter(); |
449 | 449 | } |
450 | 450 | |
451 | - if (! is_readable(PMF_ROOT_DIR . '/inc/data.php') && ! is_readable(PMF_ROOT_DIR . '/config/database.php')) { |
|
452 | - echo '<p class="alert alert-error">It seems you never run a version of phpMyFAQ.<br />' . |
|
451 | + if (!is_readable(PMF_ROOT_DIR.'/inc/data.php') && !is_readable(PMF_ROOT_DIR.'/config/database.php')) { |
|
452 | + echo '<p class="alert alert-error">It seems you never run a version of phpMyFAQ.<br />'. |
|
453 | 453 | 'Please use the <a href="setup.php">install script</a>.</p>'; |
454 | 454 | PMF_System::renderFooter(); |
455 | 455 | } |
456 | 456 | |
457 | - if (! $this->_system->checkRegisterGlobals()) { |
|
457 | + if (!$this->_system->checkRegisterGlobals()) { |
|
458 | 458 | echo '<p class="alert alert-error">Please disable register_globals!</p>'; |
459 | 459 | PMF_System::renderFooter(); |
460 | 460 | } |
461 | 461 | |
462 | - if (! $this->_system->checkMagicQuotesGpc()) { |
|
462 | + if (!$this->_system->checkMagicQuotesGpc()) { |
|
463 | 463 | echo '<p class="alert alert-error">Please disable magic_quotes_gpc!</p>'; |
464 | 464 | PMF_System::renderFooter(); |
465 | 465 | } |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | echo "<li>$dir</li>\n"; |
503 | 503 | } |
504 | 504 | printf( |
505 | - '</ul><p class="alert alert-error">Please create %s manually and/or change access to chmod 775 (or ' . |
|
505 | + '</ul><p class="alert alert-error">Please create %s manually and/or change access to chmod 775 (or '. |
|
506 | 506 | 'greater if necessary).</p>', |
507 | 507 | (1 < $numDirs) ? 'them' : 'it' |
508 | 508 | ); |
@@ -519,26 +519,26 @@ discard block |
||
519 | 519 | public function checkNoncriticalSettings() |
520 | 520 | { |
521 | 521 | if ((@ini_get('safe_mode') == 'On' || @ini_get('safe_mode') === 1)) { |
522 | - echo '<p class="alert alert-error">The PHP safe mode is enabled. You may have problems when phpMyFAQ tries to write ' . |
|
522 | + echo '<p class="alert alert-error">The PHP safe mode is enabled. You may have problems when phpMyFAQ tries to write '. |
|
523 | 523 | ' in some directories.</p>'; |
524 | 524 | } |
525 | - if (! extension_loaded('gd')) { |
|
526 | - echo '<p class="alert alert-error">You don\'t have GD support enabled in your PHP installation. Please enable GD ' . |
|
525 | + if (!extension_loaded('gd')) { |
|
526 | + echo '<p class="alert alert-error">You don\'t have GD support enabled in your PHP installation. Please enable GD '. |
|
527 | 527 | 'support in your php.ini file otherwise you can\'t use Captchas for spam protection.</p>'; |
528 | 528 | } |
529 | - if (! function_exists('imagettftext')) { |
|
530 | - echo '<p class="alert alert-error">You don\'t have Freetype support enabled in the GD extension of your PHP ' . |
|
531 | - 'installation. Please enable Freetype support in GD extension otherwise the Captchas for spam ' . |
|
529 | + if (!function_exists('imagettftext')) { |
|
530 | + echo '<p class="alert alert-error">You don\'t have Freetype support enabled in the GD extension of your PHP '. |
|
531 | + 'installation. Please enable Freetype support in GD extension otherwise the Captchas for spam '. |
|
532 | 532 | 'protection will be quite easy to break.</p>'; |
533 | 533 | } |
534 | - if (! extension_loaded('curl') || ! extension_loaded('openssl')) { |
|
535 | - echo '<p class="alert alert-error">You don\'t have cURL and/or OpenSSL support enabled in your PHP installation. ' . |
|
536 | - 'Please enable cURL and/or OpenSSL support in your php.ini file otherwise you can\'t use the Twitter ' . |
|
534 | + if (!extension_loaded('curl') || !extension_loaded('openssl')) { |
|
535 | + echo '<p class="alert alert-error">You don\'t have cURL and/or OpenSSL support enabled in your PHP installation. '. |
|
536 | + 'Please enable cURL and/or OpenSSL support in your php.ini file otherwise you can\'t use the Twitter '. |
|
537 | 537 | ' support.</p>'; |
538 | 538 | } |
539 | - if (! extension_loaded('fileinfo')) { |
|
540 | - echo '<p class="alert alert-error">You don\'t have Fileinfo support enabled in your PHP installation. ' . |
|
541 | - 'Please enable Fileinfo support in your php.ini file otherwise you can\'t use our backup/restore ' . |
|
539 | + if (!extension_loaded('fileinfo')) { |
|
540 | + echo '<p class="alert alert-error">You don\'t have Fileinfo support enabled in your PHP installation. '. |
|
541 | + 'Please enable Fileinfo support in your php.ini file otherwise you can\'t use our backup/restore '. |
|
542 | 542 | 'functionality.</p>'; |
543 | 543 | } |
544 | 544 | } |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | $dbSetup['dbType'] = PMF_Filter::filterInput(INPUT_POST, 'sql_type', FILTER_SANITIZE_STRING); |
574 | 574 | if (!is_null($dbSetup['dbType'])) { |
575 | 575 | $dbSetup['dbType'] = trim($dbSetup['dbType']); |
576 | - if (! file_exists(PMF_ROOT_DIR . '/install/' . $dbSetup['dbType'] . '.sql.php')) { |
|
576 | + if (!file_exists(PMF_ROOT_DIR.'/install/'.$dbSetup['dbType'].'.sql.php')) { |
|
577 | 577 | printf( |
578 | 578 | '<p class="alert alert-error"><strong>Error:</strong> Invalid server type: %s</p>', |
579 | 579 | $dbSetup['dbType'] |
@@ -586,25 +586,25 @@ discard block |
||
586 | 586 | } |
587 | 587 | |
588 | 588 | $dbSetup['dbServer'] = PMF_Filter::filterInput(INPUT_POST, 'sql_server', FILTER_SANITIZE_STRING); |
589 | - if (is_null($dbSetup['dbServer']) && ! PMF_System::isSqlite($dbSetup['dbType'])) { |
|
589 | + if (is_null($dbSetup['dbServer']) && !PMF_System::isSqlite($dbSetup['dbType'])) { |
|
590 | 590 | echo "<p class=\"alert alert-error\"><strong>Error:</strong> Please add a database server.</p>\n"; |
591 | 591 | PMF_System::renderFooter(true); |
592 | 592 | } |
593 | 593 | |
594 | 594 | $dbSetup['dbUser'] = PMF_Filter::filterInput(INPUT_POST, 'sql_user', FILTER_SANITIZE_STRING); |
595 | - if (is_null($dbSetup['dbUser']) && ! PMF_System::isSqlite($dbSetup['dbType'])) { |
|
595 | + if (is_null($dbSetup['dbUser']) && !PMF_System::isSqlite($dbSetup['dbType'])) { |
|
596 | 596 | echo "<p class=\"alert alert-error\"><strong>Error:</strong> Please add a database username.</p>\n"; |
597 | 597 | PMF_System::renderFooter(true); |
598 | 598 | } |
599 | 599 | |
600 | 600 | $dbSetup['dbPassword'] = PMF_Filter::filterInput(INPUT_POST, 'sql_passwort', FILTER_UNSAFE_RAW); |
601 | - if (is_null($dbSetup['dbPassword']) && ! PMF_System::isSqlite($dbSetup['dbType'])) { |
|
601 | + if (is_null($dbSetup['dbPassword']) && !PMF_System::isSqlite($dbSetup['dbType'])) { |
|
602 | 602 | // Password can be empty... |
603 | 603 | $dbSetup['dbPassword'] = ''; |
604 | 604 | } |
605 | 605 | |
606 | 606 | $dbSetup['dbDatabaseName'] = PMF_Filter::filterInput(INPUT_POST, 'sql_db', FILTER_SANITIZE_STRING); |
607 | - if (is_null($dbSetup['dbDatabaseName']) && ! PMF_System::isSqlite($dbSetup['dbType'])) { |
|
607 | + if (is_null($dbSetup['dbDatabaseName']) && !PMF_System::isSqlite($dbSetup['dbType'])) { |
|
608 | 608 | echo "<p class=\"alert alert-error\"><strong>Error:</strong> Please add a database name.</p>\n"; |
609 | 609 | PMF_System::renderFooter(true); |
610 | 610 | } |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | $ldapSetup['ldapPassword'] = PMF_Filter::filterInput(INPUT_POST, 'ldap_password', FILTER_SANITIZE_STRING, ''); |
659 | 659 | |
660 | 660 | // check LDAP connection |
661 | - require PMF_ROOT_DIR . "/inc/PMF/Ldap.php"; |
|
661 | + require PMF_ROOT_DIR."/inc/PMF/Ldap.php"; |
|
662 | 662 | $ldap = new PMF_Ldap($configuration); |
663 | 663 | $ldap->connect( |
664 | 664 | $ldapSetup['ldapServer'], |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | $ldapSetup['ldapPassword'] |
669 | 669 | ); |
670 | 670 | if (!$ldap) { |
671 | - echo "<p class=\"alert alert-error\"><strong>LDAP Error:</strong> " . $ldap->error() . "</p>\n"; |
|
671 | + echo "<p class=\"alert alert-error\"><strong>LDAP Error:</strong> ".$ldap->error()."</p>\n"; |
|
672 | 672 | PMF_System::renderFooter(true); |
673 | 673 | } |
674 | 674 | } |
@@ -694,12 +694,12 @@ discard block |
||
694 | 694 | } |
695 | 695 | |
696 | 696 | if (strlen($password) <= 5 || strlen($password_retyped) <= 5) { |
697 | - echo '<p class="alert alert-error"><strong>Error:</strong> Your password and retyped password are too short.' . |
|
697 | + echo '<p class="alert alert-error"><strong>Error:</strong> Your password and retyped password are too short.'. |
|
698 | 698 | ' Please set your password and your retyped password with a minimum of 6 characters.</p>'; |
699 | 699 | PMF_System::renderFooter(true); |
700 | 700 | } |
701 | 701 | if ($password != $password_retyped) { |
702 | - echo '<p class="alert alert-error"><strong>Error:</strong> Your password and retyped password are not equal.' . |
|
702 | + echo '<p class="alert alert-error"><strong>Error:</strong> Your password and retyped password are not equal.'. |
|
703 | 703 | ' Please check your password and your retyped password.</p>'; |
704 | 704 | PMF_System::renderFooter(true); |
705 | 705 | } |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | $instanceSetup->setRootDir(PMF_ROOT_DIR); |
714 | 714 | |
715 | 715 | // Write the DB variables in database.php |
716 | - if (! $instanceSetup->createDatabaseFile($dbSetup)) { |
|
716 | + if (!$instanceSetup->createDatabaseFile($dbSetup)) { |
|
717 | 717 | echo "<p class=\"alert alert-error\"><strong>Error:</strong> Setup cannot write to ./config/database.php.</p>"; |
718 | 718 | $this->_system->cleanInstallation(); |
719 | 719 | PMF_System::renderFooter(true); |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | |
722 | 722 | // check LDAP if available |
723 | 723 | if (extension_loaded('ldap') && !is_null($ldapEnabled)) { |
724 | - if (! $instanceSetup->createLdapFile($ldapSetup, '')) { |
|
724 | + if (!$instanceSetup->createLdapFile($ldapSetup, '')) { |
|
725 | 725 | echo "<p class=\"alert alert-error\"><strong>Error:</strong> Setup cannot write to ./config/ldap.php.</p>"; |
726 | 726 | $this->_system->cleanInstallation(); |
727 | 727 | PMF_System::renderFooter(true); |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | } |
730 | 730 | |
731 | 731 | // connect to the database using config/database.php |
732 | - require PMF_ROOT_DIR . '/config/database.php'; |
|
732 | + require PMF_ROOT_DIR.'/config/database.php'; |
|
733 | 733 | $db = PMF_Db::factory($dbSetup['dbType']); |
734 | 734 | $db->connect($DB['server'], $DB['user'], $DB['password'], $DB['db']); |
735 | 735 | if (!$db) { |
@@ -738,15 +738,15 @@ discard block |
||
738 | 738 | PMF_System::renderFooter(true); |
739 | 739 | } |
740 | 740 | |
741 | - require PMF_ROOT_DIR . '/install/' . $dbSetup['dbType'] . '.sql.php'; // CREATE TABLES |
|
742 | - require PMF_ROOT_DIR . '/install/stopwords.sql.php'; // INSERTs for stopwords |
|
741 | + require PMF_ROOT_DIR.'/install/'.$dbSetup['dbType'].'.sql.php'; // CREATE TABLES |
|
742 | + require PMF_ROOT_DIR.'/install/stopwords.sql.php'; // INSERTs for stopwords |
|
743 | 743 | |
744 | 744 | $this->_system->setDatabase($db); |
745 | 745 | |
746 | 746 | echo '<p>'; |
747 | 747 | |
748 | 748 | // Erase any table before starting creating the required ones |
749 | - if (! PMF_System::isSqlite($dbSetup['dbType'])) { |
|
749 | + if (!PMF_System::isSqlite($dbSetup['dbType'])) { |
|
750 | 750 | $this->_system->dropTables($uninst); |
751 | 751 | } |
752 | 752 | |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | } |
766 | 766 | usleep(2500); |
767 | 767 | $count++; |
768 | - if (!($count % 10)) { |
|
768 | + if (!($count%10)) { |
|
769 | 769 | echo '| '; |
770 | 770 | } |
771 | 771 | } |
@@ -787,8 +787,8 @@ discard block |
||
787 | 787 | |
788 | 788 | // add admin account and rights |
789 | 789 | $admin = new PMF_User($configuration); |
790 | - if (! $admin->createUser($loginname, $password, 1)) { |
|
791 | - echo "<p class=\"alert alert-error\"><strong>Fatal installation error:</strong> " . |
|
790 | + if (!$admin->createUser($loginname, $password, 1)) { |
|
791 | + echo "<p class=\"alert alert-error\"><strong>Fatal installation error:</strong> ". |
|
792 | 792 | "Couldn't create the admin user.</p>\n"; |
793 | 793 | $this->_system->cleanInstallation(); |
794 | 794 | PMF_System::renderFooter(true); |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | $instanceData = array( |
813 | 813 | 'url' => $link->getSystemUri($_SERVER['SCRIPT_NAME']), |
814 | 814 | 'instance' => $link->getSystemRelativeUri('install/setup.php'), |
815 | - 'comment' => 'phpMyFAQ ' . PMF_System::getVersion() |
|
815 | + 'comment' => 'phpMyFAQ '.PMF_System::getVersion() |
|
816 | 816 | ); |
817 | 817 | $faqInstance = new PMF_Instance($configuration); |
818 | 818 | $faqInstance->addInstance($instanceData); |
@@ -837,7 +837,7 @@ discard block |
||
837 | 837 | echo "<p class=\"alert alert-error\">Please delete the file <em>./install/setup.php</em> manually.</p>\n"; |
838 | 838 | } |
839 | 839 | // Remove 'update.php' file |
840 | - if (@unlink(dirname($_SERVER['PATH_TRANSLATED']) . '/update.php')) { |
|
840 | + if (@unlink(dirname($_SERVER['PATH_TRANSLATED']).'/update.php')) { |
|
841 | 841 | echo "<p class=\"alert alert-success\">The file <em>./install/update.php</em> was deleted automatically.</p>\n"; |
842 | 842 | } else { |
843 | 843 | echo "<p class=\"alert alert-error\">Please delete the file <em>./install/update.php</em> manually.</p>\n"; |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | { |
854 | 854 | $q = new PMF_Questionnaire_Data($this->_mainConfig); |
855 | 855 | $options = $q->get(); |
856 | - echo '<dl>' . PHP_EOL; |
|
856 | + echo '<dl>'.PHP_EOL; |
|
857 | 857 | array_walk($options, 'data_printer'); |
858 | 858 | printf( |
859 | 859 | '</dl><input type="hidden" name="systemdata" value="%s" />', |
@@ -1,23 +1,23 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The phpMyFAQ Captcha 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_Captcha |
|
13 | - * @author Thomas Zeithaml <[email protected]> |
|
14 | - * @author Thorsten Rinne <[email protected]> |
|
15 | - * @author Matteo Scaramuccia <[email protected]> |
|
16 | - * @copyright 2006-2015 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-02-04 |
|
20 | - */ |
|
3 | + * The phpMyFAQ Captcha 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_Captcha |
|
13 | + * @author Thomas Zeithaml <[email protected]> |
|
14 | + * @author Thorsten Rinne <[email protected]> |
|
15 | + * @author Matteo Scaramuccia <[email protected]> |
|
16 | + * @copyright 2006-2015 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-02-04 |
|
20 | + */ |
|
21 | 21 | |
22 | 22 | if (!defined('IS_VALID_PHPMYFAQ')) { |
23 | 23 | exit(); |
@@ -466,10 +466,10 @@ discard block |
||
466 | 466 | } |
467 | 467 | |
468 | 468 | /** |
469 | - * Save the Captcha |
|
470 | - * |
|
471 | - * @return boolean |
|
472 | - */ |
|
469 | + * Save the Captcha |
|
470 | + * |
|
471 | + * @return boolean |
|
472 | + */ |
|
473 | 473 | private function saveCaptcha() |
474 | 474 | { |
475 | 475 | $select = sprintf(" |
@@ -479,8 +479,8 @@ discard block |
||
479 | 479 | %sfaqcaptcha |
480 | 480 | WHERE |
481 | 481 | id = '%s'", |
482 | - PMF_Db::getTablePrefix(), |
|
483 | - $this->code |
|
482 | + PMF_Db::getTablePrefix(), |
|
483 | + $this->code |
|
484 | 484 | ); |
485 | 485 | |
486 | 486 | $result = $this->_config->getDb()->query($select); |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | $captchaCode = str_replace("0", "O", $captchaCode); |
256 | 256 | } |
257 | 257 | // Sanity check |
258 | - for ($i = 0; $i < PMF_String::strlen( $captchaCode ); $i++) { |
|
258 | + for ($i = 0; $i < PMF_String::strlen($captchaCode); $i++) { |
|
259 | 259 | if (!in_array($captchaCode[$i], $this->letters)) { |
260 | 260 | return false; |
261 | 261 | } |
@@ -349,16 +349,16 @@ discard block |
||
349 | 349 | { |
350 | 350 | $len = PMF_String::strlen($this->code); |
351 | 351 | $w1 = 15; |
352 | - $w2 = $this->width / ($len + 1); |
|
352 | + $w2 = $this->width/($len + 1); |
|
353 | 353 | |
354 | 354 | for ($p = 0; $p < $len; $p++) { |
355 | 355 | $letter = $this->code[$p]; |
356 | 356 | if (count($this->fonts) > 0) { |
357 | 357 | $font = $this->fonts[rand(0, count($this->fonts) - 1)]; |
358 | 358 | } |
359 | - $size = rand(20, $this->height / 2.2); |
|
359 | + $size = rand(20, $this->height/2.2); |
|
360 | 360 | $rotation = rand(-23, 23); |
361 | - $y = rand($size + 3, $this->height-5); |
|
361 | + $y = rand($size + 3, $this->height - 5); |
|
362 | 362 | // $w1 += rand(- $this->width / 90, $this->width / 40 ); |
363 | 363 | $x = $w1 + $w2*$p; |
364 | 364 | $c1 = array(); // fore char color |
@@ -374,28 +374,28 @@ discard block |
||
374 | 374 | } while ($c1['b'] == $this->_backgroundColor['b']); |
375 | 375 | $c1 = imagecolorallocate($this->img, $c1['r'], $c1['g'], $c1['b']); |
376 | 376 | do { |
377 | - $c2['r'] = ($c1['r'] < 100 ? $c1['r'] * 2 : mt_rand(30, 199)); |
|
377 | + $c2['r'] = ($c1['r'] < 100 ? $c1['r']*2 : mt_rand(30, 199)); |
|
378 | 378 | } while (($c2['r'] == $this->_backgroundColor['r']) && ($c2['r'] == $c1['r'])); |
379 | 379 | do { |
380 | - $c2['g'] = ($c1['g'] < 100 ? $c1['g'] * 2 : mt_rand(30, 199)); |
|
380 | + $c2['g'] = ($c1['g'] < 100 ? $c1['g']*2 : mt_rand(30, 199)); |
|
381 | 381 | } while (($c2['g'] == $this->_backgroundColor['g']) && ($c2['g'] == $c1['g'])); |
382 | 382 | do { |
383 | - $c2['b'] = ($c1['b'] < 100 ? $c1['b'] * 2 : mt_rand(30, 199)); |
|
383 | + $c2['b'] = ($c1['b'] < 100 ? $c1['b']*2 : mt_rand(30, 199)); |
|
384 | 384 | } while (($c2['b'] == $this->_backgroundColor['b']) && ($c2['b'] == $c1['b'])); |
385 | 385 | $c2 = imagecolorallocate($this->img, $c2['r'], $c2['g'], $c2['b']); |
386 | 386 | // Add the letter |
387 | 387 | if (function_exists('imagettftext') && (count($this->fonts) > 0)) { |
388 | - imagettftext($this->img, $size, $rotation, $x + 2, $y, $c2, $font, $letter); |
|
388 | + imagettftext($this->img, $size, $rotation, $x + 2, $y, $c2, $font, $letter); |
|
389 | 389 | imagettftext($this->img, $size, $rotation, $x + 1, $y + 1, $c2, $font, $letter); |
390 | - imagettftext($this->img, $size, $rotation, $x, $y-2, $c1, $font, $letter); |
|
390 | + imagettftext($this->img, $size, $rotation, $x, $y - 2, $c1, $font, $letter); |
|
391 | 391 | } else { |
392 | 392 | $size = 5; |
393 | 393 | $c3 = imagecolorallocate($this->img, 0, 0, 255); |
394 | 394 | $x = 20; |
395 | 395 | $y = 12; |
396 | 396 | $s = 30; |
397 | - imagestring($this->img, $size, $x + 1 + ($s * $p), $y+1, $letter, $c3); |
|
398 | - imagestring($this->img, $size, $x + ($s * $p), $y, $letter, $c1); |
|
397 | + imagestring($this->img, $size, $x + 1 + ($s*$p), $y + 1, $letter, $c3); |
|
398 | + imagestring($this->img, $size, $x + ($s*$p), $y, $letter, $c1); |
|
399 | 399 | } |
400 | 400 | } |
401 | 401 | |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | |
456 | 456 | // Create the captcha code |
457 | 457 | for ($i = 1; $i <= $caplength; $i++) { |
458 | - $j = floor(rand(0,34)); |
|
458 | + $j = floor(rand(0, 34)); |
|
459 | 459 | $this->code .= $this->letters[$j]; |
460 | 460 | } |
461 | 461 | if (!$this->saveCaptcha()) { |
@@ -573,6 +573,6 @@ discard block |
||
573 | 573 | */ |
574 | 574 | private function getFonts() |
575 | 575 | { |
576 | - return glob(PMF_INCLUDE_DIR . '/fonts/*.ttf'); |
|
576 | + return glob(PMF_INCLUDE_DIR.'/fonts/*.ttf'); |
|
577 | 577 | } |
578 | 578 | } |
@@ -329,8 +329,7 @@ |
||
329 | 329 | if ($nextline < 1) { |
330 | 330 | $nextline = 2; |
331 | 331 | } |
332 | - } |
|
333 | - else { |
|
332 | + } else { |
|
334 | 333 | $nextline += rand(1, 7); |
335 | 334 | } |
336 | 335 | $w1 += rand(-4, 4); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * phpMyFAQ MySQL (ext/mysql) 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-06-06 |
|
18 | - */ |
|
3 | + * phpMyFAQ MySQL (ext/mysql) 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-06-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | } else { |
61 | 61 | $enableRelevance = $this->_config->get('search.enableRelevance'); |
62 | 62 | |
63 | - $columns = $this->getResultColumns(); |
|
63 | + $columns = $this->getResultColumns(); |
|
64 | 64 | $columns .= ($enableRelevance) ? $this->getMatchingColumnsAsResult($searchTerm) : ''; |
65 | - $orderBy = ($enableRelevance) ? 'ORDER BY ' . $this->getMatchingOrder() . ' DESC' : ''; |
|
65 | + $orderBy = ($enableRelevance) ? 'ORDER BY '.$this->getMatchingOrder().' DESC' : ''; |
|
66 | 66 | $chars = array( |
67 | 67 | "\xe2\x80\x98", |
68 | 68 | "\xe2\x80\x99", |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $this->_config->getDb()->escape($searchterm), |
141 | 141 | substr(strstr($matchColumn, '.'), 1)); |
142 | 142 | |
143 | - $resultColumns .= ', ' . $column; |
|
143 | + $resultColumns .= ', '.$column; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | return $resultColumns; |
@@ -160,11 +160,11 @@ discard block |
||
160 | 160 | $order = ''; |
161 | 161 | |
162 | 162 | foreach ($list as $field) { |
163 | - $string = '(rel_' . $field . '*' . $count .')'; |
|
163 | + $string = '(rel_'.$field.'*'.$count.')'; |
|
164 | 164 | if (empty($order)) { |
165 | 165 | $order .= $string; |
166 | 166 | } else { |
167 | - $order .= '+' . $string; |
|
167 | + $order .= '+'.$string; |
|
168 | 168 | } |
169 | 169 | $count--; |
170 | 170 | } |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * phpMyFAQ SQlite 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 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-12-26 |
|
18 | - */ |
|
3 | + * phpMyFAQ SQlite 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 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-12-26 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * phpMyFAQ MySQL (ext/mysqli) 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-06-06 |
|
18 | - */ |
|
3 | + * phpMyFAQ MySQL (ext/mysqli) 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-06-06 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | } else { |
61 | 61 | $enableRelevance = $this->_config->get('search.enableRelevance'); |
62 | 62 | |
63 | - $columns = $this->getResultColumns(); |
|
63 | + $columns = $this->getResultColumns(); |
|
64 | 64 | $columns .= ($enableRelevance) ? $this->getMatchingColumnsAsResult($searchTerm) : ''; |
65 | - $orderBy = ($enableRelevance) ? 'ORDER BY ' . $this->getMatchingOrder() . ' DESC' : ''; |
|
65 | + $orderBy = ($enableRelevance) ? 'ORDER BY '.$this->getMatchingOrder().' DESC' : ''; |
|
66 | 66 | $chars = array( |
67 | 67 | "\xe2\x80\x98", |
68 | 68 | "\xe2\x80\x99", |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $this->_config->getDb()->escape($searchterm), |
141 | 141 | substr(strstr($matchColumn, '.'), 1)); |
142 | 142 | |
143 | - $resultColumns .= ', ' . $column; |
|
143 | + $resultColumns .= ', '.$column; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | return $resultColumns; |
@@ -160,11 +160,11 @@ discard block |
||
160 | 160 | $order = ''; |
161 | 161 | |
162 | 162 | foreach ($list as $field) { |
163 | - $string = '(rel_' . $field . '*' . $count .')'; |
|
163 | + $string = '(rel_'.$field.'*'.$count.')'; |
|
164 | 164 | if (empty($order)) { |
165 | 165 | $order .= $string; |
166 | 166 | } else { |
167 | - $order .= '+' . $string; |
|
167 | + $order .= '+'.$string; |
|
168 | 168 | } |
169 | 169 | $count--; |
170 | 170 | } |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * phpMyFAQ SQlite 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-05 |
|
18 | - */ |
|
3 | + * phpMyFAQ SQlite 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-05 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | exit(); |