@@ -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,11 +35,11 @@ discard block |
||
| 35 | 35 | 'filter' => FILTER_VALIDATE_INT, |
| 36 | 36 | 'flags' => FILTER_REQUIRE_ARRAY |
| 37 | 37 | ); |
| 38 | - $checkNews = array( |
|
| 38 | + $checkNews = array( |
|
| 39 | 39 | 'filter' => FILTER_VALIDATE_INT, |
| 40 | 40 | 'flags' => FILTER_REQUIRE_ARRAY |
| 41 | 41 | ); |
| 42 | - $ret = false; |
|
| 42 | + $ret = false; |
|
| 43 | 43 | |
| 44 | 44 | $faqComments = PMF_Filter::filterInputArray(INPUT_POST, array('faq_comments' => $checkFaqs)); |
| 45 | 45 | $newsComments = PMF_Filter::filterInputArray(INPUT_POST, array('news_comments' => $checkNews)); |
@@ -31,15 +31,15 @@ discard block |
||
| 31 | 31 | // |
| 32 | 32 | // Bootstrapping |
| 33 | 33 | // |
| 34 | -require PMF_ROOT_DIR . '/inc/Bootstrap.php'; |
|
| 35 | -require PMF_ROOT_DIR . '/lang/language_en.php'; |
|
| 34 | +require PMF_ROOT_DIR.'/inc/Bootstrap.php'; |
|
| 35 | +require PMF_ROOT_DIR.'/lang/language_en.php'; |
|
| 36 | 36 | |
| 37 | 37 | // |
| 38 | 38 | // Get language (default: english) |
| 39 | 39 | // |
| 40 | 40 | $language = PMF_Filter::filterInput(INPUT_GET, 'lang', FILTER_SANITIZE_STRING); |
| 41 | 41 | if (!is_null($language) && PMF_Language::isASupportedLanguage($language)) { |
| 42 | - require PMF_ROOT_DIR . '/lang/language_' . $language . '.php'; |
|
| 42 | + require PMF_ROOT_DIR.'/lang/language_'.$language.'.php'; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | // |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | PMF_String::init($language); |
| 49 | 49 | |
| 50 | 50 | $user = PMF_User_CurrentUser::getFromCookie($faqConfig); |
| 51 | -if (! $user instanceof PMF_User_CurrentUser) { |
|
| 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"> |
@@ -19,20 +19,20 @@ 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 | 29 | $do = PMF_Filter::filterInput(INPUT_GET, 'do', FILTER_SANITIZE_STRING); |
| 30 | 30 | |
| 31 | -if ('insertentry' == $do && ($permission['editbt']|| $permission['addbt']) || |
|
| 31 | +if ('insertentry' == $do && ($permission['editbt'] || $permission['addbt']) || |
|
| 32 | 32 | 'saveentry' == $do && $permission['editbt']) { |
| 33 | 33 | |
| 34 | 34 | $user = PMF_User_CurrentUser::getFromCookie($faqConfig); |
| 35 | - if (! $user instanceof PMF_User_CurrentUser) { |
|
| 35 | + if (!$user instanceof PMF_User_CurrentUser) { |
|
| 36 | 36 | $user = PMF_User_CurrentUser::getFromSession($faqConfig); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -87,8 +87,8 @@ discard block |
||
| 87 | 87 | 'email' => $email, |
| 88 | 88 | 'comment' => (!is_null($comment) ? 'y' : 'n'), |
| 89 | 89 | 'date' => empty($date) ? date('YmdHis') : str_replace(array('-', ':', ' '), '', $date), |
| 90 | - 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart) . '000000'), |
|
| 91 | - 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd) . '235959'), |
|
| 90 | + 'dateStart' => (empty($dateStart) ? '00000000000000' : str_replace('-', '', $dateStart).'000000'), |
|
| 91 | + 'dateEnd' => (empty($dateEnd) ? '99991231235959' : str_replace('-', '', $dateEnd).'235959'), |
|
| 92 | 92 | 'linkState' => '', |
| 93 | 93 | 'linkDateCheck' => 0 |
| 94 | 94 | ); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $faq->addCategoryRelations($categories['rubrik'], $record_id, $recordData['lang']); |
| 143 | 143 | |
| 144 | 144 | if ($tags != '') { |
| 145 | - $tagging->saveTags($record_id, explode(',',$tags)); |
|
| 145 | + $tagging->saveTags($record_id, explode(',', $tags)); |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | $faq->addPermission('user', $record_id, $restricted_users); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $dateEnd = PMF_Filter::filterInput(INPUT_POST, 'dateEnd', FILTER_SANITIZE_STRING); |
| 41 | 41 | $question = PMF_Filter::filterInput(INPUT_POST, 'question', FILTER_SANITIZE_STRING); |
| 42 | 42 | $categories = PMF_Filter::filterInputArray(INPUT_POST, array('rubrik' => array('filter' => FILTER_VALIDATE_INT, |
| 43 | - 'flags' => FILTER_REQUIRE_ARRAY))); |
|
| 43 | + 'flags' => FILTER_REQUIRE_ARRAY))); |
|
| 44 | 44 | $record_lang = PMF_Filter::filterInput(INPUT_POST, 'lang', FILTER_SANITIZE_STRING); |
| 45 | 45 | $tags = PMF_Filter::filterInput(INPUT_POST, 'tags', FILTER_SANITIZE_STRING); |
| 46 | 46 | $active = PMF_Filter::filterInput(INPUT_POST, 'active', FILTER_SANITIZE_STRING); |
@@ -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 | ) |
@@ -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 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | <p> |
| 40 | 40 | <select onchange="loadStopWordsByLang(this.options[this.selectedIndex].value)" id="stopwords_lang_selector"> |
| 41 | 41 | <option value="none">---</option> |
| 42 | -<?php foreach($sortedLanguageCodes as $key => $value) { ?> |
|
| 42 | +<?php foreach ($sortedLanguageCodes as $key => $value) { ?> |
|
| 43 | 43 | <option value="<?php echo strtolower($key); ?>"><?php echo $value; ?></option> |
| 44 | 44 | <?php } ?> |
| 45 | 45 | </select> |
@@ -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 | |
@@ -35,13 +35,13 @@ discard block |
||
| 35 | 35 | $date = new PMF_Date($faqConfig); |
| 36 | 36 | $perpage = 15; |
| 37 | 37 | $pages = PMF_Filter::filterInput(INPUT_GET, 'pages', FILTER_VALIDATE_INT); |
| 38 | - $page = PMF_Filter::filterInput(INPUT_GET, 'page' , FILTER_VALIDATE_INT, 1); |
|
| 38 | + $page = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT, 1); |
|
| 39 | 39 | |
| 40 | 40 | if (is_null($pages)) { |
| 41 | - $pages = round(($logging->getNumberOfEntries() + ($perpage / 3)) / $perpage, 0); |
|
| 41 | + $pages = round(($logging->getNumberOfEntries() + ($perpage/3))/$perpage, 0); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - $start = ($page - 1) * $perpage; |
|
| 44 | + $start = ($page - 1)*$perpage; |
|
| 45 | 45 | $ende = $start + $perpage; |
| 46 | 46 | |
| 47 | 47 | $baseUrl = sprintf( |
@@ -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 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $dir = opendir(PMF_ROOT_DIR."/data"); |
| 48 | 48 | $first = 9999999999999999999999999; |
| 49 | 49 | $last = 0; |
| 50 | - while($trackingFile = readdir($dir)) { |
|
| 50 | + while ($trackingFile = readdir($dir)) { |
|
| 51 | 51 | // The filename format is: trackingDDMMYYYY |
| 52 | 52 | // e.g.: tracking02042006 |
| 53 | 53 | if (($trackingFile != '.') && ($trackingFile != '..') && (10 == strpos($trackingFile, $month))) { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | </tr> |
| 103 | 103 | <tr> |
| 104 | 104 | <td><?php echo $PMF_LANG["ad_stat_vpd"]; ?>:</td> |
| 105 | - <td><?php echo (($danz != 0) ? round(($vanz / $danz),2) : 0); ?></td> |
|
| 105 | + <td><?php echo (($danz != 0) ? round(($vanz/$danz), 2) : 0); ?></td> |
|
| 106 | 106 | </tr> |
| 107 | 107 | <tr> |
| 108 | 108 | <td><?php echo $PMF_LANG["ad_stat_fien"]; ?>:</td> |
@@ -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 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | <div class="controls"> |
| 67 | 67 | <?php |
| 68 | 68 | foreach ($instance->getInstanceConfig($instanceData->id) as $key => $config) { |
| 69 | - echo '<span class="uneditable-input">' . $key . ': ' . $config . '</span><br/>'; |
|
| 69 | + echo '<span class="uneditable-input">'.$key.': '.$config.'</span><br/>'; |
|
| 70 | 70 | } |
| 71 | 71 | ?> |
| 72 | 72 | </div> |
@@ -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 | |
@@ -73,19 +73,19 @@ discard block |
||
| 73 | 73 | <td style="width: 60px;"><?php echo $data['usr']; ?></td> |
| 74 | 74 | <td style="width: 60px;"> |
| 75 | 75 | <?php |
| 76 | - if (round($data['num'] * 20) > 75) { |
|
| 76 | + if (round($data['num']*20) > 75) { |
|
| 77 | 77 | $progressBar = 'success'; |
| 78 | - } elseif (round($data['num'] * 20) < 25) { |
|
| 78 | + } elseif (round($data['num']*20) < 25) { |
|
| 79 | 79 | $progressBar = 'danger'; |
| 80 | 80 | } else { |
| 81 | 81 | $progressBar = 'info'; |
| 82 | 82 | } |
| 83 | 83 | ?> |
| 84 | 84 | <div class="progress progress-<?php echo $progressBar ?>" style="width: 50px;"> |
| 85 | - <div class="bar" style="width: <?php echo round($data['num'] * 20); ?>%;"></div> |
|
| 85 | + <div class="bar" style="width: <?php echo round($data['num']*20); ?>%;"></div> |
|
| 86 | 86 | </div> |
| 87 | 87 | </td> |
| 88 | - <td style="width: 60px;"><?php echo round($data['num'] * 20); ?>%</td> |
|
| 88 | + <td style="width: 60px;"><?php echo round($data['num']*20); ?>%</td> |
|
| 89 | 89 | </tr> |
| 90 | 90 | <?php |
| 91 | 91 | $oldcategory = $data['category_id']; |