@@ -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 | ) |
@@ -20,17 +20,17 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | $protocol = 'http'; |
| 23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
| 23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
| 24 | 24 | $protocol = 'https'; |
| 25 | 25 | } |
| 26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 27 | 27 | exit(); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | clearstatcache(); |
| 31 | 31 | unset($_SESSION['trans']); |
| 32 | 32 | |
| 33 | -$langDir = PMF_ROOT_DIR . DIRECTORY_SEPARATOR . "lang"; |
|
| 33 | +$langDir = PMF_ROOT_DIR.DIRECTORY_SEPARATOR."lang"; |
|
| 34 | 34 | $transDir = new DirectoryIterator($langDir); |
| 35 | 35 | $isTransDirWritable = is_writable($langDir); |
| 36 | 36 | $tt = new PMF_TransTool; |
@@ -62,22 +62,22 @@ discard block |
||
| 62 | 62 | sort($sortedLangList); |
| 63 | 63 | |
| 64 | 64 | foreach ($sortedLangList as $lang) { |
| 65 | - $isLangFileWritable = is_writable($langDir . DIRECTORY_SEPARATOR . "language_$lang.php"); |
|
| 65 | + $isLangFileWritable = is_writable($langDir.DIRECTORY_SEPARATOR."language_$lang.php"); |
|
| 66 | 66 | $showActions = $isTransDirWritable && $isLangFileWritable; |
| 67 | 67 | $translatedPercentage = $tt->getTranslatedPercentage( |
| 68 | - $langDir . DIRECTORY_SEPARATOR . "language_en.php", |
|
| 69 | - $langDir . DIRECTORY_SEPARATOR . "language_$lang.php" |
|
| 68 | + $langDir.DIRECTORY_SEPARATOR."language_en.php", |
|
| 69 | + $langDir.DIRECTORY_SEPARATOR."language_$lang.php" |
|
| 70 | 70 | ); |
| 71 | 71 | |
| 72 | 72 | $currentTranslation = array( |
| 73 | - 'editButtonUrl' => '?action=transedit&translang=' . $lang, |
|
| 73 | + 'editButtonUrl' => '?action=transedit&translang='.$lang, |
|
| 74 | 74 | 'isLangFileWritable' => $isLangFileWritable, |
| 75 | 75 | 'lang' => $lang, |
| 76 | 76 | 'name' => $languageCodes[strtoupper($lang)], |
| 77 | 77 | 'renderDeleteButton' => $permission["deltranslation"] && $showActions, |
| 78 | 78 | 'renderEditButton' => $permission["edittranslation"] && $showActions, |
| 79 | 79 | 'renderSendToTeamButton' => $permission["edittranslation"] && $showActions, |
| 80 | - 'translatedPercentage' => $translatedPercentage . '%' |
|
| 80 | + 'translatedPercentage' => $translatedPercentage.'%' |
|
| 81 | 81 | ); |
| 82 | 82 | |
| 83 | 83 | $templateVars['translations'][] = $currentTranslation; |
@@ -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 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | } elseif ('news' == $action && $user->perm->checkRight($user->getUserId(), "editnews")) { |
| 44 | 44 | $date = new PMF_Date($faqConfig); |
| 45 | 45 | $newsHeader = $news->getNewsHeader(); |
| 46 | - foreach($newsHeader as $key => $newsItem) { |
|
| 46 | + foreach ($newsHeader as $key => $newsItem) { |
|
| 47 | 47 | $newsHeader[$key]['date'] = $date->format($newsItem['date']); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | 'authorEmail' => $email, |
| 105 | 105 | 'active' => (is_null($active)) ? 'n' : 'y', |
| 106 | 106 | 'comment' => (is_null($comment)) ? 'n' : 'y', |
| 107 | - 'dateStart' => (empty($dateStart)) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000', |
|
| 108 | - 'dateEnd' => (empty($dateEnd)) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959', |
|
| 107 | + 'dateStart' => (empty($dateStart)) ? '00000000000000' : str_replace('-', '', $dateStart).'000000', |
|
| 108 | + 'dateEnd' => (empty($dateEnd)) ? '99991231235959' : str_replace('-', '', $dateEnd).'235959', |
|
| 109 | 109 | 'link' => $link, |
| 110 | 110 | 'linkTitle' => $linktitle, |
| 111 | 111 | 'date' => date('YmdHis'), |
@@ -144,8 +144,8 @@ discard block |
||
| 144 | 144 | 'authorEmail' => $email, |
| 145 | 145 | 'active' => (is_null($active)) ? 'n' : 'y', |
| 146 | 146 | 'comment' => (is_null($comment)) ? 'n' : 'y', |
| 147 | - 'dateStart' => (empty($dateStart)) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000', |
|
| 148 | - 'dateEnd' => (empty($dateEnd)) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959', |
|
| 147 | + 'dateStart' => (empty($dateStart)) ? '00000000000000' : str_replace('-', '', $dateStart).'000000', |
|
| 148 | + 'dateEnd' => (empty($dateEnd)) ? '99991231235959' : str_replace('-', '', $dateEnd).'235959', |
|
| 149 | 149 | 'link' => $link, |
| 150 | 150 | 'linkTitle' => $linktitle, |
| 151 | 151 | 'date' => date('YmdHis'), |
@@ -20,10 +20,10 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | if (!defined('IS_VALID_PHPMYFAQ')) { |
| 22 | 22 | $protocol = 'http'; |
| 23 | - if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){ |
|
| 23 | + if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { |
|
| 24 | 24 | $protocol = 'https'; |
| 25 | 25 | } |
| 26 | - header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); |
|
| 26 | + header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])); |
|
| 27 | 27 | exit(); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | // Set the path of the current category |
| 77 | 77 | $categoryName = $category->getPath($currentCategory, ' » ', true); |
| 78 | 78 | |
| 79 | -$changeLanguagePath = PMF_Link::getSystemRelativeUri() . |
|
| 79 | +$changeLanguagePath = PMF_Link::getSystemRelativeUri(). |
|
| 80 | 80 | sprintf( |
| 81 | 81 | '?%saction=artikel&cat=%d&id=%d&artlang=%s', |
| 82 | 82 | $sids, |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | '%', |
| 234 | 234 | '%%', |
| 235 | 235 | PMF_Link::getSystemRelativeUri('index.php') |
| 236 | - ) . 'index.php?%saction=translate&cat=%s&id=%d&srclang=%s', |
|
| 236 | + ).'index.php?%saction=translate&cat=%s&id=%d&srclang=%s', |
|
| 237 | 237 | $sids, |
| 238 | 238 | $currentCategory, |
| 239 | 239 | $recordId, |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | 'writeContent', |
| 266 | 266 | 'tagsAvailable', |
| 267 | 267 | array( |
| 268 | - 'renderTags' => $PMF_LANG['msg_tags'] . ': ' . $faqTagging->getAllLinkTagsById($recordId) |
|
| 268 | + 'renderTags' => $PMF_LANG['msg_tags'].': '.$faqTagging->getAllLinkTagsById($recordId) |
|
| 269 | 269 | ) |
| 270 | 270 | ); |
| 271 | 271 | } |
@@ -301,12 +301,12 @@ discard block |
||
| 301 | 301 | 'baseHref' => $faqSystem->getSystemUri($faqConfig), |
| 302 | 302 | 'writeRubrik' => $categoryName, |
| 303 | 303 | 'solution_id' => $faq->faqRecord['solution_id'], |
| 304 | - 'solution_id_link' => PMF_Link::getSystemRelativeUri() . '?solution_id=' . $faq->faqRecord['solution_id'], |
|
| 304 | + 'solution_id_link' => PMF_Link::getSystemRelativeUri().'?solution_id='.$faq->faqRecord['solution_id'], |
|
| 305 | 305 | 'writeThema' => $question, |
| 306 | 306 | 'writeContent' => $answer, |
| 307 | - 'writeDateMsg' => '<dt>' . $PMF_LANG['msgLastUpdateArticle'] . '</dt><dd>' . $date->format($faq->faqRecord['date']) . '</dd>', |
|
| 308 | - 'writeRevision' => '<dt>' . $PMF_LANG['ad_entry_revision'] . ':</dt><dd>1.' . $faq->faqRecord['revision_id'] . '</dd>', |
|
| 309 | - 'writeAuthor' => '<dt>' . $PMF_LANG['msgAuthor'] . ':</dt><dd>' . $faq->faqRecord['author'] . '</dd>', |
|
| 307 | + 'writeDateMsg' => '<dt>'.$PMF_LANG['msgLastUpdateArticle'].'</dt><dd>'.$date->format($faq->faqRecord['date']).'</dd>', |
|
| 308 | + 'writeRevision' => '<dt>'.$PMF_LANG['ad_entry_revision'].':</dt><dd>1.'.$faq->faqRecord['revision_id'].'</dd>', |
|
| 309 | + 'writeAuthor' => '<dt>'.$PMF_LANG['msgAuthor'].':</dt><dd>'.$faq->faqRecord['author'].'</dd>', |
|
| 310 | 310 | 'editThisEntry' => $editThisEntry, |
| 311 | 311 | 'translationUrl' => $translationUrl, |
| 312 | 312 | 'languageSelection' => PMF_Language::selectLanguages($LANGCODE, false, $arrLanguage, 'translation'), |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | '%', |
| 317 | 317 | '%%', |
| 318 | 318 | PMF_Link::getSystemRelativeUri('index.php') |
| 319 | - ) . 'index.php?%saction=savevoting', |
|
| 319 | + ).'index.php?%saction=savevoting', |
|
| 320 | 320 | $sids |
| 321 | 321 | ), |
| 322 | 322 | 'saveVotingID' => $recordId, |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | 'defaultContentName' => ($user instanceof PMF_User_CurrentUser) ? $user->getUserData('display_name') : '', |
| 341 | 341 | 'msgYourComment' => $PMF_LANG['msgYourComment'], |
| 342 | 342 | 'msgNewContentSubmit' => $PMF_LANG['msgNewContentSubmit'], |
| 343 | - 'captchaFieldset' => $captchaHelper->renderCaptcha($captcha, 'writecomment',$PMF_LANG['msgCaptcha'], $auth), |
|
| 343 | + 'captchaFieldset' => $captchaHelper->renderCaptcha($captcha, 'writecomment', $PMF_LANG['msgCaptcha'], $auth), |
|
| 344 | 344 | 'writeComments' => $faqComment->getComments($recordId, PMF_Comment::COMMENT_TYPE_FAQ), |
| 345 | 345 | 'msg_about_faq' => $PMF_LANG['msg_about_faq'] |
| 346 | 346 | ) |