@@ -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-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 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-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 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"> |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The main glossary index file |
|
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 2005-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 2005-09-15 |
|
18 | - */ |
|
3 | + * The main glossary index file |
|
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 2005-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 2005-09-15 |
|
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 | |
@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | $definition = PMF_Filter::filterInput(INPUT_POST, 'definition', FILTER_SANITIZE_SPECIAL_CHARS); |
48 | 48 | if ($glossary->addGlossaryItem($item, $definition)) { |
49 | 49 | echo '<p class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a>'; |
50 | - echo $PMF_LANG['ad_glossary_save_success'] . '</p>'; |
|
50 | + echo $PMF_LANG['ad_glossary_save_success'].'</p>'; |
|
51 | 51 | } else { |
52 | 52 | echo '<p class="alert alert-error"><a href="#" class="close" data-dismiss="alert">×</a>'; |
53 | 53 | echo $PMF_LANG['ad_glossary_save_error']; |
54 | 54 | echo '<br />'.$PMF_LANG["ad_adus_dberr"].'<br />'; |
55 | - echo $faqConfig->getDb()->error() . '</p>'; |
|
55 | + echo $faqConfig->getDb()->error().'</p>'; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
@@ -62,12 +62,12 @@ discard block |
||
62 | 62 | $definition = PMF_Filter::filterInput(INPUT_POST, 'definition', FILTER_SANITIZE_SPECIAL_CHARS); |
63 | 63 | if ($glossary->updateGlossaryItem($id, $item, $definition)) { |
64 | 64 | echo '<p class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a>'; |
65 | - echo $PMF_LANG['ad_glossary_update_success'] . '</p>'; |
|
65 | + echo $PMF_LANG['ad_glossary_update_success'].'</p>'; |
|
66 | 66 | } else { |
67 | 67 | echo '<p class="alert alert-error"><a href="#" class="close" data-dismiss="alert">×</a>'; |
68 | 68 | echo $PMF_LANG['ad_glossary_update_error']; |
69 | 69 | echo '<br />'.$PMF_LANG["ad_adus_dberr"].'<br />'; |
70 | - echo $faqConfig->getDb()->error() . '</p>'; |
|
70 | + echo $faqConfig->getDb()->error().'</p>'; |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | $id = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); |
76 | 76 | if ($glossary->deleteGlossaryItem($id)) { |
77 | 77 | echo '<p class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a>'; |
78 | - echo $PMF_LANG['ad_glossary_delete_success'] . '</p>'; |
|
78 | + echo $PMF_LANG['ad_glossary_delete_success'].'</p>'; |
|
79 | 79 | } else { |
80 | 80 | echo '<p class="alert alert-error"><a href="#" class="close" data-dismiss="alert">×</a>'; |
81 | 81 | echo $PMF_LANG['ad_glossary_delete_error']; |
82 | 82 | echo '<br />'.$PMF_LANG["ad_adus_dberr"].'<br />'; |
83 | - echo $faqConfig->getDb()->error() . '</p>'; |
|
83 | + echo $faqConfig->getDb()->error().'</p>'; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Displays a form to edit an existing glossary item |
|
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 2005-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 2005-09-15 |
|
18 | - */ |
|
3 | + * Displays a form to edit an existing glossary item |
|
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 2005-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 2005-09-15 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
@@ -20,10 +20,10 @@ |
||
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 |
@@ -1,22 +1,22 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Translates a category |
|
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 Rudi Ferrari <[email protected]> |
|
15 | - * @copyright 2006-2015 phpMyFAQ Team |
|
16 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | - * @link http://www.phpmyfaq.de |
|
18 | - * @since 2006-09-10 |
|
19 | - */ |
|
3 | + * Translates a category |
|
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 Rudi Ferrari <[email protected]> |
|
15 | + * @copyright 2006-2015 phpMyFAQ Team |
|
16 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
17 | + * @link http://www.phpmyfaq.de |
|
18 | + * @since 2006-09-10 |
|
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 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | <ul> |
104 | 104 | <?php |
105 | 105 | foreach ($category->getCategoryLanguagesTranslated($id) as $language => $namedesc) { |
106 | - print "<li><strong>" . $language . "</strong>: " . $namedesc . "</li>"; |
|
106 | + print "<li><strong>".$language."</strong>: ".$namedesc."</li>"; |
|
107 | 107 | } |
108 | 108 | ?> |
109 | 109 | </ul> |
@@ -59,9 +59,12 @@ |
||
59 | 59 | <input type="hidden" name="showcat" value="<?php print $showcat; ?>" /> |
60 | 60 | <?php if ($faqConfig->get('security.permLevel') !== 'basic'): ?> |
61 | 61 | <input type="hidden" name="restricted_groups" value="<?php print $group_permission[0]; ?>" /> |
62 | - <?php else: ?> |
|
62 | + <?php else { |
|
63 | + : ?> |
|
63 | 64 | <input type="hidden" name="restricted_groups" value="-1" /> |
64 | - <?php endif; ?> |
|
65 | + <?php endif; |
|
66 | +} |
|
67 | +?> |
|
65 | 68 | <input type="hidden" name="restricted_users" value="<?php print $user_permission[0]; ?>" /> |
66 | 69 | <input type="hidden" name="csrf" value="<?php print $user->getCsrfTokenFromSession(); ?>" /> |
67 | 70 |
@@ -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 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $page = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT); |
37 | 37 | $page = 1 > $page ? 1 : $page; |
38 | 38 | |
39 | -if (empty($translateLang) || !file_exists(PMF_ROOT_DIR . "/lang/language_$translateLang.php")) { |
|
39 | +if (empty($translateLang) || !file_exists(PMF_ROOT_DIR."/lang/language_$translateLang.php")) { |
|
40 | 40 | header("Location: ?action=translist"); |
41 | 41 | } |
42 | 42 | |
@@ -48,23 +48,23 @@ discard block |
||
48 | 48 | * at once, so let's paginate. |
49 | 49 | */ |
50 | 50 | $itemsPerPage = 32; |
51 | -if(!isset($_SESSION['trans'])) { |
|
51 | +if (!isset($_SESSION['trans'])) { |
|
52 | 52 | /** |
53 | 53 | * English is our exemplary language |
54 | 54 | */ |
55 | - $_SESSION['trans']['leftVarsOnly'] = $tt->getVars(PMF_ROOT_DIR . "/lang/language_en.php"); |
|
56 | - $_SESSION['trans']['rightVarsOnly'] = $tt->getVars(PMF_ROOT_DIR . "/lang/language_$translateLang.php"); |
|
55 | + $_SESSION['trans']['leftVarsOnly'] = $tt->getVars(PMF_ROOT_DIR."/lang/language_en.php"); |
|
56 | + $_SESSION['trans']['rightVarsOnly'] = $tt->getVars(PMF_ROOT_DIR."/lang/language_$translateLang.php"); |
|
57 | 57 | |
58 | 58 | } |
59 | 59 | |
60 | 60 | $leftVarsOnly = array_slice($_SESSION['trans']['leftVarsOnly'], |
61 | - ($page-1)*$itemsPerPage, |
|
61 | + ($page - 1)*$itemsPerPage, |
|
62 | 62 | $itemsPerPage); |
63 | 63 | $rightVarsOnly = &$_SESSION['trans']['rightVarsOnly']; |
64 | 64 | |
65 | 65 | |
66 | 66 | $options = array( |
67 | - 'baseUrl' => PMF_Link::getSystemRelativeUri('index.php') . '?' . str_replace('&', '&', $_SERVER['QUERY_STRING']), |
|
67 | + 'baseUrl' => PMF_Link::getSystemRelativeUri('index.php').'?'.str_replace('&', '&', $_SERVER['QUERY_STRING']), |
|
68 | 68 | 'total' => count($_SESSION['trans']['leftVarsOnly']), |
69 | 69 | 'perPage' => $itemsPerPage |
70 | 70 | ); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | <th>en</th> |
93 | 93 | <th><?php print $translateLang ?></th> |
94 | 94 | </tr> |
95 | - <?php while(list($key, $line) = each($leftVarsOnly)): ?> |
|
95 | + <?php while (list($key, $line) = each($leftVarsOnly)): ?> |
|
96 | 96 | <?php |
97 | 97 | // These parameters are not real translations, so don't offer to translate them |
98 | 98 | if ($tt->isKeyIgnorable($key)) { |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | </td> |
196 | 196 | <td> |
197 | 197 | <button class="btn btn-success" type="button" |
198 | - onclick="save()"<?php if (!is_writable(PMF_ROOT_DIR . "/lang/language_$translateLang.php")) { print ' disabled="disabled"'; } ?>> |
|
198 | + onclick="save()"<?php if (!is_writable(PMF_ROOT_DIR."/lang/language_$translateLang.php")) { print ' disabled="disabled"'; } ?>> |
|
199 | 199 | <?php print $PMF_LANG['msgSave'] ?> |
200 | 200 | </button> |
201 | 201 | </td> |
@@ -110,8 +110,9 @@ discard block |
||
110 | 110 | */ |
111 | 111 | |
112 | 112 | // We deal with the second plural form when dealing with the first, so skip it here |
113 | - if ($tt->isKeyASecondPluralForm($key)) |
|
114 | - continue; |
|
113 | + if ($tt->isKeyASecondPluralForm($key)) { |
|
114 | + continue; |
|
115 | + } |
|
115 | 116 | |
116 | 117 | if ($tt->isKeyAFirstPluralForm($key)) { |
117 | 118 | if ($rightNPlurals == -1) { |
@@ -132,10 +133,11 @@ discard block |
||
132 | 133 | print "<td>".$key."</td>\n"; |
133 | 134 | print '<td><input style="width: 300px;" type="text" value="'.PMF_String::htmlspecialchars($line).'" disabled="disabled" /></td>'."\n"; |
134 | 135 | if (array_key_exists($key, $rightVarsOnly) && ($line != $rightVarsOnly[$key] || |
135 | - $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line))) |
|
136 | - print '<td><input style="width: 300px;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key]).'" /></td>'."\n"; |
|
137 | - else |
|
138 | - print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($line).'" /></td>'."\n"; |
|
136 | + $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line))) { |
|
137 | + print '<td><input style="width: 300px;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key]).'" /></td>'."\n"; |
|
138 | + } else { |
|
139 | + print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($line).'" /></td>'."\n"; |
|
140 | + } |
|
139 | 141 | print "</tr>\n"; |
140 | 142 | |
141 | 143 | // Add second English form and translation |
@@ -147,10 +149,11 @@ discard block |
||
147 | 149 | // Other language has only one form |
148 | 150 | print '<td><input style="width: 300px;" type="text" value="'.$PMF_LANG['msgTransToolLanguageOnePlural'].'" disabled="disabled" /></td>'."\n"; |
149 | 151 | } else { |
150 | - if (array_key_exists($key2, $rightVarsOnly)) |
|
151 | - print '<td><input style="width: 300px;" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key2]).'" /></td>'."\n"; |
|
152 | - else |
|
153 | - print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n"; |
|
152 | + if (array_key_exists($key2, $rightVarsOnly)) { |
|
153 | + print '<td><input style="width: 300px;" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key2]).'" /></td>'."\n"; |
|
154 | + } else { |
|
155 | + print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n"; |
|
156 | + } |
|
154 | 157 | } |
155 | 158 | print "</tr>\n"; |
156 | 159 | |
@@ -160,10 +163,11 @@ discard block |
||
160 | 163 | print "<tr>\n"; |
161 | 164 | print "<td>".$keyI."</td>\n"; |
162 | 165 | print '<td><input style="width: 300px;" type="text" value="" disabled="disabled" /></td>'."\n"; |
163 | - if (array_key_exists($keyI, $rightVarsOnly) && $leftVarsOnly[$key2] != $rightVarsOnly[$key]) |
|
164 | - print '<td><input style="width: 300px;" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$keyI]).'" /></td>'."\n"; |
|
165 | - else |
|
166 | - print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n"; |
|
166 | + if (array_key_exists($keyI, $rightVarsOnly) && $leftVarsOnly[$key2] != $rightVarsOnly[$key]) { |
|
167 | + print '<td><input style="width: 300px;" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$keyI]).'" /></td>'."\n"; |
|
168 | + } else { |
|
169 | + print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n"; |
|
170 | + } |
|
167 | 171 | print "</tr>\n"; |
168 | 172 | } |
169 | 173 | // We do not need to process this $key any further |
@@ -178,9 +182,12 @@ discard block |
||
178 | 182 | $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line))): |
179 | 183 | ?> |
180 | 184 | <td><input style="width: 300px;" type="text" name="<?php print $key?>" value="<?php print PMF_String::htmlspecialchars($rightVarsOnly[$key]) ?>" /></td> |
181 | - <?php else: ?> |
|
185 | + <?php else { |
|
186 | + : ?> |
|
182 | 187 | <td><input style="width: 300px;border-color: red;" type="text" name="<?php print $key?>" value="<?php print PMF_String::htmlspecialchars($line) ?>" /></td> |
183 | - <?php endif; ?> |
|
188 | + <?php endif; |
|
189 | +} |
|
190 | +?> |
|
184 | 191 | </tr> |
185 | 192 | <?php endwhile; ?> |
186 | 193 | <tr> |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Handle ajax requests for the interface translation tool |
|
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 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-05-11 |
|
18 | - */ |
|
3 | + * Handle ajax requests for the interface translation tool |
|
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 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-05-11 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | $leftVarsOnly = array_slice($_SESSION['trans']['leftVarsOnly'], |
61 | - ($page-1)*$itemsPerPage, |
|
62 | - $itemsPerPage); |
|
61 | + ($page-1)*$itemsPerPage, |
|
62 | + $itemsPerPage); |
|
63 | 63 | $rightVarsOnly = &$_SESSION['trans']['rightVarsOnly']; |
64 | 64 | |
65 | 65 |
@@ -1,21 +1,21 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * List all categories in the admin section |
|
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-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 2003-12-20 |
|
18 | - */ |
|
3 | + * List all categories in the admin section |
|
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-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 2003-12-20 |
|
18 | + */ |
|
19 | 19 | |
20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
21 | 21 | $protocol = 'http'; |
@@ -310,20 +310,20 @@ discard block |
||
310 | 310 | } |
311 | 311 | |
312 | 312 | if ($cat["lang"] == $lang) { |
313 | - // add sub category (if current language) |
|
314 | - printf(' |
|
313 | + // add sub category (if current language) |
|
314 | + printf(' |
|
315 | 315 | <a class="btn btn-info btn-mini" href="?action=addcategory&cat=%s&lang=%s"><span title="%s" class="icon-plus-sign icon-white"></span></a> ', |
316 | - $cat['id'], |
|
317 | - $cat['lang'], |
|
318 | - $PMF_LANG['ad_quick_category'] |
|
319 | - ); |
|
316 | + $cat['id'], |
|
317 | + $cat['lang'], |
|
318 | + $PMF_LANG['ad_quick_category'] |
|
319 | + ); |
|
320 | 320 | |
321 | - // rename (sub) category (if current language) |
|
322 | - printf(' |
|
321 | + // rename (sub) category (if current language) |
|
322 | + printf(' |
|
323 | 323 | <a class="btn btn-info btn-mini" href="?action=editcategory&cat=%s"><span title="%s" class="icon-edit icon-white"></a> ', |
324 | - $cat['id'], |
|
325 | - $PMF_LANG['ad_kateg_rename'] |
|
326 | - ); |
|
324 | + $cat['id'], |
|
325 | + $PMF_LANG['ad_kateg_rename'] |
|
326 | + ); |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | // translate category (always) |
@@ -346,22 +346,22 @@ discard block |
||
346 | 346 | } |
347 | 347 | |
348 | 348 | if ($cat["lang"] == $lang) { |
349 | - // cut category (if current language) |
|
350 | - printf( |
|
351 | - '<a class="btn btn-warning btn-mini" href="?action=cutcategory&cat=%s"><span title="%s" class="icon-cut icon-white"></a> ', |
|
352 | - $cat['id'], |
|
353 | - $PMF_LANG['ad_categ_cut'] |
|
354 | - ); |
|
355 | - |
|
356 | - if ($category->numParent($cat['parent_id']) > 1) { |
|
357 | - // move category (if current language) AND more than 1 category at the same level) |
|
358 | - printf( |
|
359 | - '<a class="btn btn-warning btn-mini" href="?action=movecategory&cat=%s&parent_id=%s"><span title="%s" class="icon-resize-vertical icon-white"></a> ', |
|
360 | - $cat['id'], |
|
361 | - $cat['parent_id'], |
|
362 | - $PMF_LANG['ad_categ_move'] |
|
363 | - ); |
|
364 | - } |
|
349 | + // cut category (if current language) |
|
350 | + printf( |
|
351 | + '<a class="btn btn-warning btn-mini" href="?action=cutcategory&cat=%s"><span title="%s" class="icon-cut icon-white"></a> ', |
|
352 | + $cat['id'], |
|
353 | + $PMF_LANG['ad_categ_cut'] |
|
354 | + ); |
|
355 | + |
|
356 | + if ($category->numParent($cat['parent_id']) > 1) { |
|
357 | + // move category (if current language) AND more than 1 category at the same level) |
|
358 | + printf( |
|
359 | + '<a class="btn btn-warning btn-mini" href="?action=movecategory&cat=%s&parent_id=%s"><span title="%s" class="icon-resize-vertical icon-white"></a> ', |
|
360 | + $cat['id'], |
|
361 | + $cat['parent_id'], |
|
362 | + $PMF_LANG['ad_categ_move'] |
|
363 | + ); |
|
364 | + } |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | $open = $level; |
@@ -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 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | <i class="icon-plus icon-white"></i> <?php print $PMF_LANG['ad_kateg_add']; ?> |
36 | 36 | </a> |
37 | 37 | <a class="btn btn-info" href="?action=showcategory"> |
38 | - <i class="icon-th icon-white"></i> <?php print $PMF_LANG['ad_categ_show'];?> |
|
38 | + <i class="icon-th icon-white"></i> <?php print $PMF_LANG['ad_categ_show']; ?> |
|
39 | 39 | </a> |
40 | 40 | </div> |
41 | 41 | </h2> |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | if ($cat['lang'] == $lang) { |
268 | 268 | $categoryName = $cat['name']; |
269 | 269 | } else { |
270 | - $categoryName = $cat['name'] . ' (' . $languageCodes[strtoupper($cat['lang'])] . ')'; |
|
270 | + $categoryName = $cat['name'].' ('.$languageCodes[strtoupper($cat['lang'])].')'; |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | $level = $cat['indent']; |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The main multi-site instances 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 | - * @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-16 |
|
18 | - */ |
|
3 | + * The main multi-site instances 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 | + * @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-16 |
|
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 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | <header> |
31 | 31 | <h2> |
32 | 32 | <i class="icon-wrench"></i> <?php print $PMF_LANG['ad_menu_instances']; ?> |
33 | - <?php if ($permission['addinstances'] && is_writable(PMF_ROOT_DIR . DIRECTORY_SEPARATOR . 'multisite')): ?> |
|
33 | + <?php if ($permission['addinstances'] && is_writable(PMF_ROOT_DIR.DIRECTORY_SEPARATOR.'multisite')): ?> |
|
34 | 34 | <div class="pull-right"> |
35 | 35 | <a class="btn btn-success" data-toggle="modal" href="#pmf-modal-add-instance"> |
36 | 36 | <i class="icon-plus"></i> <?php echo $PMF_LANG["ad_instance_add"] ?> |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $instanceId = PMF_Filter::filterInput(INPUT_POST, 'instance_id', FILTER_VALIDATE_INT); |
47 | 47 | |
48 | 48 | // Check, if /multisite is writeable |
49 | - if (! is_writable(PMF_ROOT_DIR . DIRECTORY_SEPARATOR . 'multisite')) { |
|
49 | + if (!is_writable(PMF_ROOT_DIR.DIRECTORY_SEPARATOR.'multisite')) { |
|
50 | 50 | printf( |
51 | 51 | '<p class="alert alert-error">%s</p>', |
52 | 52 | $PMF_LANG["ad_instance_error_notwritable"] |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ?> |
99 | 99 | <tr id="row-instance-<?php print $site->id ?>"> |
100 | 100 | <td><?php print $site->id ?></td> |
101 | - <td><a href="<?php print $site->url . $site->instance ?>"><?php print $site->url ?></a></td> |
|
101 | + <td><a href="<?php print $site->url.$site->instance ?>"><?php print $site->url ?></a></td> |
|
102 | 102 | <td><?php print $site->instance ?></td> |
103 | 103 | <td><?php print $site->comment ?></td> |
104 | 104 | <td> |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * AJAX: handling of Ajax user calls |
|
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 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-04 |
|
18 | - */ |
|
3 | + * AJAX: handling of Ajax user calls |
|
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 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-04 |
|
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 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $user->getUserById($userId, true); |
78 | 78 | if ($user->getStatus() == 'protected' || $userId == 1) { |
79 | - $message = '<p class="error">' . $PMF_LANG['ad_user_error_protectedAccount'] . '</p>'; |
|
79 | + $message = '<p class="error">'.$PMF_LANG['ad_user_error_protectedAccount'].'</p>'; |
|
80 | 80 | } else { |
81 | 81 | if (!$user->deleteUser()) { |
82 | 82 | $message = $PMF_LANG['ad_user_error_delete']; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $permissions->removeFromAllGroups($userId); |
91 | 91 | } |
92 | 92 | |
93 | - $message = '<p class="success">' . $PMF_LANG['ad_user_deleted'] . '</p>'; |
|
93 | + $message = '<p class="success">'.$PMF_LANG['ad_user_deleted'].'</p>'; |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 | print json_encode($message); |