@@ -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 | |
@@ -77,17 +77,17 @@ discard block |
||
| 77 | 77 | <td><?php echo $data['usr']; ?></td> |
| 78 | 78 | <td> |
| 79 | 79 | <?php |
| 80 | - if (round($data['num'] * 20) > 75) { |
|
| 80 | + if (round($data['num']*20) > 75) { |
|
| 81 | 81 | $progressBar = 'success'; |
| 82 | - } elseif (round($data['num'] * 20) < 25) { |
|
| 82 | + } elseif (round($data['num']*20) < 25) { |
|
| 83 | 83 | $progressBar = 'danger'; |
| 84 | 84 | } else { |
| 85 | 85 | $progressBar = 'info'; |
| 86 | 86 | } |
| 87 | 87 | ?> |
| 88 | - <meter value="<?php echo round($data['num'] * 20); ?>" max="100" min="0" low="25" optimum="75"></meter> |
|
| 88 | + <meter value="<?php echo round($data['num']*20); ?>" max="100" min="0" low="25" optimum="75"></meter> |
|
| 89 | 89 | </td> |
| 90 | - <td><?php echo round($data['num'] * 20); ?>%</td> |
|
| 90 | + <td><?php echo round($data['num']*20); ?>%</td> |
|
| 91 | 91 | </tr> |
| 92 | 92 | <?php |
| 93 | 93 | $oldcategory = $data['category_id']; |
@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 23 | 23 | $protocol = 'http'; |
| 24 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
| 24 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
| 25 | 25 | $protocol = 'https'; |
| 26 | 26 | } |
| 27 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 27 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 28 | 28 | exit(); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -34,19 +34,19 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | $templateVars = array( |
| 36 | 36 | 'PMF_LANG' => $PMF_LANG, |
| 37 | - 'appleTouchIcon' => '../assets/template/' . PMF_Template::getTplSetName() . '/apple-touch-icon.png', |
|
| 38 | - 'baseUrl' => $faqConfig->get('main.referenceURL') . '/admin/', |
|
| 37 | + 'appleTouchIcon' => '../assets/template/'.PMF_Template::getTplSetName().'/apple-touch-icon.png', |
|
| 38 | + 'baseUrl' => $faqConfig->get('main.referenceURL').'/admin/', |
|
| 39 | 39 | 'editorAutosaveActive' => ('editentry' === $action) && $faqConfig->get('records.autosaveActive'), |
| 40 | 40 | 'editorAutosaveSeconds' => $faqConfig->get('records.autosaveSecs'), |
| 41 | 41 | 'gravatarActive' => $faqConfig->get('main.enableGravatarSupport'), |
| 42 | 42 | 'isAuthenticated' => isset($auth) && in_array(true, $permission), |
| 43 | 43 | 'pmfVersion' => $faqConfig->get('main.currentVersion'), |
| 44 | 44 | 'secLevelEntries' => '', |
| 45 | - 'shortcutIcon' => '../assets/template/' . PMF_Template::getTplSetName() . '/favicon.ico', |
|
| 45 | + 'shortcutIcon' => '../assets/template/'.PMF_Template::getTplSetName().'/favicon.ico', |
|
| 46 | 46 | 'time' => time(), |
| 47 | 47 | 'titleFAQ' => $faqConfig->get('main.titleFAQ'), |
| 48 | - 'userDisplayName' => isset($user) ? $user->getUserData('display_name'): '', |
|
| 49 | - 'userTooltip' => isset($user) ? $PMF_LANG['ad_user_loggedin'] . $user->getLogin() : '', |
|
| 48 | + 'userDisplayName' => isset($user) ? $user->getUserData('display_name') : '', |
|
| 49 | + 'userTooltip' => isset($user) ? $PMF_LANG['ad_user_loggedin'].$user->getLogin() : '', |
|
| 50 | 50 | 'userEmail' => isset($user) ? $user->getUserData('email') : '' |
| 51 | 51 | ); |
| 52 | 52 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | if (!isset($_SERVER['HTTPS']) && $faqConfig->get('security.useSslForLogins')) { |
| 34 | 34 | $templateVars['forceSecureSwitch'] = true; |
| 35 | - $templateVars['secureSwitchUrl'] = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; |
|
| 35 | + $templateVars['secureSwitchUrl'] = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | $twig->loadTemplate('loginform.twig') |
@@ -58,8 +58,8 @@ |
||
| 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 | ); |
@@ -99,12 +99,12 @@ discard block |
||
| 99 | 99 | <th>en</th> |
| 100 | 100 | <th><?php echo $translateLang ?></th> |
| 101 | 101 | </tr> |
| 102 | - <?php while(list($key, $line) = each($leftVarsOnly)): ?> |
|
| 102 | + <?php while (list($key, $line) = each($leftVarsOnly)): ?> |
|
| 103 | 103 | <?php |
| 104 | 104 | // These parameters are not real translations, so don't offer to translate them |
| 105 | 105 | if ($tt->isKeyIgnorable($key)) { |
| 106 | 106 | echo "<tr>\n"; |
| 107 | - echo "<td>" . $key . "</td>\n"; |
|
| 107 | + echo "<td>".$key."</td>\n"; |
|
| 108 | 108 | echo '<td><input class="form-control" type="text" value="'.PMF_String::htmlspecialchars($line).'" disabled="disabled" /></td>'."\n"; |
| 109 | 109 | echo '<td><input class="form-control" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key]).'" disabled="disabled" />'; |
| 110 | 110 | echo '<input type="hidden" name="'.$key.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key]).'" /></td>'."\n"; |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | <?php echo $PMF_LANG['msgCancel'] ?> |
| 201 | 201 | </button> |
| 202 | 202 | <button class="btn btn-success" type="button" |
| 203 | - onclick="save()"<?php if (!is_writable(PMF_ROOT_DIR . "/lang/language_$translateLang.php")) { echo ' disabled="disabled"'; } ?>> |
|
| 203 | + onclick="save()"<?php if (!is_writable(PMF_ROOT_DIR."/lang/language_$translateLang.php")) { echo ' disabled="disabled"'; } ?>> |
|
| 204 | 204 | <?php echo $PMF_LANG['msgSave'] ?> |
| 205 | 205 | </button> |
| 206 | 206 | </td> |
@@ -117,8 +117,9 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | |
| 119 | 119 | // We deal with the second plural form when dealing with the first, so skip it here |
| 120 | - if ($tt->isKeyASecondPluralForm($key)) |
|
| 121 | - continue; |
|
| 120 | + if ($tt->isKeyASecondPluralForm($key)) { |
|
| 121 | + continue; |
|
| 122 | + } |
|
| 122 | 123 | |
| 123 | 124 | if ($tt->isKeyAFirstPluralForm($key)) { |
| 124 | 125 | if ($rightNPlurals == -1) { |
@@ -139,10 +140,11 @@ discard block |
||
| 139 | 140 | echo "<td>".$key."</td>\n"; |
| 140 | 141 | echo '<td><input class="form-control" type="text" value="'.PMF_String::htmlspecialchars($line).'" disabled="disabled" /></td>'."\n"; |
| 141 | 142 | if (array_key_exists($key, $rightVarsOnly) && ($line != $rightVarsOnly[$key] || |
| 142 | - $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line))) |
|
| 143 | - echo '<td><input class="form-control" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key]).'" /></td>'."\n"; |
|
| 144 | - else |
|
| 145 | - echo '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($line).'" /></td>'."\n"; |
|
| 143 | + $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line))) { |
|
| 144 | + echo '<td><input class="form-control" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key]).'" /></td>'."\n"; |
|
| 145 | + } else { |
|
| 146 | + echo '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($line).'" /></td>'."\n"; |
|
| 147 | + } |
|
| 146 | 148 | echo "</tr>\n"; |
| 147 | 149 | |
| 148 | 150 | // Add second English form and translation |
@@ -154,10 +156,11 @@ discard block |
||
| 154 | 156 | // Other language has only one form |
| 155 | 157 | echo '<td><input class="form-control" type="text" value="'.$PMF_LANG['msgTransToolLanguageOnePlural'].'" disabled="disabled" /></td>'."\n"; |
| 156 | 158 | } else { |
| 157 | - if (array_key_exists($key2, $rightVarsOnly)) |
|
| 158 | - echo '<td><input class="form-control" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key2]).'" /></td>'."\n"; |
|
| 159 | - else |
|
| 160 | - echo '<td><input class="form-control alert-danger" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n"; |
|
| 159 | + if (array_key_exists($key2, $rightVarsOnly)) { |
|
| 160 | + echo '<td><input class="form-control" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key2]).'" /></td>'."\n"; |
|
| 161 | + } else { |
|
| 162 | + echo '<td><input class="form-control alert-danger" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n"; |
|
| 163 | + } |
|
| 161 | 164 | } |
| 162 | 165 | echo "</tr>\n"; |
| 163 | 166 | |
@@ -167,10 +170,11 @@ discard block |
||
| 167 | 170 | echo "<tr>\n"; |
| 168 | 171 | echo "<td>".$keyI."</td>\n"; |
| 169 | 172 | echo '<td><input class="form-control" type="text" value="" disabled="disabled" /></td>'."\n"; |
| 170 | - if (array_key_exists($keyI, $rightVarsOnly) && $leftVarsOnly[$key2] != $rightVarsOnly[$key]) |
|
| 171 | - echo '<td><input class="form-control" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$keyI]).'" /></td>'."\n"; |
|
| 172 | - else |
|
| 173 | - echo '<td><input class="form-control alert-danger" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n"; |
|
| 173 | + if (array_key_exists($keyI, $rightVarsOnly) && $leftVarsOnly[$key2] != $rightVarsOnly[$key]) { |
|
| 174 | + echo '<td><input class="form-control" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$keyI]).'" /></td>'."\n"; |
|
| 175 | + } else { |
|
| 176 | + echo '<td><input class="form-control alert-danger" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n"; |
|
| 177 | + } |
|
| 174 | 178 | echo "</tr>\n"; |
| 175 | 179 | } |
| 176 | 180 | // We do not need to process this $key any further |
@@ -185,9 +189,12 @@ discard block |
||
| 185 | 189 | $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line))): |
| 186 | 190 | ?> |
| 187 | 191 | <td><input class="form-control" type="text" name="<?php echo $key?>" value="<?php echo PMF_String::htmlspecialchars($rightVarsOnly[$key]) ?>" /></td> |
| 188 | - <?php else: ?> |
|
| 192 | + <?php else { |
|
| 193 | + : ?> |
|
| 189 | 194 | <td><input class="form-control alert-danger" type="text" name="<?php echo $key?>" value="<?php echo PMF_String::htmlspecialchars($line) ?>" /></td> |
| 190 | - <?php endif; ?> |
|
| 195 | + <?php endif; |
|
| 196 | +} |
|
| 197 | +?> |
|
| 191 | 198 | </tr> |
| 192 | 199 | <?php endwhile; ?> |
| 193 | 200 | <tr> |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | // |
| 29 | 29 | // Bootstrapping |
| 30 | 30 | // |
| 31 | -require PMF_ROOT_DIR . '/inc/Bootstrap.php'; |
|
| 31 | +require PMF_ROOT_DIR.'/inc/Bootstrap.php'; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Initialize attachment factory |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | $Language = new PMF_Language($faqConfig); |
| 47 | 47 | $LANGCODE = $Language->setLanguage($faqConfig->get('main.languageDetection'), $faqConfig->get('main.language')); |
| 48 | 48 | |
| 49 | -require_once PMF_ROOT_DIR . '/lang/language_en.php'; |
|
| 49 | +require_once PMF_ROOT_DIR.'/lang/language_en.php'; |
|
| 50 | 50 | |
| 51 | 51 | if (isset($LANGCODE) && PMF_Language::isASupportedLanguage($LANGCODE)) { |
| 52 | - require_once PMF_ROOT_DIR . '/lang/language_'.$LANGCODE.'.php'; |
|
| 52 | + require_once PMF_ROOT_DIR.'/lang/language_'.$LANGCODE.'.php'; |
|
| 53 | 53 | } else { |
| 54 | 54 | $LANGCODE = 'en'; |
| 55 | 55 | } |
@@ -98,14 +98,14 @@ discard block |
||
| 98 | 98 | <?php |
| 99 | 99 | } |
| 100 | 100 | if (is_null($currentAction) && $auth && $user->perm->checkRight($user->getUserId(), 'addattachment')) { |
| 101 | - $recordId = filter_input(INPUT_GET, 'record_id', FILTER_VALIDATE_INT); |
|
| 101 | + $recordId = filter_input(INPUT_GET, 'record_id', FILTER_VALIDATE_INT); |
|
| 102 | 102 | $recordLang = filter_input(INPUT_GET, 'record_lang', FILTER_SANITIZE_STRING); |
| 103 | 103 | ?> |
| 104 | 104 | <form action="attachment.php?action=save" enctype="multipart/form-data" method="post" accept-charset="utf-8"> |
| 105 | 105 | <fieldset> |
| 106 | 106 | <legend> |
| 107 | 107 | <?php echo $PMF_LANG["ad_att_addto"]." ".$PMF_LANG["ad_att_addto_2"]; ?> |
| 108 | - (max <?php echo round($faqConfig->get('records.maxAttachmentSize') / pow(1024, 2), 2) ?> MB) |
|
| 108 | + (max <?php echo round($faqConfig->get('records.maxAttachmentSize')/pow(1024, 2), 2) ?> MB) |
|
| 109 | 109 | </legend> |
| 110 | 110 | <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $faqConfig->get('records.maxAttachmentSize'); ?>" /> |
| 111 | 111 | <input type="hidden" name="record_id" value="<?php echo $recordId; ?>" /> |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | if (!is_null($currentSave) && $currentSave == true && $auth && |
| 134 | 134 | $user->perm->checkRight($user->getUserId(), 'addattachment')) { |
| 135 | - $recordId = filter_input(INPUT_POST, 'record_id', FILTER_VALIDATE_INT); |
|
| 135 | + $recordId = filter_input(INPUT_POST, 'record_id', FILTER_VALIDATE_INT); |
|
| 136 | 136 | $recordLang = filter_input(INPUT_POST, 'record_lang', FILTER_SANITIZE_STRING); |
| 137 | 137 | ?> |
| 138 | 138 | <p><strong><?php echo $PMF_LANG["ad_att_addto"]." ".$PMF_LANG["ad_att_addto_2"]; ?></strong></p> |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | '<p>%s</p>', |
| 175 | 175 | sprintf( |
| 176 | 176 | $PMF_LANG['ad_attach_4'], |
| 177 | - round($faqConfig->get('records.maxAttachmentSize') / pow(1024, 2), 2) |
|
| 177 | + round($faqConfig->get('records.maxAttachmentSize')/pow(1024, 2), 2) |
|
| 178 | 178 | ) |
| 179 | 179 | ); |
| 180 | 180 | |
@@ -328,7 +328,7 @@ |
||
| 328 | 328 | $templateVars['categoryTree'] .= "</li>\n</ul>"; |
| 329 | 329 | |
| 330 | 330 | $twig->loadTemplate('category/main.twig') |
| 331 | - ->display($templateVars); |
|
| 331 | + ->display($templateVars); |
|
| 332 | 332 | |
| 333 | 333 | unset($templateVars, $csrfToken, $open, $level, $category, $id, $cat, $lang, $lastCatId); |
| 334 | 334 | } else { |
@@ -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 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | if ($cat['lang'] == $lang) { |
| 262 | 262 | $categoryName = $cat['name']; |
| 263 | 263 | } else { |
| 264 | - $categoryName = $cat['name'] . ' (' . $languageCodes[strtoupper($cat['lang'])] . ')'; |
|
| 264 | + $categoryName = $cat['name'].' ('.$languageCodes[strtoupper($cat['lang'])].')'; |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | $level = $cat['indent']; |
@@ -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 | ?> |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $dir = opendir(PMF_ROOT_DIR."/data"); |
| 52 | 52 | $first = 9999999999999999999999999; |
| 53 | 53 | $last = 0; |
| 54 | - while($trackingFile = readdir($dir)) { |
|
| 54 | + while ($trackingFile = readdir($dir)) { |
|
| 55 | 55 | // The filename format is: trackingDDMMYYYY |
| 56 | 56 | // e.g.: tracking02042006 |
| 57 | 57 | if (($trackingFile != '.') && ($trackingFile != '..') && (10 == strpos($trackingFile, $month))) { |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | </tr> |
| 107 | 107 | <tr> |
| 108 | 108 | <td><?php print $PMF_LANG["ad_stat_vpd"]; ?>:</td> |
| 109 | - <td><?php print (($danz != 0) ? round(($vanz / $danz),2) : 0); ?></td> |
|
| 109 | + <td><?php print (($danz != 0) ? round(($vanz/$danz), 2) : 0); ?></td> |
|
| 110 | 110 | </tr> |
| 111 | 111 | <tr> |
| 112 | 112 | <td><?php print $PMF_LANG["ad_stat_fien"]; ?>:</td> |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | - header('Location: http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 22 | + header('Location: http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 23 | 23 | exit(); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -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,12 +33,12 @@ discard block |
||
| 33 | 33 | $itemsPerPage = 32; |
| 34 | 34 | $allCrumbs = $fa->getBreadcrumbs(); |
| 35 | 35 | |
| 36 | -$crumbs = array_slice($allCrumbs, ($page - 1) * $itemsPerPage, $itemsPerPage); |
|
| 36 | +$crumbs = array_slice($allCrumbs, ($page - 1)*$itemsPerPage, $itemsPerPage); |
|
| 37 | 37 | |
| 38 | 38 | $pagination = new PMF_Pagination( |
| 39 | 39 | $faqConfig, |
| 40 | 40 | array( |
| 41 | - 'baseUrl' => PMF_Link::getSystemRelativeUri() . '?' . str_replace('&', '&', $_SERVER['QUERY_STRING']), |
|
| 41 | + 'baseUrl' => PMF_Link::getSystemRelativeUri().'?'.str_replace('&', '&', $_SERVER['QUERY_STRING']), |
|
| 42 | 42 | 'total' => count($allCrumbs), |
| 43 | 43 | 'perPage' => $itemsPerPage, |
| 44 | 44 | ) |