GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( e9dabe...266fe5 )
by Thorsten
10:09 queued 35s
created
phpmyfaq/admin/footer.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
     $templateVars['wysiwygActive'] = false;
69 69
 
70 70
     $twig->loadTemplate('footer.twig')
71
-         ->display($templateVars);
71
+            ->display($templateVars);
72 72
 
73 73
     unset($templateVars, $wysiwygActions);
74 74
 }
75 75
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,21 +20,21 @@  discard block
 block discarded – undo
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
 $templateVars = array(
31 31
     'PMF_LANG'            => $PMF_LANG,
32 32
     'debugInformation'    => DEBUG ? $faqConfig->getDb()->log() : '',
33
-    'formAction'          => 'index.php' . (isset($action) ? '?action=' . $action : ''),
33
+    'formAction'          => 'index.php'.(isset($action) ? '?action='.$action : ''),
34 34
     'isAuthenticated'     => isset($auth),
35 35
     'languageSelector'    => PMF_Language::selectLanguages($LANGCODE, true),
36 36
     'pmfVersion'          => $faqConfig->get('main.currentVersion'),
37
-    'sessionKeepaliveUrl' => 'session.keepalive.php?lang=' . $LANGCODE,
37
+    'sessionKeepaliveUrl' => 'session.keepalive.php?lang='.$LANGCODE,
38 38
     'userDisplayName'     => isset($user) ? $user->userdata->get('display_name') : '',
39 39
     'userId'              => isset($user) ? $user->userdata->get('user_id') : ''
40 40
 );
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 if (isset($auth) && in_array($action, $wysiwygActions) && $faqConfig->get('main.enableWysiwygEditor')) {
52 52
     $templateVars['wysiwygActive']     = true;
53
-    $templateVars['tinyMceContentCss'] = '../assets/template/' . PMF_Template::getTplSetName() . '/css/style.css';
53
+    $templateVars['tinyMceContentCss'] = '../assets/template/'.PMF_Template::getTplSetName().'/css/style.css';
54 54
     $templateVars['tinyMceLanguage']   = PMF_Language::isASupportedTinyMCELanguage($LANGCODE) ? $LANGCODE : 'en';
55 55
     if (('addnews' == $action || 'editnews' == $action)) {
56 56
         $templateVars['tinyMceElements'] = 'news';
Please login to merge, or discard this patch.
phpmyfaq/admin/backup.export.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 //
28 28
 // Bootstrapping
29 29
 //
30
-require PMF_ROOT_DIR . '/inc/Bootstrap.php';
30
+require PMF_ROOT_DIR.'/inc/Bootstrap.php';
31 31
 
32 32
 $action = PMF_Filter::filterInput(INPUT_GET, 'action', FILTER_SANITIZE_STRING);
33 33
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 if ($user->perm->checkRight($user->getUserId(), 'backup')) {
48 48
 
49 49
     $tables       = $tableNames = $faqConfig->getDb()->getTableNames(PMF_Db::getTablePrefix());
50
-    $tablePrefix  = (PMF_Db::getTablePrefix() !== '') ? PMF_Db::getTablePrefix() . '.phpmyfaq' : 'phpmyfaq';
50
+    $tablePrefix  = (PMF_Db::getTablePrefix() !== '') ? PMF_Db::getTablePrefix().'.phpmyfaq' : 'phpmyfaq';
51 51
     $tableNames   = '';
52 52
     $majorVersion = substr($faqConfig->get('main.currentVersion'), 0, 3);
53 53
     $dbHelper     = new PMF_DB_Helper($faqConfig);
@@ -55,24 +55,24 @@  discard block
 block discarded – undo
55 55
     switch ($action) {
56 56
         case 'backup_content' :
57 57
             foreach ($tables as $table) {
58
-                if ((PMF_Db::getTablePrefix() . 'faqadminlog' == trim($table)) || (PMF_Db::getTablePrefix() . 'faqsessions' == trim($table))) {
58
+                if ((PMF_Db::getTablePrefix().'faqadminlog' == trim($table)) || (PMF_Db::getTablePrefix().'faqsessions' == trim($table))) {
59 59
                     continue;
60 60
                 }
61
-                $tableNames .= $table . ' ';
61
+                $tableNames .= $table.' ';
62 62
             }
63 63
             break;
64 64
         case 'backup_logs' :
65 65
             foreach ($tables as $table) {
66
-                if ((PMF_Db::getTablePrefix() . 'faqadminlog' == trim($table)) || (PMF_Db::getTablePrefix() . 'faqsessions' == trim($table))) {
67
-                    $tableNames .= $table . ' ';
66
+                if ((PMF_Db::getTablePrefix().'faqadminlog' == trim($table)) || (PMF_Db::getTablePrefix().'faqsessions' == trim($table))) {
67
+                    $tableNames .= $table.' ';
68 68
                 }
69 69
             }
70 70
             break;
71 71
     }
72 72
 
73
-    $text[] = "-- pmf" . $majorVersion . ": " . $tableNames;
73
+    $text[] = "-- pmf".$majorVersion.": ".$tableNames;
74 74
     $text[] = "-- DO NOT REMOVE THE FIRST LINE!";
75
-    $text[] = "-- pmftableprefix: " . PMF_Db::getTablePrefix();
75
+    $text[] = "-- pmftableprefix: ".PMF_Db::getTablePrefix();
76 76
     $text[] = "-- DO NOT REMOVE THE LINES ABOVE!";
77 77
     $text[] = "-- Otherwise this backup will be broken.";
78 78
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             header($header);
87 87
             foreach (explode(' ', $tableNames) as $table) {
88 88
                 print implode("\r\n", $text);
89
-                $text = $dbHelper->buildInsertQueries("SELECT * FROM " . $table, $table);
89
+                $text = $dbHelper->buildInsertQueries("SELECT * FROM ".$table, $table);
90 90
             }
91 91
             break;
92 92
         case 'backup_logs' :
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             header($header);
99 99
             foreach (explode(' ', $tableNames) as $table) {
100 100
                 print implode("\r\n", $text);
101
-                $text = $dbHelper->buildInsertQueries("SELECT * FROM " . $table, $table);
101
+                $text = $dbHelper->buildInsertQueries("SELECT * FROM ".$table, $table);
102 102
             }
103 103
             break;
104 104
     }
Please login to merge, or discard this patch.
phpmyfaq/admin/stat.browser.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
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,8 +30,8 @@  discard block
 block discarded – undo
30 30
 
31 31
     $perpage   = 50;
32 32
     $day       = PMF_Filter::filterInput(INPUT_POST, 'day', FILTER_VALIDATE_INT);
33
-    $firstHour = mktime (0, 0, 0, date('m', $day), date('d', $day), date('Y', $day));
34
-    $lastHour  = mktime (23, 59, 59, date('m', $day), date('d', $day), date('Y', $day));
33
+    $firstHour = mktime(0, 0, 0, date('m', $day), date('d', $day), date('Y', $day));
34
+    $lastHour  = mktime(23, 59, 59, date('m', $day), date('d', $day), date('Y', $day));
35 35
     
36 36
     $session     = new PMF_Session($faqConfig);
37 37
     $sessiondata = $session->getSessionsbyDate($firstHour, $lastHour);
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         <header class="row">
41 41
             <div class="col-lg-12">
42 42
                 <h2 class="page-header">
43
-                    <i class="fa fa-tasks"></i> <?php echo $PMF_LANG['ad_sess_session'] . ' ' . date("Y-m-d", $day); ?>
43
+                    <i class="fa fa-tasks"></i> <?php echo $PMF_LANG['ad_sess_session'].' '.date("Y-m-d", $day); ?>
44 44
                 </h2>
45 45
             </div>
46 46
         </header>
Please login to merge, or discard this patch.
phpmyfaq/admin/stat.search.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
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,9 +47,9 @@  discard block
 block discarded – undo
47 47
 
48 48
     $perpage = 15;
49 49
     $pages   = PMF_Filter::filterInput(INPUT_GET, 'pages', FILTER_VALIDATE_INT);
50
-    $page    = PMF_Filter::filterInput(INPUT_GET, 'page' , FILTER_VALIDATE_INT, 1);
50
+    $page    = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT, 1);
51 51
     
52
-    $search        = new PMF_Search($faqConfig);
52
+    $search = new PMF_Search($faqConfig);
53 53
 
54 54
     if ('truncatesearchterms' === $action) {
55 55
         if ($search->deleteAllSearchTerms()) {
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
     $searchesList  = $search->getMostPopularSearches($searchesCount + 1, true);
64 64
 
65 65
     if (is_null($pages)) {
66
-        $pages = round((count($searchesList) + ($perpage / 3)) / $perpage, 0);
66
+        $pages = round((count($searchesList) + ($perpage/3))/$perpage, 0);
67 67
     }
68 68
     
69
-    $start = ($page - 1) * $perpage;
69
+    $start = ($page - 1)*$perpage;
70 70
     $ende  = $start + $perpage;
71 71
 
72 72
     $baseUrl = sprintf(
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     $counter = $displayedCounter = 0;
107 107
     $self    = substr(__FILE__, strlen($_SERVER['DOCUMENT_ROOT']));
108 108
 
109
-    foreach($searchesList as $searchItem) {
109
+    foreach ($searchesList as $searchItem) {
110 110
 
111 111
         if ($displayedCounter >= $perpage) {
112 112
             $displayedCounter++;
@@ -119,10 +119,10 @@  discard block
 block discarded – undo
119 119
         }
120 120
         $displayedCounter++;
121 121
         
122
-        $num = round(($searchItem['number']*100 / $searchesCount), 2);
122
+        $num = round(($searchItem['number']*100/$searchesCount), 2);
123 123
 ?>
124 124
                     <tr class="row_search_id_<?php echo $searchItem['id'] ?>">
125
-                        <td><?php echo PMF_String::htmlspecialchars($searchItem['searchterm']);  ?></td>
125
+                        <td><?php echo PMF_String::htmlspecialchars($searchItem['searchterm']); ?></td>
126 126
                         <td><?php echo $searchItem['number'] ?></td>
127 127
                         <td><?php echo $languageCodes[PMF_String::strtoupper($searchItem['lang'])] ?></td>
128 128
                         <td><meter max="100" value="<?php echo $num; ?>"></td>
Please login to merge, or discard this patch.
phpmyfaq/admin/ajax.trans.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 
23 23
 if (!defined('IS_VALID_PHPMYFAQ')) {
24 24
     $protocol = 'http';
25
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
25
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
26 26
         $protocol = 'https';
27 27
     }
28
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
28
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
29 29
     exit();
30 30
 }
31 31
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             if (is_string($val)) {
45 45
                 $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val);
46 46
                 $val = str_replace("'", "\\'", $val);
47
-                $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key]"]  = $val;
47
+                $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key]"] = $val;
48 48
             } elseif (is_array($val)) {
49 49
                 /**
50 50
                  * Here we deal with a two dimensional array
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
         
60 60
         foreach ((array)@$_POST['LANG_CONF'] as $key => $val) {
61 61
             // if string like array(blah-blah-blah), extract the contents inside the brackets
62
-            if (preg_match('/^\s*array\s*\(\s*(\d+.+)\s*\).*$/',$val,$matches1)) {
62
+            if (preg_match('/^\s*array\s*\(\s*(\d+.+)\s*\).*$/', $val, $matches1)) {
63 63
                 // split the resulting string of delimiters such as "number =>"
64 64
                 $valArr = preg_split(
65 65
                     '/\s*(\d+)\s*\=\>\s*/',
66 66
                     $matches1[1],
67 67
                     null,
68
-                    PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY
68
+                    PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
69 69
                 );
70 70
                 // in an array $valArr contents like  "number substring", "substring", "number substring", "substring", ...
71 71
                 $numVal = count($valArr);
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
                             }
85 85
                         }
86 86
                     }
87
-                    $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = 'array('.implode(", ",$newValArr).')';
87
+                    $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = 'array('.implode(", ", $newValArr).')';
88 88
                 }
89 89
             } else {  // compatibility for old behavior
90 90
                 $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val);
91 91
                 $val = str_replace("'", "\\'", $val);
92
-                $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"]  = $val;
92
+                $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = $val;
93 93
             }
94 94
         }
95 95
         
@@ -104,14 +104,14 @@  discard block
 block discarded – undo
104 104
         }
105 105
         
106 106
         $lang     = strtolower($_SESSION['trans']['rightVarsOnly']["PMF_LANG[metaLanguage]"]);
107
-        $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php";
107
+        $filename = PMF_ROOT_DIR."/lang/language_".$lang.".php";
108 108
         
109
-        if (!is_writable(PMF_ROOT_DIR . "/lang")) {
109
+        if (!is_writable(PMF_ROOT_DIR."/lang")) {
110 110
             $response->setData(0);
111 111
             break;
112 112
         }     
113 113
         
114
-        if (!copy($filename, PMF_ROOT_DIR . "/lang/language_$lang.bak.php")) {
114
+        if (!copy($filename, PMF_ROOT_DIR."/lang/language_$lang.bak.php")) {
115 115
             $response->setData(0);
116 116
             break;
117 117
         }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             if (0 === strpos($key, 'PMF_LANG')) {
134 134
                 $val = "'$val'";
135 135
             }
136
-            array_push($tmpLines, '$' . str_replace(array('[', ']'), array("['", "']"), $key) . " = $val;");
136
+            array_push($tmpLines, '$'.str_replace(array('[', ']'), array("['", "']"), $key)." = $val;");
137 137
         }
138 138
         
139 139
         $newFileContents .= implode("\n", $tmpLines);
@@ -153,17 +153,17 @@  discard block
 block discarded – undo
153 153
          
154 154
         $lang = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING);
155 155
         
156
-        if (!is_writable(PMF_ROOT_DIR . "/lang")) {
156
+        if (!is_writable(PMF_ROOT_DIR."/lang")) {
157 157
             $response->setData(0);
158 158
             break;
159 159
         }     
160 160
         
161
-        if (!copy(PMF_ROOT_DIR . "/lang/language_$lang.php", PMF_ROOT_DIR . "/lang/language_$lang.bak.php")) {
161
+        if (!copy(PMF_ROOT_DIR."/lang/language_$lang.php", PMF_ROOT_DIR."/lang/language_$lang.bak.php")) {
162 162
             $response->setData(0);
163 163
             break;
164 164
         }
165 165
         
166
-        if (!unlink(PMF_ROOT_DIR . "/lang/language_$lang.php")) {
166
+        if (!unlink(PMF_ROOT_DIR."/lang/language_$lang.php")) {
167 167
             $response->setData(0);
168 168
             break;
169 169
         }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             break;
179 179
         }        
180 180
         
181
-        if (!is_writable(PMF_ROOT_DIR . "/lang")) {
181
+        if (!is_writable(PMF_ROOT_DIR."/lang")) {
182 182
             $response->setData(0);
183 183
             break;
184 184
         }
@@ -187,17 +187,17 @@  discard block
 block discarded – undo
187 187
         $langName    = @$languageCodes[$langCode];
188 188
         $langCharset = "UTF-8";
189 189
         $langDir     = PMF_Filter::filterInput(INPUT_POST, 'langdir', FILTER_SANITIZE_STRING);
190
-        $langNPlurals= strval(PMF_Filter::filterVar(@$_POST['langnplurals'], FILTER_VALIDATE_INT, -1));
190
+        $langNPlurals = strval(PMF_Filter::filterVar(@$_POST['langnplurals'], FILTER_VALIDATE_INT, -1));
191 191
         $langDesc    = PMF_Filter::filterInput(INPUT_POST, 'langdesc', FILTER_SANITIZE_STRING);
192
-        $author      = (array) @$_POST['author'];
192
+        $author      = (array)@$_POST['author'];
193 193
         
194
-        if(empty($langCode) || empty($langName) || empty($langCharset) ||
194
+        if (empty($langCode) || empty($langName) || empty($langCharset) ||
195 195
             empty($langDir) || empty($langDesc) || empty($author)) {
196 196
             $response->setData(0);
197 197
             break;
198 198
         }
199 199
         
200
-        $fileTpl     = <<<FILE
200
+        $fileTpl = <<<FILE
201 201
 <?php
202 202
 /**
203 203
  * %s
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         $fileTpl = sprintf($fileTpl, $langDesc, $authorTpl, date('Y-m-d'), $langCode, date('Y'),
232 232
                                      $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals);
233 233
 
234
-        $retval = @file_put_contents(PMF_ROOT_DIR . '/lang/language_' . strtolower($langCode) . '.php', $fileTpl);
234
+        $retval = @file_put_contents(PMF_ROOT_DIR.'/lang/language_'.strtolower($langCode).'.php', $fileTpl);
235 235
         $response->setData(intval($retval));
236 236
     break;
237 237
     
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     case 'send_translated_file':
240 240
         
241 241
         $lang     = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING);
242
-        $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php";
242
+        $filename = PMF_ROOT_DIR."/lang/language_".$lang.".php";
243 243
         
244 244
         if (!file_exists($filename)) {
245 245
             $response->setData(0);
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         $mail->addTo('[email protected]');
259 259
         $mail->addAttachment($filename, null, 'text/plain');
260 260
 
261
-        $response->setData((int) $mail->send());
261
+        $response->setData((int)$mail->send());
262 262
     break;
263 263
 }
264 264
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
         }
230 230
         
231 231
         $fileTpl = sprintf($fileTpl, $langDesc, $authorTpl, date('Y-m-d'), $langCode, date('Y'),
232
-                                     $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals);
232
+                                        $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals);
233 233
 
234 234
         $retval = @file_put_contents(PMF_ROOT_DIR . '/lang/language_' . strtolower($langCode) . '.php', $fileTpl);
235 235
         $response->setData(intval($retval));
Please login to merge, or discard this patch.
phpmyfaq/admin/record.show.php 2 patches
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
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
 ?>
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
     $searchTerm     = PMF_Filter::filterInput(INPUT_POST, 'searchterm', FILTER_SANITIZE_STRIPPED);
150 150
 
151 151
     if (!is_null($linkState)) {
152
-        $cond[PMF_Db::getTablePrefix() . 'faqdata.links_state'] = 'linkbad';
152
+        $cond[PMF_Db::getTablePrefix().'faqdata.links_state'] = 'linkbad';
153 153
         $linkState                             = ' checked="checked" ';
154 154
         $internalSearch                       .= '&amp;linkstate=linkbad';
155 155
     }
156 156
     if (!is_null($searchCat)) {
157
-        $internalSearch .= "&amp;searchcat=" . $searchCat;
158
-        $cond[PMF_Db::getTablePrefix() . 'faqcategoryrelations.category_id'] = array_merge(
157
+        $internalSearch .= "&amp;searchcat=".$searchCat;
158
+        $cond[PMF_Db::getTablePrefix().'faqcategoryrelations.category_id'] = array_merge(
159 159
             array($searchCat),
160 160
             $category->getChildNodes($searchCat)
161 161
         );
@@ -205,30 +205,30 @@  discard block
 block discarded – undo
205 205
 
206 206
     } else {
207 207
 
208
-        $fdTable  = PMF_Db::getTablePrefix() . 'faqdata';
209
-        $fcrTable = PMF_Db::getTablePrefix() . 'faqcategoryrelations';
208
+        $fdTable  = PMF_Db::getTablePrefix().'faqdata';
209
+        $fcrTable = PMF_Db::getTablePrefix().'faqcategoryrelations';
210 210
         $search   = PMF_Search_Factory::create($faqConfig, array('database' => PMF_Db::getType()));
211 211
 
212 212
         $search->setTable($fdTable)
213 213
             ->setResultColumns(array(
214
-                    $fdTable . '.id AS id',
215
-                    $fdTable . '.lang AS lang',
216
-                    $fdTable . '.solution_id AS solution_id',
217
-                    $fcrTable . '.category_id AS category_id',
218
-                    $fdTable . '.sticky AS sticky',
219
-                    $fdTable . '.active AS active',
220
-                    $fdTable . '.thema AS thema',
221
-                    $fdTable . '.content AS content',
222
-                    $fdTable . '.datum AS date'))
214
+                    $fdTable.'.id AS id',
215
+                    $fdTable.'.lang AS lang',
216
+                    $fdTable.'.solution_id AS solution_id',
217
+                    $fcrTable.'.category_id AS category_id',
218
+                    $fdTable.'.sticky AS sticky',
219
+                    $fdTable.'.active AS active',
220
+                    $fdTable.'.thema AS thema',
221
+                    $fdTable.'.content AS content',
222
+                    $fdTable.'.datum AS date'))
223 223
             ->setJoinedTable($fcrTable)
224 224
             ->setJoinedColumns(array(
225
-                    $fdTable . '.id = ' . $fcrTable . '.record_id',
226
-                    $fdTable . '.lang = ' . $fcrTable . '.record_lang'));
225
+                    $fdTable.'.id = '.$fcrTable.'.record_id',
226
+                    $fdTable.'.lang = '.$fcrTable.'.record_lang'));
227 227
 
228 228
         if (is_numeric($searchTerm)) {
229
-            $search->setMatchingColumns(array($fdTable . '.solution_id'));
229
+            $search->setMatchingColumns(array($fdTable.'.solution_id'));
230 230
         } else {
231
-            $search->setMatchingColumns(array($fdTable . '.thema', $fdTable . '.content', $fdTable . '.keywords'));
231
+            $search->setMatchingColumns(array($fdTable.'.thema', $fdTable.'.content', $fdTable.'.keywords'));
232 232
         }
233 233
 
234 234
         $result         = $search->search($searchTerm);
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
         }
292 292
         
293 293
         foreach ($faq->faqRecords as $record) {
294
-            $catInfo =  '';
294
+            $catInfo = '';
295 295
             $cid     = $record['category_id'];
296 296
             
297 297
             if (isset($numRecordsByCat[$cid]) && ($numRecordsByCat[$cid] > 0)) {
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
         <p>
331 331
             <a class="btn showhideCategory" data-category-id="<?php echo $cid; ?>">
332 332
                 <i class="icon fa fa-arrow-right"></i>
333
-                <strong><?php echo $category->getPath($cid); ?></strong> <?php echo $catInfo;?>
333
+                <strong><?php echo $category->getPath($cid); ?></strong> <?php echo $catInfo; ?>
334 334
             </a>
335 335
         </p>
336 336
         <div id="category_<?php echo $cid; ?>" style="display: none;">
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 <?php
387 387
             }
388 388
 ?>
389
-        <tr id="record_<?php echo $record['id'] . '_' . $record['lang']; ?>">
389
+        <tr id="record_<?php echo $record['id'].'_'.$record['lang']; ?>">
390 390
             <td style="width: 24px; text-align: right;">
391 391
                 <a href="?action=editentry&amp;id=<?php echo $record['id']; ?>&amp;lang=<?php echo $record['lang']; ?>">
392 392
                     <?php echo $record['id']; ?>
@@ -403,17 +403,17 @@  discard block
 block discarded – undo
403 403
             </td>
404 404
             <td style="width: 56px;">
405 405
                 <input type="checkbox" lang="<?php echo $record['lang'] ?>"
406
-                       onclick="saveStatus(<?php echo $cid . ', [' . $record['id'] . ']' ?>, 'sticky');"
407
-                       id="sticky_record_<?php echo $cid . '_' . $record['id'] ?>"
408
-                    <?php echo ($record['sticky'] ? 'checked' :  '    ') ?>>
406
+                       onclick="saveStatus(<?php echo $cid.', ['.$record['id'].']' ?>, 'sticky');"
407
+                       id="sticky_record_<?php echo $cid.'_'.$record['id'] ?>"
408
+                    <?php echo ($record['sticky'] ? 'checked' : '    ') ?>>
409 409
             </td>
410 410
             <td>
411 411
                 <?php if ($user->perm->checkRight($user->getUserId(), 'approverec') && isset($numVisits[$record['id']])) { ?>
412 412
                 <input type="checkbox" lang="<?php echo $record['lang'] ?>"
413
-                       onclick="saveStatus(<?php echo $cid . ', [' . $record['id'] . ']' ?>, 'active');"
414
-                       id="active_record_<?php echo $cid . '_' . $record['id'] ?>"
413
+                       onclick="saveStatus(<?php echo $cid.', ['.$record['id'].']' ?>, 'active');"
414
+                       id="active_record_<?php echo $cid.'_'.$record['id'] ?>"
415 415
                     <?php echo ('yes' == $record['active'] ? 'checked' : '    ') ?>>
416
-                <?php }  else { ?>
416
+                <?php } else { ?>
417 417
                 <span class="label label-important"><i class="fa fa-white fa fa-ban-circle"></i></span>
418 418
                 <?php } ?>
419 419
             </td>
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
     if ('' === $categoryId) {
484 484
         $categoryId = 0;
485 485
     }
486
-    echo "                id_map[" . $categoryId . "] = [" . implode(',', $recordIds) . "];\n";
486
+    echo "                id_map[".$categoryId."] = [".implode(',', $recordIds)."];\n";
487 487
 }
488 488
 ?>
489 489
             for (var i = 0; i < id_map[id].length; i++) {
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
          */
559 559
         function deleteRecord(record_id, record_lang)
560 560
         {
561
-            if (confirm('<?php echo addslashes($PMF_LANG["ad_entry_del_1"] . " " . $PMF_LANG["ad_entry_del_3"]); ?>')) {
561
+            if (confirm('<?php echo addslashes($PMF_LANG["ad_entry_del_1"]." ".$PMF_LANG["ad_entry_del_3"]); ?>')) {
562 562
                 $('#saving_data_indicator').html('<img src="images/indicator.gif" /> deleting ...');
563 563
                 $.ajax({
564 564
                     type:    "POST",
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -413,7 +413,7 @@
 block discarded – undo
413 413
                        onclick="saveStatus(<?php echo $cid . ', [' . $record['id'] . ']' ?>, 'active');"
414 414
                        id="active_record_<?php echo $cid . '_' . $record['id'] ?>"
415 415
                     <?php echo ('yes' == $record['active'] ? 'checked' : '    ') ?>>
416
-                <?php }  else { ?>
416
+                <?php } else { ?>
417 417
                 <span class="label label-important"><i class="fa fa-white fa fa-ban-circle"></i></span>
418 418
                 <?php } ?>
419 419
             </td>
Please login to merge, or discard this patch.
phpmyfaq/admin/record.filemanager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
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
-$rootPath   = dirname(dirname(__DIR__)) . 'images/';
29
+$rootPath   = dirname(dirname(__DIR__)).'images/';
30 30
 $fileSystem = new PMF_Filesystem($rootPath);
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
phpmyfaq/admin/category.cut.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
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
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     foreach ($category->catTree as $cat) {
49 49
         $indent = str_repeat('…', $cat['indent']);
50 50
         if ($id != $cat['id']) {
51
-            $templateVars['categoryOptions'][$cat['id']] = $indent . $cat['name'];
51
+            $templateVars['categoryOptions'][$cat['id']] = $indent.$cat['name'];
52 52
         }
53 53
     }
54 54
 
Please login to merge, or discard this patch.
phpmyfaq/admin/record.edit.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
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
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         $faqData['id'] = PMF_Filter::filterInput(INPUT_POST, 'id', FILTER_VALIDATE_INT);
74 74
         if (!is_null($faqData['id'])) {
75
-            $queryString = 'saveentry&amp;id=' . $faqData['id'];
75
+            $queryString = 'saveentry&amp;id='.$faqData['id'];
76 76
         } else {
77 77
             $queryString = 'insertentry';
78 78
         }
@@ -114,14 +114,14 @@  discard block
 block discarded – undo
114 114
         $lang = PMF_Filter::filterInput(INPUT_GET, 'lang', FILTER_SANITIZE_STRING);
115 115
         if ((!isset($selectedCategory) && !isset($faqData['title'])) || !is_null($id)) {
116 116
             $logging = new PMF_Logging($faqConfig);
117
-            $logging->logAdmin($user, 'Beitragedit, ' . $id);
117
+            $logging->logAdmin($user, 'Beitragedit, '.$id);
118 118
 
119 119
             $categories = $category->getCategoryRelationsFromArticle($id, $lang);
120 120
 
121 121
             $faq->getRecord($id, null, true);
122 122
             $faqData         = $faq->faqRecord;
123 123
             $faqData['tags'] = implode(',', $tagging->getAllTagsById($faqData['id']));
124
-            $queryString     = 'saveentry&amp;id=' . $faqData['id'];
124
+            $queryString     = 'saveentry&amp;id='.$faqData['id'];
125 125
         } else {
126 126
             $queryString = 'insertentry';
127 127
         }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
                                     <?php
335 335
                                     if (0 === $faqData['id']) {
336 336
                                         $faqData['id'] = $faqConfig->getDb()->nextId(
337
-                                            PMF_Db::getTablePrefix() . 'faqdata',
337
+                                            PMF_Db::getTablePrefix().'faqdata',
338 338
                                             'id'
339 339
                                         );
340 340
                                     }
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
                     <div class="panel-body">
570 570
                         <div class="form-group">
571 571
                             <div class="col-lg-offset-1 col-lg-10">
572
-                                <?php if($user->perm->checkRight($user->getUserId(), 'approverec')):
572
+                                <?php if ($user->perm->checkRight($user->getUserId(), 'approverec')):
573 573
                                     if (isset($faqData['active']) && $faqData['active'] == 'yes') {
574 574
                                         $suf = ' checked';
575 575
                                         $sul = null;
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -589,10 +589,13 @@  discard block
 block discarded – undo
589 589
                                         <input type="radio" name="active"  value="no"<?php if (isset($sul)) { echo $sul; } ?> />
590 590
                                         <?php echo $PMF_LANG['ad_gen_no']; ?>
591 591
                                     </label>
592
-                                <?php else: ?>
592
+                                <?php else {
593
+    : ?>
593 594
                                     <label class="radio">
594 595
                                         <input type="radio" name="active"  value="no" checked />
595
-                                        <?php echo $PMF_LANG['ad_gen_no']; ?>
596
+                                        <?php echo $PMF_LANG['ad_gen_no'];
597
+}
598
+?>
596 599
                                     </label>
597 600
                                 <?php endif; ?>
598 601
                             </div>
@@ -647,9 +650,12 @@  discard block
 block discarded – undo
647 650
                             </div>
648 651
                         </div>
649 652
                     </div>
650
-                    <?php else: ?>
653
+                    <?php else {
654
+    : ?>
651 655
                         <input type="hidden" name="grouppermission" value="all" />
652
-                    <?php endif; ?>
656
+                    <?php endif;
657
+}
658
+?>
653 659
                     <div class="panel-heading">
654 660
                         <?php echo $PMF_LANG['ad_entry_userpermission']; ?>
655 661
                     </div>
Please login to merge, or discard this patch.