@@ -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'; |
@@ -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> |
@@ -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'; |
@@ -19,14 +19,14 @@ 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 | |
29 | -if (($permission['editbt']|| $permission['addbt']) && !PMF_Db::checkOnEmptyTable('faqcategories')) { |
|
29 | +if (($permission['editbt'] || $permission['addbt']) && !PMF_Db::checkOnEmptyTable('faqcategories')) { |
|
30 | 30 | |
31 | 31 | $category = new PMF_Category($faqConfig, array(), false); |
32 | 32 | $category->setUser($currentAdminUser); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | $faqData['id'] = PMF_Filter::filterInput(INPUT_POST, 'id', FILTER_VALIDATE_INT); |
73 | 73 | if (!is_null($faqData['id'])) { |
74 | - $queryString = 'saveentry&id=' . $faqData['id']; |
|
74 | + $queryString = 'saveentry&id='.$faqData['id']; |
|
75 | 75 | } else { |
76 | 76 | $queryString = 'insertentry'; |
77 | 77 | } |
@@ -113,14 +113,14 @@ discard block |
||
113 | 113 | $lang = PMF_Filter::filterInput(INPUT_GET, 'lang', FILTER_SANITIZE_STRING); |
114 | 114 | if ((!isset($selectedCategory) && !isset($faqData['title'])) || !is_null($id)) { |
115 | 115 | $logging = new PMF_Logging($faqConfig); |
116 | - $logging->logAdmin($user, 'Beitragedit, ' . $id); |
|
116 | + $logging->logAdmin($user, 'Beitragedit, '.$id); |
|
117 | 117 | |
118 | 118 | $categories = $category->getCategoryRelationsFromArticle($id, $lang); |
119 | 119 | |
120 | 120 | $faq->getRecord($id, null, true); |
121 | 121 | $faqData = $faq->faqRecord; |
122 | 122 | $faqData['tags'] = implode(',', $tagging->getAllTagsById($faqData['id'])); |
123 | - $queryString = 'saveentry&id=' . $faqData['id']; |
|
123 | + $queryString = 'saveentry&id='.$faqData['id']; |
|
124 | 124 | } else { |
125 | 125 | $queryString = 'insertentry'; |
126 | 126 | } |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | <?php |
329 | 329 | if (0 === $faqData['id']) { |
330 | 330 | $faqData['id'] = $faqConfig->getDb()->nextId( |
331 | - PMF_Db::getTablePrefix() . 'faqdata', |
|
331 | + PMF_Db::getTablePrefix().'faqdata', |
|
332 | 332 | 'id' |
333 | 333 | ); |
334 | 334 | } |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | <div class="control-group"> |
528 | 528 | <label class="control-label" for="active"><?php echo $PMF_LANG["ad_entry_active"]; ?></label> |
529 | 529 | <div class="controls"> |
530 | - <?php if($permission['approverec']): |
|
530 | + <?php if ($permission['approverec']): |
|
531 | 531 | if (isset($faqData['active']) && $faqData['active'] == 'yes') { |
532 | 532 | $suf = ' checked="checked"'; |
533 | 533 | $sul = null; |
@@ -547,10 +547,13 @@ discard block |
||
547 | 547 | <input type="radio" name="active" value="no"<?php if (isset($sul)) { echo $sul; } ?> /> |
548 | 548 | <?php echo $PMF_LANG['ad_gen_no']; ?> |
549 | 549 | </label> |
550 | - <?php else: ?> |
|
550 | + <?php else { |
|
551 | + : ?> |
|
551 | 552 | <label class="radio"> |
552 | 553 | <input type="radio" name="active" value="no" checked="checked" /> |
553 | - <?php echo $PMF_LANG['ad_gen_no']; ?> |
|
554 | + <?php echo $PMF_LANG['ad_gen_no']; |
|
555 | +} |
|
556 | +?> |
|
554 | 557 | </label> |
555 | 558 | <?php endif; ?> |
556 | 559 | </div> |
@@ -629,9 +632,12 @@ discard block |
||
629 | 632 | </label> |
630 | 633 | </div> |
631 | 634 | </div> |
632 | - <?php else: ?> |
|
635 | + <?php else { |
|
636 | + : ?> |
|
633 | 637 | <input type="hidden" name="grouppermission" value="all" /> |
634 | - <?php endif; ?> |
|
638 | + <?php endif; |
|
639 | +} |
|
640 | +?> |
|
635 | 641 | <div class="control-group"> |
636 | 642 | <label class="control-label" for="userpermission"><?php echo $PMF_LANG['ad_entry_userpermission']; ?></label> |
637 | 643 | <div class="controls"> |