@@ -51,7 +51,7 @@ |
||
| 51 | 51 | if (!$user instanceof PMF_User_CurrentUser) { |
| 52 | 52 | $user = PMF_User_CurrentUser::getFromSession($faqConfig); |
| 53 | 53 | } |
| 54 | -$refreshTime = (PMF_AUTH_TIMEOUT - PMF_AUTH_TIMEOUT_WARNING) * 60; |
|
| 54 | +$refreshTime = (PMF_AUTH_TIMEOUT - PMF_AUTH_TIMEOUT_WARNING)*60; |
|
| 55 | 55 | ?> |
| 56 | 56 | <!DOCTYPE html> |
| 57 | 57 | <html lang="<?php print $PMF_LANG['metaLanguage']; ?>" class="no-js"> |
@@ -37,10 +37,10 @@ |
||
| 37 | 37 | $page = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT, 1); |
| 38 | 38 | |
| 39 | 39 | if (is_null($pages)) { |
| 40 | - $pages = round(($logging->getNumberOfEntries() + ($perpage / 3)) / $perpage, 0); |
|
| 40 | + $pages = round(($logging->getNumberOfEntries() + ($perpage/3))/$perpage, 0); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - $start = ($page - 1) * $perpage; |
|
| 43 | + $start = ($page - 1)*$perpage; |
|
| 44 | 44 | $ende = $start + $perpage; |
| 45 | 45 | |
| 46 | 46 | $baseUrl = sprintf( |
@@ -101,18 +101,18 @@ |
||
| 101 | 101 | ?></td> |
| 102 | 102 | <td> |
| 103 | 103 | <?php |
| 104 | - if (round($data['num'] * 20) > 75) { |
|
| 104 | + if (round($data['num']*20) > 75) { |
|
| 105 | 105 | $progressBar = 'success'; |
| 106 | - } elseif (round($data['num'] * 20) < 25) { |
|
| 106 | + } elseif (round($data['num']*20) < 25) { |
|
| 107 | 107 | $progressBar = 'danger'; |
| 108 | 108 | } else { |
| 109 | 109 | $progressBar = 'info'; |
| 110 | 110 | } |
| 111 | 111 | ?> |
| 112 | - <meter value="<?php echo round($data['num'] * 20); |
|
| 112 | + <meter value="<?php echo round($data['num']*20); |
|
| 113 | 113 | ?>" max="100" min="0" low="25" optimum="75"></meter> |
| 114 | 114 | </td> |
| 115 | - <td><?php echo round($data['num'] * 20); |
|
| 115 | + <td><?php echo round($data['num']*20); |
|
| 116 | 116 | ?>%</td> |
| 117 | 117 | </tr> |
| 118 | 118 | <?php |
@@ -62,10 +62,10 @@ discard block |
||
| 62 | 62 | $searchesList = $search->getMostPopularSearches($searchesCount + 1, true); |
| 63 | 63 | |
| 64 | 64 | if (is_null($pages)) { |
| 65 | - $pages = round((count($searchesList) + ($perpage / 3)) / $perpage, 0); |
|
| 65 | + $pages = round((count($searchesList) + ($perpage/3))/$perpage, 0); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $start = ($page - 1) * $perpage; |
|
| 68 | + $start = ($page - 1)*$perpage; |
|
| 69 | 69 | $ende = $start + $perpage; |
| 70 | 70 | |
| 71 | 71 | $baseUrl = sprintf( |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | ++$displayedCounter; |
| 120 | 120 | |
| 121 | - $num = round(($searchItem['number'] * 100 / $searchesCount), 2); |
|
| 121 | + $num = round(($searchItem['number']*100/$searchesCount), 2); |
|
| 122 | 122 | ?> |
| 123 | 123 | <tr class="row_search_id_<?php echo $searchItem['id'] ?>"> |
| 124 | 124 | <td><?php echo PMF_String::htmlspecialchars($searchItem['searchterm']); |
@@ -188,9 +188,12 @@ |
||
| 188 | 188 | $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line))): |
| 189 | 189 | ?> |
| 190 | 190 | <td><input class="form-control" type="text" name="<?php echo $key?>" value="<?php echo PMF_String::htmlspecialchars($rightVarsOnly[$key]) ?>" /></td> |
| 191 | - <?php else: ?> |
|
| 191 | + <?php else { |
|
| 192 | + : ?> |
|
| 192 | 193 | <td><input class="form-control alert-danger" type="text" name="<?php echo $key?>" value="<?php echo PMF_String::htmlspecialchars($line) ?>" /></td> |
| 193 | - <?php endif; ?> |
|
| 194 | + <?php endif; |
|
| 195 | +} |
|
| 196 | +?> |
|
| 194 | 197 | </tr> |
| 195 | 198 | <?php endwhile; ?> |
| 196 | 199 | <tr> |
@@ -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 | $options = array( |
@@ -58,7 +58,7 @@ discard block |
||
| 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 | |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | * We use these values to add the correct number of input boxes. |
| 77 | 77 | * Left column will always have 2 boxes, right - 1 to 6+ boxes. |
| 78 | 78 | */ |
| 79 | -$leftNPlurals = (int) $_SESSION['trans']['leftVarsOnly']['PMF_LANG[nplurals]']; |
|
| 80 | -$rightNPlurals = (int) $rightVarsOnly['PMF_LANG[nplurals]']; |
|
| 79 | +$leftNPlurals = (int)$_SESSION['trans']['leftVarsOnly']['PMF_LANG[nplurals]']; |
|
| 80 | +$rightNPlurals = (int)$rightVarsOnly['PMF_LANG[nplurals]']; |
|
| 81 | 81 | |
| 82 | 82 | printf( |
| 83 | 83 | '<header class="row"><div class="col-lg-12"><h2 class="page-header"><i aria-hidden="true" class="fa fa-wrench"></i> %s</h2></div></header>', |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | if (!isset($_SESSION['phpmyfaq_csrf_token']) || $_SESSION['phpmyfaq_csrf_token'] !== $csrfToken) { |
| 60 | 60 | $csrfOkay = false; |
| 61 | 61 | } |
| 62 | - if (0 === (int) $userId || !$csrfOkay) { |
|
| 62 | + if (0 === (int)$userId || !$csrfOkay) { |
|
| 63 | 63 | $message .= sprintf('<p class="alert alert-danger">%s</p>', $PMF_LANG['ad_user_error_noId']); |
| 64 | 64 | } else { |
| 65 | 65 | $user = new PMF_User($faqConfig); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $csrfOkay = false; |
| 181 | 181 | } |
| 182 | 182 | $userAction = $defaultUserAction; |
| 183 | - if (0 === (int) $userId || !$csrfOkay) { |
|
| 183 | + if (0 === (int)$userId || !$csrfOkay) { |
|
| 184 | 184 | $message .= sprintf('<p class="alert alert-danger">%s</p>', $PMF_LANG['ad_user_error_noId']); |
| 185 | 185 | } else { |
| 186 | 186 | if (!$user->getUserById($userId, true)) { |
@@ -669,8 +669,8 @@ discard block |
||
| 669 | 669 | $numUsers = count($allUsers); |
| 670 | 670 | $page = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT, 0); |
| 671 | 671 | $perPage = 10; |
| 672 | - $numPages = ceil($numUsers / $perPage); |
|
| 673 | - $lastPage = $page * $perPage; |
|
| 672 | + $numPages = ceil($numUsers/$perPage); |
|
| 673 | + $lastPage = $page*$perPage; |
|
| 674 | 674 | $firstPage = $lastPage - $perPage; |
| 675 | 675 | |
| 676 | 676 | $baseUrl = sprintf( |
@@ -660,8 +660,8 @@ discard block |
||
| 660 | 660 | |
| 661 | 661 | $message = array( |
| 662 | 662 | 'success' => trim($PMF_LANG['successMessage']). |
| 663 | - ' '. |
|
| 664 | - trim($PMF_LANG['msgRegThankYou']), |
|
| 663 | + ' '. |
|
| 664 | + trim($PMF_LANG['msgRegThankYou']), |
|
| 665 | 665 | ); |
| 666 | 666 | } |
| 667 | 667 | } else { |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | $attached = PMF_Filter::filterInput(INPUT_POST, 'message', FILTER_SANITIZE_STRIPPED); |
| 764 | 764 | $mailto = PMF_Filter::filterInputArray(INPUT_POST, |
| 765 | 765 | array('mailto' => array('filter' => FILTER_VALIDATE_EMAIL, |
| 766 | - 'flags' => FILTER_REQUIRE_ARRAY | FILTER_NULL_ON_FAILURE, |
|
| 766 | + 'flags' => FILTER_REQUIRE_ARRAY | FILTER_NULL_ON_FAILURE, |
|
| 767 | 767 | ), |
| 768 | 768 | ) |
| 769 | 769 | ); |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | $mail->message = html_entity_decode( |
| 436 | 436 | $PMF_LANG['msgMailCheck'])."\n\n". |
| 437 | 437 | $faqConfig->get('main.titleFAQ').': '. |
| 438 | - $faqConfig->getDefaultUrl().'admin/?action=editentry&id=' . $recordId; |
|
| 438 | + $faqConfig->getDefaultUrl().'admin/?action=editentry&id='.$recordId; |
|
| 439 | 439 | $result = $mail->send(); |
| 440 | 440 | unset($mail); |
| 441 | 441 | |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | $votingData = array( |
| 695 | 695 | 'record_id' => $recordId, |
| 696 | 696 | 'vote' => $vote, |
| 697 | - 'user_ip' => $userIp, ); |
|
| 697 | + 'user_ip' => $userIp,); |
|
| 698 | 698 | |
| 699 | 699 | if (!$faq->getNumberOfVotings($recordId)) { |
| 700 | 700 | $faq->addVoting($votingData); |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | |
| 833 | 833 | $userData = array( |
| 834 | 834 | 'display_name' => $name, |
| 835 | - 'email' => $email, ); |
|
| 835 | + 'email' => $email,); |
|
| 836 | 836 | $success = $user->setUserData($userData); |
| 837 | 837 | |
| 838 | 838 | if (0 !== strlen($password) && 0 !== strlen($confirm)) { |
@@ -867,13 +867,13 @@ discard block |
||
| 867 | 867 | |
| 868 | 868 | if ($loginExist && ($email == $user->getUserData('email'))) { |
| 869 | 869 | $consonants = array( |
| 870 | - 'b','c','d','f','g','h','j','k','l','m','n','p','r','s','t','v','w','x','y','z', |
|
| 870 | + 'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z', |
|
| 871 | 871 | ); |
| 872 | 872 | $vowels = array( |
| 873 | - 'a','e','i','o','u', |
|
| 873 | + 'a', 'e', 'i', 'o', 'u', |
|
| 874 | 874 | ); |
| 875 | 875 | $newPassword = ''; |
| 876 | - srand((double) microtime() * 1000000); |
|
| 876 | + srand((double)microtime()*1000000); |
|
| 877 | 877 | for ($i = 1; $i <= 4; ++$i) { |
| 878 | 878 | $newPassword .= $consonants[rand(0, 19)]; |
| 879 | 879 | $newPassword .= $vowels[rand(0, 4)]; |
@@ -367,8 +367,8 @@ |
||
| 367 | 367 | define('PMF_GET_KEY_NAME_LANGUAGE', 'lang'); |
| 368 | 368 | define('PMF_GET_KEY_NAME_SESSIONID', 'sid'); |
| 369 | 369 | // Misc parameters |
| 370 | -define('PMF_LANGUAGE_EXPIRED_TIME', 3600); // 30 minutes |
|
| 371 | -define('PMF_SESSION_EXPIRED_TIME', 3600); // 30 minutes |
|
| 370 | +define('PMF_LANGUAGE_EXPIRED_TIME', 3600); // 30 minutes |
|
| 371 | +define('PMF_SESSION_EXPIRED_TIME', 3600); // 30 minutes |
|
| 372 | 372 | define('PMF_REMEMBERME_EXPIRED_TIME', 1209600); // 2 weeks |
| 373 | 373 | |
| 374 | 374 | // |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | foreach ($_records as $_r) { |
| 94 | 94 | ++$i; |
| 95 | 95 | $output = ''; |
| 96 | - $output .= sprintf('%0'.strlen((string) $tot).'d', $i).'/'.$tot.'. Checking '.$_r['solution_id'].' ('.PMF_Utils::makeShorterText(strip_tags($_r['title']), 8).'):'; |
|
| 96 | + $output .= sprintf('%0'.strlen((string)$tot).'d', $i).'/'.$tot.'. Checking '.$_r['solution_id'].' ('.PMF_Utils::makeShorterText(strip_tags($_r['title']), 8).'):'; |
|
| 97 | 97 | $start = microtime(true); |
| 98 | 98 | if ($oLnk->getEntryState($_r['id'], $_r['lang'], true) === true) { |
| 99 | 99 | $output .= $oLnk->verifyArticleURL($_r['content'], $_r['id'], $_r['lang'], true); |