@@ -20,10 +20,10 @@ discard block |
||
| 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 | |
@@ -48,18 +48,18 @@ discard block |
||
| 48 | 48 | <thead> |
| 49 | 49 | <tr> |
| 50 | 50 | <?php |
| 51 | - ($useCategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_category']) : ''; |
|
| 52 | - ($useSubcategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sub_category']) : ''; |
|
| 53 | - ($useTranslation) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_translations']) : ''; |
|
| 54 | - ($useLanguage) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_language']) : ''; |
|
| 55 | - ($useId) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_id']) : ''; |
|
| 56 | - ($useSticky) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sticky']) : ''; |
|
| 57 | - ($useTitle) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_title']) : ''; |
|
| 51 | + ($useCategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_category']) : ''; |
|
| 52 | + ($useSubcategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sub_category']) : ''; |
|
| 53 | + ($useTranslation) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_translations']) : ''; |
|
| 54 | + ($useLanguage) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_language']) : ''; |
|
| 55 | + ($useId) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_id']) : ''; |
|
| 56 | + ($useSticky) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sticky']) : ''; |
|
| 57 | + ($useTitle) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_title']) : ''; |
|
| 58 | 58 | ($useCreationDate) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_creation_date']) : ''; |
| 59 | - ($useOwner) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_owner']) : ''; |
|
| 59 | + ($useOwner) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_owner']) : ''; |
|
| 60 | 60 | ($useLastModified) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_last_modified_person']) : ''; |
| 61 | - ($useUrl) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_url']) : ''; |
|
| 62 | - ($useVisits) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_visits']) : ''; |
|
| 61 | + ($useUrl) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_url']) : ''; |
|
| 62 | + ($useVisits) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_visits']) : ''; |
|
| 63 | 63 | ?> |
| 64 | 64 | </tr> |
| 65 | 65 | </thead> |
@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * View a generated report |
|
| 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 Administration |
|
| 13 | - * @author Gustavo Solt <[email protected]> |
|
| 14 | - * @author Thorsten Rinne <[email protected]> |
|
| 15 | - * @copyright 2011-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 2011-01-12 |
|
| 19 | - */ |
|
| 3 | + * View a generated report |
|
| 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 Administration |
|
| 13 | + * @author Gustavo Solt <[email protected]> |
|
| 14 | + * @author Thorsten Rinne <[email protected]> |
|
| 15 | + * @copyright 2011-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 2011-01-12 |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | $protocol = 'http'; |
@@ -20,10 +20,10 @@ discard block |
||
| 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 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - if (! is_null($editData)) { |
|
| 79 | + if (!is_null($editData)) { |
|
| 80 | 80 | $faqConfig->update($newConfigValues); |
| 81 | 81 | } |
| 82 | 82 | } |
@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The main configuration frontend |
|
| 4 | - * |
|
| 5 | - * PHP 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 Administration |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | - * @copyright 2005-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 2005-12-26 |
|
| 19 | - */ |
|
| 3 | + * The main configuration frontend |
|
| 4 | + * |
|
| 5 | + * PHP 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 Administration |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 15 | + * @copyright 2005-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 2005-12-26 |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | $protocol = 'http'; |
@@ -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 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | if (isset($_FILES['userfile']) && 0 == $_FILES['userfile']['error']) { |
| 45 | 45 | |
| 46 | - $ok = 1; |
|
| 46 | + $ok = 1; |
|
| 47 | 47 | $finfo = new finfo(FILEINFO_MIME_ENCODING); |
| 48 | 48 | if ('utf-8' == $finfo->file($_FILES['userfile']['tmp_name'])) { |
| 49 | 49 | print 'This file is not UTF_8 encoded.'; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $handle = fopen($_FILES['userfile']['tmp_name'], 'r'); |
| 53 | 53 | $dat = fgets($handle, 65536); |
| 54 | 54 | $versionFound = PMF_String::substr($dat, 0, 9); |
| 55 | - $versionExpected = '-- pmf' . substr($faqConfig->get('main.currentVersion'), 0, 3); |
|
| 55 | + $versionExpected = '-- pmf'.substr($faqConfig->get('main.currentVersion'), 0, 3); |
|
| 56 | 56 | |
| 57 | 57 | if ($versionFound !== $versionExpected) { |
| 58 | 58 | printf('%s (Version check failure: "%s" found, "%s" expected)', |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | if (PMF_String::substr($dat, 0, $backup_prefix_pattern_len) == $backup_prefix_pattern) { |
| 83 | 83 | $table_prefix = trim(PMF_String::substr($dat, $backup_prefix_pattern_len)); |
| 84 | 84 | } |
| 85 | - if ( (PMF_String::substr($dat, 0, 2) != '--') && ($dat != '') ) { |
|
| 85 | + if ((PMF_String::substr($dat, 0, 2) != '--') && ($dat != '')) { |
|
| 86 | 86 | $mquery[] = trim(PMF_String::substr($dat, 0, -1)); |
| 87 | 87 | } |
| 88 | 88 | } |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The import function to import the phpMyFAQ backups |
|
| 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 Administration |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @copyright 2003-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 2003-02-24 |
|
| 18 | - */ |
|
| 3 | + * The import function to import the phpMyFAQ backups |
|
| 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 Administration |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @copyright 2003-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 2003-02-24 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | $protocol = 'http'; |
@@ -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 | |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | <ul class="nav pull-right"> |
| 258 | 258 | <li class="dropdown"> |
| 259 | 259 | <a class="dropdown-toggle" data-toggle="dropdown" href="#"> |
| 260 | - <span title="<?php echo $PMF_LANG['ad_user_loggedin'] . $user->getLogin(); ?>"> |
|
| 260 | + <span title="<?php echo $PMF_LANG['ad_user_loggedin'].$user->getLogin(); ?>"> |
|
| 261 | 261 | <?php echo $user->getUserData('display_name'); ?> |
| 262 | 262 | </span> |
| 263 | 263 | <b class="caret"></b> |
@@ -277,9 +277,12 @@ |
||
| 277 | 277 | </ul> |
| 278 | 278 | </li> |
| 279 | 279 | </ul> |
| 280 | - <?php else: ?> |
|
| 280 | + <?php else { |
|
| 281 | + : ?> |
|
| 281 | 282 | <ul class="nav"> |
| 282 | - <li><a href="../index.php?action=password"><?php echo $PMF_LANG["lostPassword"]; ?></a></li> |
|
| 283 | + <li><a href="../index.php?action=password"><?php echo $PMF_LANG["lostPassword"]; |
|
| 284 | +} |
|
| 285 | +?></a></li> |
|
| 283 | 286 | </ul> |
| 284 | 287 | <?php endif; ?> |
| 285 | 288 | </div> |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Header of the admin area |
|
| 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 Administraion |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @copyright 2003-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 2003-02-26 |
|
| 18 | - */ |
|
| 3 | + * Header of the admin area |
|
| 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 Administraion |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @copyright 2003-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 2003-02-26 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | $protocol = 'http'; |
@@ -20,10 +20,10 @@ discard block |
||
| 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 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | $groupAction = 'add'; |
| 223 | 223 | $message = '<p class="alert alert-error">'; |
| 224 | 224 | foreach ($messages as $err) { |
| 225 | - $message .= $err . '<br />'; |
|
| 225 | + $message .= $err.'<br />'; |
|
| 226 | 226 | } |
| 227 | 227 | $message .= '</p>'; |
| 228 | 228 | } |
@@ -210,8 +210,9 @@ discard block |
||
| 210 | 210 | 'auto_join' => $group_auto_join |
| 211 | 211 | ); |
| 212 | 212 | |
| 213 | - if ($user->perm->addGroup($group_data) <= 0) |
|
| 214 | - $messages[] = $PMF_LANG['ad_adus_dberr']; |
|
| 213 | + if ($user->perm->addGroup($group_data) <= 0) { |
|
| 214 | + $messages[] = $PMF_LANG['ad_adus_dberr']; |
|
| 215 | + } |
|
| 215 | 216 | } |
| 216 | 217 | // no errors, show list |
| 217 | 218 | if (count($messages) == 0) { |
@@ -228,8 +229,9 @@ discard block |
||
| 228 | 229 | } |
| 229 | 230 | } |
| 230 | 231 | |
| 231 | -if (!isset($message)) |
|
| 232 | +if (!isset($message)) { |
|
| 232 | 233 | $message = ''; |
| 234 | +} |
|
| 233 | 235 | |
| 234 | 236 | // show new group form |
| 235 | 237 | if ($groupAction == 'add' && $permission['addgroup']) { |
@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Displays the group management frontend |
|
| 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 Administration |
|
| 13 | - * @author Lars Tiedemann <[email protected]> |
|
| 14 | - * @author Thorsten Rinne <[email protected]> |
|
| 15 | - * @copyright 2005-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 2005-12-15 |
|
| 19 | - */ |
|
| 3 | + * Displays the group management frontend |
|
| 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 Administration |
|
| 13 | + * @author Lars Tiedemann <[email protected]> |
|
| 14 | + * @author Thorsten Rinne <[email protected]> |
|
| 15 | + * @copyright 2005-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 2005-12-15 |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | $protocol = 'http'; |
@@ -20,14 +20,14 @@ discard block |
||
| 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 | |
| 30 | -if ($permission['editbt']|| $permission['addbt']) { |
|
| 30 | +if ($permission['editbt'] || $permission['addbt']) { |
|
| 31 | 31 | |
| 32 | 32 | // FAQ data |
| 33 | 33 | $dateStart = PMF_Filter::filterInput(INPUT_POST, 'dateStart', FILTER_SANITIZE_STRING); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $category->setGroups($currentAdminGroups); |
| 107 | 107 | $tagging = new PMF_Tags($faqConfig); |
| 108 | 108 | |
| 109 | - $recordData = array( |
|
| 109 | + $recordData = array( |
|
| 110 | 110 | 'lang' => $recordLang, |
| 111 | 111 | 'active' => $active, |
| 112 | 112 | 'sticky' => (!is_null($sticky) ? 1 : 0), |
@@ -117,8 +117,8 @@ discard block |
||
| 117 | 117 | 'email' => $email, |
| 118 | 118 | 'comment' => (!is_null($comment) ? 'y' : 'n'), |
| 119 | 119 | 'date' => date('YmdHis'), |
| 120 | - 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000'), |
|
| 121 | - 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959'), |
|
| 120 | + 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart).'000000'), |
|
| 121 | + 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd).'235959'), |
|
| 122 | 122 | 'linkState' => '', |
| 123 | 123 | 'linkDateCheck' => 0 |
| 124 | 124 | ); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $faq->updateQuestionAnswer($openQuestionId, $recordId, $categories['rubrik'][0]); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - $url = sprintf( |
|
| 165 | + $url = sprintf( |
|
| 166 | 166 | '%s?action=artikel&cat=%d&id=%d&artlang=%s', |
| 167 | 167 | $faqConfig->get('main.referenceURL'), |
| 168 | 168 | $categories['rubrik'][0], |
@@ -194,14 +194,14 @@ discard block |
||
| 194 | 194 | $faqConfig->get('socialnetworks.twitterAccessTokenSecret') |
| 195 | 195 | ); |
| 196 | 196 | |
| 197 | - $link = PMF_Link::getSystemRelativeUri() . |
|
| 197 | + $link = PMF_Link::getSystemRelativeUri(). |
|
| 198 | 198 | sprintf( |
| 199 | 199 | '?action=artikel&cat=%d&id=%d&artlang=%s', |
| 200 | 200 | $category, |
| 201 | 201 | $recordId, |
| 202 | 202 | $recordLang |
| 203 | 203 | ); |
| 204 | - $link = $faqConfig->get('main.referenceURL') . str_replace('/admin/','/', $link); |
|
| 204 | + $link = $faqConfig->get('main.referenceURL').str_replace('/admin/', '/', $link); |
|
| 205 | 205 | $oLink = new PMF_Link($link, $faqConfig); |
| 206 | 206 | $oLink->itemTitle = $question; |
| 207 | 207 | $link = $oLink->toString(); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | } else { |
| 228 | 228 | printf( |
| 229 | 229 | '<p class="alert alert-error">%s</p>', |
| 230 | - $PMF_LANG['ad_entry_savedfail'] . $faqConfig->getDb()->error() |
|
| 230 | + $PMF_LANG['ad_entry_savedfail'].$faqConfig->getDb()->error() |
|
| 231 | 231 | ); |
| 232 | 232 | } |
| 233 | 233 | |
@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Adds a record in the database, handles the preview and checks for missing |
|
| 4 | - * category entries. |
|
| 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 Administration |
|
| 14 | - * @author Thorsten Rinne <[email protected]> |
|
| 15 | - * @copyright 2003-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 2003-02-23 |
|
| 19 | - */ |
|
| 3 | + * Adds a record in the database, handles the preview and checks for missing |
|
| 4 | + * category entries. |
|
| 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 Administration |
|
| 14 | + * @author Thorsten Rinne <[email protected]> |
|
| 15 | + * @copyright 2003-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 2003-02-23 |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | $protocol = 'http'; |
@@ -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 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | if (!is_null($question) && !is_null($categories)) { |
| 110 | 110 | // Save entry |
| 111 | 111 | $logging = new PMF_Logging($faqConfig); |
| 112 | - $logging->logAdmin($user, 'Beitragsave ' . $recordId); |
|
| 112 | + $logging->logAdmin($user, 'Beitragsave '.$recordId); |
|
| 113 | 113 | |
| 114 | 114 | printf( |
| 115 | 115 | '<header><h2><i class="icon-pencil"></i> %s</h2></header>', |
@@ -137,8 +137,8 @@ discard block |
||
| 137 | 137 | 'email' => $email, |
| 138 | 138 | 'comment' => (!is_null($comment) ? 'y' : 'n'), |
| 139 | 139 | 'date' => empty($date) ? date('YmdHis') : str_replace(array('-', ':', ' '), '', $date), |
| 140 | - 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000'), |
|
| 141 | - 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959'), |
|
| 140 | + 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart).'000000'), |
|
| 141 | + 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd).'235959'), |
|
| 142 | 142 | 'linkState' => '', |
| 143 | 143 | 'linkDateCheck' => 0); |
| 144 | 144 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } else { |
| 163 | 163 | printf( |
| 164 | 164 | '<p class="alert alert-error">%s</p>', |
| 165 | - print $PMF_LANG['ad_entry_savedfail'] . $faqConfig->getDb()->error() |
|
| 165 | + print $PMF_LANG['ad_entry_savedfail'].$faqConfig->getDb()->error() |
|
| 166 | 166 | ); |
| 167 | 167 | } |
| 168 | 168 | |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Save an existing FAQ record. |
|
| 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 Administration |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @copyright 2003-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 2003-02-23 |
|
| 18 | - */ |
|
| 3 | + * Save an existing FAQ record. |
|
| 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 Administration |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @copyright 2003-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 2003-02-23 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | $protocol = 'http'; |
@@ -20,10 +20,10 @@ discard block |
||
| 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 | |
@@ -53,23 +53,23 @@ discard block |
||
| 53 | 53 | </div> |
| 54 | 54 | <div class="dashboard-stat span2"> |
| 55 | 55 | <span><a href="?action=view"><?php echo $PMF_LANG["ad_start_articles"]; ?></a></span> |
| 56 | - <?php echo $faqTableInfo[PMF_Db::getTablePrefix() . "faqdata"]; ?> |
|
| 56 | + <?php echo $faqTableInfo[PMF_Db::getTablePrefix()."faqdata"]; ?> |
|
| 57 | 57 | </div> |
| 58 | 58 | <div class="dashboard-stat span2"> |
| 59 | 59 | <span><a href="?action=comments"><?php echo $PMF_LANG["ad_start_comments"]; ?></a></span> |
| 60 | - <?php echo $faqTableInfo[PMF_Db::getTablePrefix() . "faqcomments"]; ?> |
|
| 60 | + <?php echo $faqTableInfo[PMF_Db::getTablePrefix()."faqcomments"]; ?> |
|
| 61 | 61 | </div> |
| 62 | 62 | <div class="dashboard-stat span2"> |
| 63 | 63 | <span><a href="?action=question"><?php echo $PMF_LANG["msgOpenQuestions"]; ?></a></span> |
| 64 | - <?php echo $faqTableInfo[PMF_Db::getTablePrefix() . "faqquestions"]; ?> |
|
| 64 | + <?php echo $faqTableInfo[PMF_Db::getTablePrefix()."faqquestions"]; ?> |
|
| 65 | 65 | </div> |
| 66 | 66 | <div class="dashboard-stat span2"> |
| 67 | 67 | <span><a href="?action=news"><?php echo $PMF_LANG["msgNews"]; ?></a></span> |
| 68 | - <?php echo $faqTableInfo[PMF_Db::getTablePrefix() . "faqnews"]; ?> |
|
| 68 | + <?php echo $faqTableInfo[PMF_Db::getTablePrefix()."faqnews"]; ?> |
|
| 69 | 69 | </div> |
| 70 | 70 | <div class="dashboard-stat span2"> |
| 71 | 71 | <span><a href="?action=user&user_action=listallusers"><?php echo $PMF_LANG['admin_mainmenu_users']; ?></a></span> |
| 72 | - <?php echo $faqTableInfo[PMF_Db::getTablePrefix() . 'faquser'] - 1; ?> |
|
| 72 | + <?php echo $faqTableInfo[PMF_Db::getTablePrefix().'faquser'] - 1; ?> |
|
| 73 | 73 | </div> |
| 74 | 74 | </section> |
| 75 | 75 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | ); |
| 127 | 127 | // Installed phpMyFAQ version is outdated |
| 128 | 128 | if (-1 == version_compare($installed, $available)) { |
| 129 | - print '<br />' . $PMF_LANG['ad_you_should_update']; |
|
| 129 | + print '<br />'.$PMF_LANG['ad_you_should_update']; |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | } else { |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $faqSystem = new PMF_System(); |
| 156 | 156 | $localHashes = $faqSystem->createHashes(); |
| 157 | 157 | $remoteHashes = file_get_contents( |
| 158 | - 'http://api.phpmyfaq.de/verify/' . $faqConfig->get('main.currentVersion') |
|
| 158 | + 'http://api.phpmyfaq.de/verify/'.$faqConfig->get('main.currentVersion') |
|
| 159 | 159 | ); |
| 160 | 160 | |
| 161 | 161 | if (!is_array(json_decode($remoteHashes, true))) { |
@@ -37,8 +37,11 @@ |
||
| 37 | 37 | <a href="?action=config"> |
| 38 | 38 | <?php if ($faqConfig->get('main.maintenanceMode')): ?> |
| 39 | 39 | <span class="label label-important"><?php print $PMF_LANG['msgMaintenanceMode']; ?></span> |
| 40 | - <?php else: ?> |
|
| 41 | - <span class="label label-success"><?php print $PMF_LANG['msgOnlineMode']; ?></span> |
|
| 40 | + <?php else { |
|
| 41 | + : ?> |
|
| 42 | + <span class="label label-success"><?php print $PMF_LANG['msgOnlineMode']; |
|
| 43 | +} |
|
| 44 | +?></span> |
|
| 42 | 45 | <?php endif; ?> |
| 43 | 46 | </a> |
| 44 | 47 | </div> |
@@ -1,22 +1,22 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * The start page with some information about the FAQ |
|
| 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 Administration |
|
| 13 | - * @author Thorsten Rinne <[email protected]> |
|
| 14 | - * @author Alexander M. Turek <[email protected]> |
|
| 15 | - * @copyright 2005-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 2013-02-05 |
|
| 19 | - */ |
|
| 3 | + * The start page with some information about the FAQ |
|
| 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 Administration |
|
| 13 | + * @author Thorsten Rinne <[email protected]> |
|
| 14 | + * @author Alexander M. Turek <[email protected]> |
|
| 15 | + * @copyright 2005-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 2013-02-05 |
|
| 19 | + */ |
|
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | $protocol = 'http'; |
@@ -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 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $oTag = new PMF_Tags($faqConfig); |
| 35 | 35 | $autoCompleteValue = PMF_Filter::filterInput(INPUT_GET, 'q', FILTER_SANITIZE_STRIPPED); |
| 36 | -if (! is_null($autoCompleteValue)) { |
|
| 36 | +if (!is_null($autoCompleteValue)) { |
|
| 37 | 37 | if (strpos($autoCompleteValue, ',')) { |
| 38 | 38 | $arrayOfValues = explode(',', $autoCompleteValue); |
| 39 | 39 | $autoCompleteValue = end($arrayOfValues); |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * AJAX: Search for tags |
|
| 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 Ajax |
|
| 13 | - * @author Matteo Scaramuccia <[email protected]> |
|
| 14 | - * @copyright 2005-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 2005-12-15 |
|
| 18 | - */ |
|
| 3 | + * AJAX: Search for tags |
|
| 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 Ajax |
|
| 13 | + * @author Matteo Scaramuccia <[email protected]> |
|
| 14 | + * @copyright 2005-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 2005-12-15 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | $protocol = 'http'; |