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
Pull Request — master (#1281)
by
unknown
10:31
created
phpmyfaq/translate.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
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         'msgNewTranslationAddon'    => $PMF_LANG['msgNewTranslationAddon'],
84 84
         'msgNewTransSourcePane'     => $PMF_LANG['msgNewTransSourcePane'],
85 85
         'msgNewTranslationPane'     => $PMF_LANG['msgNewTranslationPane'],
86
-        'writeSendAdress'           => '?' . $sids . 'action=save',
86
+        'writeSendAdress'           => '?'.$sids.'action=save',
87 87
         'defaultContentName'        => ($user ? $user->getUserData('display_name') : ''),
88 88
         'defaultContentMail'        => ($user ? $user->getUserData('email') : ''),
89 89
         'msgNewTranslationQuestion' => $PMF_LANG['msgNewContentTheme'],
Please login to merge, or discard this patch.
phpmyfaq/opensearch.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 
20 20
 define('IS_VALID_PHPMYFAQ', null);
21 21
 
22
-require __DIR__ . '/inc/Bootstrap.php';
23
-require PMF_LANGUAGE_DIR . '/' . $faqConfig->get('main.language');
22
+require __DIR__.'/inc/Bootstrap.php';
23
+require PMF_LANGUAGE_DIR.'/'.$faqConfig->get('main.language');
24 24
 
25 25
 $baseUrl   = $faqConfig->get('main.referenceURL');
26
-$searchUrl = $baseUrl . '/index.php?action=search';
26
+$searchUrl = $baseUrl.'/index.php?action=search';
27 27
 
28 28
 $xml = new XMLWriter();
29 29
 $xml->openMemory();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 $xml->writeElement('Description', $faqConfig->get('main.metaDescription'));
37 37
 $xml->startElement('Url');
38 38
 $xml->writeAttribute('type', 'text/html');
39
-$xml->writeAttribute('template', $searchUrl . '&search={searchTerms}');
39
+$xml->writeAttribute('template', $searchUrl.'&search={searchTerms}');
40 40
 $xml->endElement();
41 41
 $xml->writeElement('Language', $PMF_LANG['metaLanguage']);
42 42
 $xml->writeElement('OutputEncoding', 'utf-8');
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 $xml->writeAttribute('height', 16);
46 46
 $xml->writeAttribute('width', 16);
47 47
 $xml->writeAttribute('type', 'image/png');
48
-$xml->text($baseUrl . '/assets/img/pmfsearch.png');
48
+$xml->text($baseUrl.'/assets/img/pmfsearch.png');
49 49
 
50 50
 $xml->endDocument();
51 51
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,6 +54,6 @@
 block discarded – undo
54 54
 header('Content-type: text/xml');
55 55
 print $xml->outputMemory(true);
56 56
 $response = Response::create()
57
-	->setContent($opensearchXml->outputMemory(true));
57
+    ->setContent($opensearchXml->outputMemory(true));
58 58
 $response->headers->set('Content-Type', 'text/xml');
59 59
 $response->send();
Please login to merge, or discard this patch.
phpmyfaq/ajaxservice.php 4 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -602,8 +602,8 @@  discard block
 block discarded – undo
602 602
 
603 603
                 $message = array(
604 604
                     'success' => trim($PMF_LANG['successMessage']) .
605
-                                 ' ' .
606
-                                 trim($PMF_LANG['msgRegThankYou'])
605
+                                    ' ' .
606
+                                    trim($PMF_LANG['msgRegThankYou'])
607 607
                 );
608 608
             }
609 609
 
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
         $mailto   = PMF_Filter::filterInputArray(INPUT_POST,
699 699
             array('mailto' =>
700 700
                 array('filter' => FILTER_VALIDATE_EMAIL,
701
-                      'flags'  => FILTER_REQUIRE_ARRAY | FILTER_NULL_ON_FAILURE
701
+                        'flags'  => FILTER_REQUIRE_ARRAY | FILTER_NULL_ON_FAILURE
702 702
                 )
703 703
             )
704 704
         );
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -630,7 +630,7 @@
 block discarded – undo
630 630
 
631 631
             if (!$faq->getNumberOfVotings($recordId)) {
632 632
                 $faq->addVoting($votingData);
633
-            }  else {
633
+            } else {
634 634
                 $faq->updateVoting($votingData);
635 635
             }
636 636
             $faqRating = new PMF_Rating($faqConfig);
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 if (PMF_Language::isASupportedLanguage($ajaxlang)) {
42 42
     $languageCode = trim($ajaxlang);
43
-    require_once 'lang/language_' . $languageCode . '.php';
43
+    require_once 'lang/language_'.$languageCode.'.php';
44 44
 } else {
45 45
     $languageCode = 'en';
46 46
     require_once 'lang/language_en.php';
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
                 }
183 183
                 
184 184
                 $commentMail =
185
-                    'User: ' . $commentData['username'] . ', mailto:'. $commentData['usermail'] . "\n".
186
-                    'New comment posted on: ' . $urlToContent .
187
-                    "\n\n" .
185
+                    'User: '.$commentData['username'].', mailto:'.$commentData['usermail']."\n".
186
+                    'New comment posted on: '.$urlToContent.
187
+                    "\n\n".
188 188
                     wordwrap($comment, 72);
189 189
 
190 190
                 $send = [];
@@ -394,9 +394,9 @@  discard block
 block discarded – undo
394 394
 
395 395
             // @todo let the email contains the faq article both as plain text and as HTML
396 396
             $mail->message = html_entity_decode(
397
-                $PMF_LANG['msgMailCheck']) . "\n\n" .
398
-                $faqConfig->get('main.titleFAQ') . ": " .
399
-                $faqConfig->get('main.referenceURL') . '/admin/';
397
+                $PMF_LANG['msgMailCheck'])."\n\n".
398
+                $faqConfig->get('main.titleFAQ').": ".
399
+                $faqConfig->get('main.referenceURL').'/admin/';
400 400
             $result = $mail->send();
401 401
             unset($mail);
402 402
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
                     $searchResult[] = $faqSearch->search($word);
464 464
                 }
465 465
                 foreach ($searchResult as $resultSet) {
466
-                    foreach($resultSet as $result) {
466
+                    foreach ($resultSet as $result) {
467 467
                         $mergedResult[] = $result;
468 468
                     }
469 469
                 }
@@ -500,11 +500,11 @@  discard block
 block discarded – undo
500 500
 
501 501
                     $faq->addQuestion($questionData);
502 502
 
503
-                    $questionMail = "User: " . $questionData['username'] .
504
-                                ", mailto:".$questionData['email'] . "\n" . $PMF_LANG["msgCategory"] .
505
-                                ": " . $categories[$questionData['category_id']]["name"] . "\n\n" .
506
-                                wordwrap($question, 72) . "\n\n" .
507
-                                $faqConfig->get('main.referenceURL') . '/admin/';
503
+                    $questionMail = "User: ".$questionData['username'].
504
+                                ", mailto:".$questionData['email']."\n".$PMF_LANG["msgCategory"].
505
+                                ": ".$categories[$questionData['category_id']]["name"]."\n\n".
506
+                                wordwrap($question, 72)."\n\n".
507
+                                $faqConfig->get('main.referenceURL').'/admin/';
508 508
 
509 509
                     $userId = $cat->getCategoryUser($questionData['category_id']);
510 510
                     $oUser  = new PMF_User($faqConfig);
@@ -532,11 +532,11 @@  discard block
 block discarded – undo
532 532
 
533 533
                 $faq->addQuestion($questionData);
534 534
 
535
-                $questionMail = "User: " . $questionData['username'] .
536
-                                ", mailto:".$questionData['email'] . "\n" . $PMF_LANG["msgCategory"] .
537
-                                ": " . $categories[$questionData['category_id']]["name"] . "\n\n" .
538
-                                wordwrap($question, 72) . "\n\n" .
539
-                                $faqConfig->get('main.referenceURL') . '/admin/';
535
+                $questionMail = "User: ".$questionData['username'].
536
+                                ", mailto:".$questionData['email']."\n".$PMF_LANG["msgCategory"].
537
+                                ": ".$categories[$questionData['category_id']]["name"]."\n\n".
538
+                                wordwrap($question, 72)."\n\n".
539
+                                $faqConfig->get('main.referenceURL').'/admin/';
540 540
 
541 541
                 $userId = $cat->getCategoryUser($questionData['category_id']);
542 542
                 $oUser  = new PMF_User($faqConfig);
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
                 $user->setStatus('blocked');
592 592
 
593 593
                 $text = sprintf(
594
-                    "New user has been registrated:\n\nName: %s\nLogin name: %s\n\n" .
594
+                    "New user has been registrated:\n\nName: %s\nLogin name: %s\n\n".
595 595
                     "To activate this user do please use the administration interface at %s.",
596 596
                     $realname,
597 597
                     $loginname,
@@ -607,8 +607,8 @@  discard block
 block discarded – undo
607 607
                 unset($mail);
608 608
 
609 609
                 $message = array(
610
-                    'success' => trim($PMF_LANG['successMessage']) .
611
-                                 ' ' .
610
+                    'success' => trim($PMF_LANG['successMessage']).
611
+                                 ' '.
612 612
                                  trim($PMF_LANG['msgRegThankYou'])
613 613
                 );
614 614
             }
@@ -641,10 +641,10 @@  discard block
 block discarded – undo
641 641
 
642 642
             if (!$faq->getNumberOfVotings($recordId)) {
643 643
                 $faq->addVoting($votingData);
644
-            }  else {
644
+            } else {
645 645
                 $faq->updateVoting($votingData);
646 646
             }
647
-            $faqRating   = new PMF_Rating($faqConfig);
647
+            $faqRating = new PMF_Rating($faqConfig);
648 648
             $message = array(
649 649
                 'success' => $PMF_LANG['msgVoteThanks'],
650 650
                 'rating'  => $faqRating->getVotingResult($recordId)
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
             $mail = new PMF_Mail($faqConfig);
696 696
             $mail->setReplyTo($email, $name);
697 697
             $mail->addTo($faqConfig->get('main.administrationMail'));
698
-            $mail->subject = 'Feedback: %sitename%';;
698
+            $mail->subject = 'Feedback: %sitename%'; ;
699 699
             $mail->message = $question;
700 700
             $result = $mail->send();
701 701
             unset($mail);
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
             is_array($mailto) && !empty($mailto['mailto'][0]) &&
727 727
                 $stopwords->checkBannedWord(PMF_String::htmlspecialchars($attached))) {
728 728
 
729
-            foreach($mailto['mailto'] as $recipient) {
729
+            foreach ($mailto['mailto'] as $recipient) {
730 730
                 $recipient = trim(strip_tags($recipient));
731 731
                 if (!empty($recipient)) {
732 732
                     $mail = new PMF_Mail($faqConfig);
@@ -816,16 +816,16 @@  discard block
 block discarded – undo
816 816
 
817 817
             if ($loginExist && ($email == $user->getUserData('email'))) {
818 818
                 $consonants = array(
819
-                    'b','c','d','f','g','h','j','k','l','m','n','p','r','s','t','v','w','x','y','z'
819
+                    'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z'
820 820
                 );
821 821
                 $vowels = array(
822
-                    'a','e','i','o','u'
822
+                    'a', 'e', 'i', 'o', 'u'
823 823
                 );
824 824
                 $newPassword = '';
825 825
                 srand((double)microtime()*1000000);
826 826
                 for ($i = 1; $i <= 4; $i++) {
827
-                    $newPassword .= $consonants[rand(0,19)];
828
-                    $newPassword .= $vowels[rand(0,4)];
827
+                    $newPassword .= $consonants[rand(0, 19)];
828
+                    $newPassword .= $vowels[rand(0, 4)];
829 829
                 }
830 830
                 $user->changePassword($newPassword);
831 831
                 $text = $PMF_LANG['lostpwd_text_1']."\nUsername: ".$username."\nNew Password: ".$newPassword."\n\n".$PMF_LANG["lostpwd_text_2"];
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
 
25 25
 use Symfony\Component\HttpFoundation\RedirectResponse;
26 26
 use Symfony\Component\HttpFoundation\Response;
27
-
28 27
 use PMF\Helper\ResponseWrapper;
29 28
 
30 29
 //
Please login to merge, or discard this patch.
phpmyfaq/config/constants_ldap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  */
20 20
 
21 21
 // Datamapping - in this example for an ADS
22
-$PMF_LDAP['ldap_mapping'] = array (
22
+$PMF_LDAP['ldap_mapping'] = array(
23 23
     'name'     => 'cn',
24 24
     'username' => 'samAccountName',
25 25
     'mail'     => 'mail'
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 // LDAP-options to set
34 34
 // refer to the documentation of ldap_set_option() for information on available options
35
-$PMF_LDAP["ldap_options"] = array (
35
+$PMF_LDAP["ldap_options"] = array(
36 36
     LDAP_OPT_PROTOCOL_VERSION => 3,
37 37
     LDAP_OPT_REFERRALS        => 0
38 38
 );
Please login to merge, or discard this patch.
phpmyfaq/sitemap.xml.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $changeFreq = PMF_SITEMAP_GOOGLE_CHANGEFREQ_DAILY;
71 71
     }
72 72
     $node =
73
-         '<url>'
73
+            '<url>'
74 74
         .'<loc>'.PMF_String::htmlspecialchars($location).'</loc>'
75 75
         .'<lastmod>'.$lastmod.'</lastmod>'
76 76
         .'<changefreq>'.$changeFreq.'</changefreq>'
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 // Sitemap header
103 103
 $sitemap =
104
-     '<?xml version="1.0" encoding="UTF-8"?>'
104
+        '<?xml version="1.0" encoding="UTF-8"?>'
105 105
     .'<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"'
106 106
     .' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
107 107
     .' xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84'
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 $visitMin  = 0;
99 99
 if (count($items) > 0) {
100 100
     $visitsMax = $items[0]['visits'];
101
-    $visitMin  = $items[count($items)-1]['visits'];
101
+    $visitMin  = $items[count($items) - 1]['visits'];
102 102
 }
103 103
 
104 104
 // Sitemap header
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 foreach ($items as $item) {
121 121
     $priority = PMF_SITEMAP_GOOGLE_PRIORITY_DEFAULT;
122 122
     if (($visitsMax - $visitMin) > 0) {
123
-        $priority = sprintf('%.1f', PMF_SITEMAP_GOOGLE_PRIORITY_DEFAULT * (1 + (($item['visits'] - $visitMin)/($visitsMax - $visitMin))));
123
+        $priority = sprintf('%.1f', PMF_SITEMAP_GOOGLE_PRIORITY_DEFAULT*(1 + (($item['visits'] - $visitMin)/($visitsMax - $visitMin))));
124 124
     }
125 125
     // a. We use plain PMF urls w/o any SEO schema
126 126
     $link = str_replace($_SERVER['SCRIPT_NAME'], '/index.php', $item['url']);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     if (function_exists('gzencode')) {
152 152
         $sitemapGz = gzencode($sitemap);
153 153
         $response->headers->set('Content-Type', 'application/x-gzip');
154
-        $response->headers->set('Content-Disposition', 'attachment; filename="' . PMF_SITEMAP_GOOGLE_FILENAME_GZ . '"');
154
+        $response->headers->set('Content-Disposition', 'attachment; filename="'.PMF_SITEMAP_GOOGLE_FILENAME_GZ.'"');
155 155
         $response->headers->set('Content-Length', strlen($sitemapGz));
156 156
         $response->setContent($sitemapGz);
157 157
     } else {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     }
160 160
 } else {
161 161
     $response->headers->set('Content-Type', 'text/xml');
162
-    $response->headers->set('Content-Disposition', 'inline; filename="' . PMF_SITEMAP_GOOGLE_FILENAME . '"');
162
+    $response->headers->set('Content-Disposition', 'inline; filename="'.PMF_SITEMAP_GOOGLE_FILENAME.'"');
163 163
     $response->headers->set('Content-Length', PMF_String::strlen($sitemap));
164 164
     $response->setContent($sitemap);
165 165
 }
Please login to merge, or discard this patch.
phpmyfaq/admin/ajax.config_list.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
                         echo PMF_Language::languageOptions(
99 99
                             str_replace(
100 100
                                 array(
101
-                                     'language_',
102
-                                     '.php'
101
+                                        'language_',
102
+                                        '.php'
103 103
                                 ),
104 104
                                 '',
105 105
                                 $faqConfig->get('main.language')
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                     } else {
111 111
                         echo '<option value="language_en.php">English</option>';
112 112
                     }
113
-                   break;
113
+                    break;
114 114
                 
115 115
                 case 'records.orderby':
116 116
                     echo PMF_Configuration::sortingOptions($faqConfig->get($key));
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                                   ? ' selected="selected"'
148 148
                                   : '';
149 149
                         printf('<option value="%d"%s>%s</option>',
150
-                               $i, $selected, $item);
150
+                                $i, $selected, $item);
151 151
                     }
152 152
                     break;
153 153
                     
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  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
-require PMF_ROOT_DIR . '/inc/libs/twitteroauth/twitteroauth.php';
30
+require PMF_ROOT_DIR.'/inc/libs/twitteroauth/twitteroauth.php';
31 31
 
32 32
 if (!empty($_SESSION['access_token'])) {
33 33
     $connection = new TwitterOAuth(
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                     $templates = $faqSystem->getAvailableTemplates();
135 135
 
136 136
                     foreach ($templates as $template => $selected) {
137
-                        printf ("<option%s>%s</option>",
137
+                        printf("<option%s>%s</option>",
138 138
                             ($selected === true ? ' selected="selected"' : ''),
139 139
                             $template
140 140
                         );
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     break;
143 143
                     
144 144
                 case "records.attachmentsStorageType":
145
-                    foreach($PMF_LANG['att_storage_type'] as $i => $item) {
145
+                    foreach ($PMF_LANG['att_storage_type'] as $i => $item) {
146 146
                         $selected = $faqConfig->get($key) == $i
147 147
                                   ? ' selected="selected"'
148 148
                                   : '';
@@ -226,18 +226,18 @@  discard block
 block discarded – undo
226 226
 
227 227
                 echo '<a target="_blank" href="https://dev.twitter.com/apps/new">Create Twitter App for your FAQ</a>';
228 228
                 echo "<br />\n";
229
-                echo "Your Callback URL is: " .$faqConfig->get('main.referenceURL') . "/services/twitter/callback.php";
229
+                echo "Your Callback URL is: ".$faqConfig->get('main.referenceURL')."/services/twitter/callback.php";
230 230
             }
231 231
 
232 232
             if (!isset($content)) {
233 233
                 echo '<a target="_blank" href="../services/twitter/redirect.php">';
234 234
                 echo '<img src="../assets/img/twitter.signin.png" alt="Sign in with Twitter"/></a>';
235 235
             } elseif (isset($content)) {
236
-                echo $content->screen_name . "<br />\n";
237
-                echo "<img src='" . $content->profile_image_url_https . "'><br />\n";
238
-                echo "Follower: " . $content->followers_count . "<br />\n";
239
-                echo "Status Count: " . $content->statuses_count . "<br />\n";
240
-                echo "Status: " . $content->status->text;
236
+                echo $content->screen_name."<br />\n";
237
+                echo "<img src='".$content->profile_image_url_https."'><br />\n";
238
+                echo "Follower: ".$content->followers_count."<br />\n";
239
+                echo "Status Count: ".$content->statuses_count."<br />\n";
240
+                echo "Status: ".$content->status->text;
241 241
             }
242 242
             echo '</div>';
243 243
             echo '</div>';
Please login to merge, or discard this patch.
phpmyfaq/admin/ajax.records.php 1 patch
Spacing   +5 added lines, -5 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
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     $items[0][2] = 0;
49 49
 }
50 50
 
51
-switch($ajax_action) {
51
+switch ($ajax_action) {
52 52
 
53 53
     // save active FAQs
54 54
     case 'save_active_records':
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             $recordLang = PMF_Filter::filterInput(INPUT_POST, 'record_lang', FILTER_SANITIZE_STRING);
120 120
 
121 121
             $logging = new PMF_Logging($faqConfig);
122
-            $logging->logAdmin($user, 'Deleted FAQ ID ' . $recordId);
122
+            $logging->logAdmin($user, 'Deleted FAQ ID '.$recordId);
123 123
 
124 124
             $faq->deleteRecord($recordId, $recordLang);
125 125
             echo $PMF_LANG['ad_entry_delsuc'];
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     case 'delete_question':
134 134
         if ($permission['delquestion']) {
135 135
 
136
-            $checks  = array(
136
+            $checks = array(
137 137
                 'filter'  => FILTER_VALIDATE_INT,
138 138
                 'flags'   => FILTER_REQUIRE_ARRAY
139 139
             );
Please login to merge, or discard this patch.
phpmyfaq/admin/record.show.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -407,7 +407,7 @@
 block discarded – undo
407 407
                        onclick="saveStatus(<?php print $cid . ', [' . $record['id'] . ']' ?>, 'active', '<?php echo $user->getCsrfTokenFromSession() ?>');"
408 408
                        id="active_record_<?php print $cid . '_' . $record['id'] ?>"
409 409
                     <?php 'yes' == $record['active'] ? print 'checked="checked"' : print '    ' ?> />
410
-                <?php }  else { ?>
410
+                <?php } else { ?>
411 411
                 <span class="label label-important"><i class="icon-white icon-ban-circle"></i></span>
412 412
                 <?php } ?>
413 413
             </td>
Please login to merge, or discard this patch.
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.
phpmyfaq/admin/report.view.php 1 patch
Spacing   +12 added lines, -12 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
 
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
         <thead>
49 49
             <tr>
50 50
 <?php
51
-    ($useCategory)     ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_category']) : '';
52
-    ($useSubcategory)  ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sub_category']) : '';
53
-    ($useTranslation)  ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_translations']) : '';
54
-    ($useLanguage)     ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_language']) : '';
55
-    ($useId)           ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_id']) : '';
56
-    ($useSticky)       ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sticky']) : '';
57
-    ($useTitle)        ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_title']) : '';
51
+    ($useCategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_category']) : '';
52
+    ($useSubcategory) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sub_category']) : '';
53
+    ($useTranslation) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_translations']) : '';
54
+    ($useLanguage) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_language']) : '';
55
+    ($useId) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_id']) : '';
56
+    ($useSticky) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_sticky']) : '';
57
+    ($useTitle) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_title']) : '';
58 58
     ($useCreationDate) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_creation_date']) : '';
59
-    ($useOwner)        ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_owner']) : '';
59
+    ($useOwner) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_owner']) : '';
60 60
     ($useLastModified) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_last_modified_person']) : '';
61
-    ($useUrl)          ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_url']) : '';
62
-    ($useVisits)       ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_visits']) : '';
61
+    ($useUrl) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_url']) : '';
62
+    ($useVisits) ? printf('<th>%s</th>', $PMF_LANG['ad_stat_report_visits']) : '';
63 63
 ?>
64 64
             </tr>
65 65
         </thead>
Please login to merge, or discard this patch.