@@ -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 | |
@@ -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 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Displays a form to add a 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 add a 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'; |
@@ -19,10 +19,10 @@ |
||
| 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 | |
@@ -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: handles an attachment with the given id |
|
| 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 2010-2015 phpMyFAQ Team |
|
| 15 | - * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 16 | - * @link http://www.phpmyfaq.de |
|
| 17 | - * @since 2010-12-20 |
|
| 18 | - */ |
|
| 3 | + * AJAX: handles an attachment with the given id |
|
| 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 2010-2015 phpMyFAQ Team |
|
| 15 | + * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 |
|
| 16 | + * @link http://www.phpmyfaq.de |
|
| 17 | + * @since 2010-12-20 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | $protocol = 'http'; |
@@ -19,10 +19,10 @@ |
||
| 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 | |
@@ -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); |
@@ -19,10 +19,10 @@ |
||
| 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 | |
@@ -56,10 +56,10 @@ |
||
| 56 | 56 | <select name="change" size="1"> |
| 57 | 57 | <?php |
| 58 | 58 | foreach ($category->categories as $cat) { |
| 59 | - if ($id != $cat["id"]) { |
|
| 60 | - printf("<option value=\"%s\">%s</option>", $cat['id'], $cat['name']); |
|
| 61 | - } |
|
| 62 | - } |
|
| 59 | + if ($id != $cat["id"]) { |
|
| 60 | + printf("<option value=\"%s\">%s</option>", $cat['id'], $cat['name']); |
|
| 61 | + } |
|
| 62 | + } |
|
| 63 | 63 | ?> |
| 64 | 64 | </select> |
| 65 | 65 | <?php printf('<p class="help-block">%s</p>', $PMF_LANG['ad_categ_remark_move']); ?> |
@@ -19,10 +19,10 @@ |
||
| 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 | |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Form to change password of the current user |
|
| 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-02-23 |
|
| 18 | - */ |
|
| 3 | + * Form to change password of the current user |
|
| 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-02-23 |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 21 | 21 | $protocol = 'http'; |
@@ -19,10 +19,10 @@ |
||
| 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 | |