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 — 2.8 ( fdce9e...41d2f7 )
by Thorsten
37:41 queued 22:06
created
phpmyfaq/admin/ajax.records.php 1 patch
Switch Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -51,102 +51,102 @@
 block discarded – undo
51 51
 switch($ajax_action) {
52 52
 
53 53
     // save active FAQs
54
-    case 'save_active_records':
55
-        if ($permission['approverec']) {
56
-            if (!empty($items)) {
57
-                $faq = new PMF_Faq($faqConfig);
54
+        case 'save_active_records':
55
+            if ($permission['approverec']) {
56
+                if (!empty($items)) {
57
+                    $faq = new PMF_Faq($faqConfig);
58 58
                 
59
-                foreach ($items as $item) {
60
-                    if (is_array($item) && count($item) == 3 && PMF_Language::isASupportedLanguage($item[1])) {
61
-                        echo $faq->updateRecordFlag((int)$item[0], addslashes($item[1]), $item[2], 'active');
59
+                    foreach ($items as $item) {
60
+                        if (is_array($item) && count($item) == 3 && PMF_Language::isASupportedLanguage($item[1])) {
61
+                            echo $faq->updateRecordFlag((int)$item[0], addslashes($item[1]), $item[2], 'active');
62
+                        }
62 63
                     }
63 64
                 }
65
+            } else {
66
+                echo $PMF_LANG['err_NotAuth'];
64 67
             }
65
-        } else {
66
-            echo $PMF_LANG['err_NotAuth'];
67
-        }
68
-        break;
68
+            break;
69 69
 
70
-    // save sticky FAQs
71
-    case 'save_sticky_records':
72
-        if ($permission['editbt']) {
70
+        // save sticky FAQs
71
+        case 'save_sticky_records':
72
+            if ($permission['editbt']) {
73 73
 
74
-            if (!empty($items)) {
75
-                $faq = new PMF_Faq($faqConfig);
74
+                if (!empty($items)) {
75
+                    $faq = new PMF_Faq($faqConfig);
76 76
 
77
-                foreach ($items as $item) {
78
-                    if (is_array($item) && count($item) == 3 && PMF_Language::isASupportedLanguage($item[1])) {
79
-                        echo $faq->updateRecordFlag((int)$item[0], addslashes($item[1]), $item[2], 'sticky');
77
+                    foreach ($items as $item) {
78
+                        if (is_array($item) && count($item) == 3 && PMF_Language::isASupportedLanguage($item[1])) {
79
+                            echo $faq->updateRecordFlag((int)$item[0], addslashes($item[1]), $item[2], 'sticky');
80
+                        }
80 81
                     }
81 82
                 }
83
+            } else {
84
+                echo $PMF_LANG['err_NotAuth'];
82 85
             }
83
-        } else {
84
-            echo $PMF_LANG['err_NotAuth'];
85
-        }
86
-        break;
86
+            break;
87 87
 
88
-    // search FAQs for suggestions
89
-    case 'search_records':
90
-        if ($permission['editbt']) {
88
+        // search FAQs for suggestions
89
+        case 'search_records':
90
+            if ($permission['editbt']) {
91 91
 
92
-            $faq             = new PMF_Faq($faqConfig);
93
-            $faqSearch       = new PMF_Search($faqConfig);
94
-            $faqSearchResult = new PMF_Search_Resultset($user, $faq, $faqConfig);
95
-            $searchResult    = '';
96
-            $searchString    = PMF_Filter::filterInput(INPUT_POST, 'search', FILTER_SANITIZE_STRIPPED);
92
+                $faq             = new PMF_Faq($faqConfig);
93
+                $faqSearch       = new PMF_Search($faqConfig);
94
+                $faqSearchResult = new PMF_Search_Resultset($user, $faq, $faqConfig);
95
+                $searchResult    = '';
96
+                $searchString    = PMF_Filter::filterInput(INPUT_POST, 'search', FILTER_SANITIZE_STRIPPED);
97 97
 
98
-            if (!is_null($searchString)) {
99
-                $searchResult = $faqSearch->search($searchString, false);
98
+                if (!is_null($searchString)) {
99
+                    $searchResult = $faqSearch->search($searchString, false);
100 100
 
101
-                $faqSearchResult->reviewResultset($searchResult);
101
+                    $faqSearchResult->reviewResultset($searchResult);
102 102
 
103
-                $searchHelper = new PMF_Helper_Search($faqConfig);
104
-                $searchHelper->setSearchterm($searchString);
103
+                    $searchHelper = new PMF_Helper_Search($faqConfig);
104
+                    $searchHelper->setSearchterm($searchString);
105 105
 
106
-                echo $searchHelper->renderAdminSuggestionResult($faqSearchResult);
107
-            }
106
+                    echo $searchHelper->renderAdminSuggestionResult($faqSearchResult);
107
+                }
108 108
             
109
-        } else {
110
-            echo $PMF_LANG['err_NotAuth'];
111
-        }
112
-        break;
109
+            } else {
110
+                echo $PMF_LANG['err_NotAuth'];
111
+            }
112
+            break;
113 113
 
114
-    // delete FAQs
115
-    case 'delete_record':
116
-        if ($permission['delbt']) {
114
+        // delete FAQs
115
+        case 'delete_record':
116
+            if ($permission['delbt']) {
117 117
 
118
-            $recordId   = PMF_Filter::filterInput(INPUT_POST, 'record_id', FILTER_VALIDATE_INT);
119
-            $recordLang = PMF_Filter::filterInput(INPUT_POST, 'record_lang', FILTER_SANITIZE_STRING);
118
+                $recordId   = PMF_Filter::filterInput(INPUT_POST, 'record_id', FILTER_VALIDATE_INT);
119
+                $recordLang = PMF_Filter::filterInput(INPUT_POST, 'record_lang', FILTER_SANITIZE_STRING);
120 120
 
121
-            $logging = new PMF_Logging($faqConfig);
122
-            $logging->logAdmin($user, 'Deleted FAQ ID ' . $recordId);
121
+                $logging = new PMF_Logging($faqConfig);
122
+                $logging->logAdmin($user, 'Deleted FAQ ID ' . $recordId);
123 123
 
124
-            $faq->deleteRecord($recordId, $recordLang);
125
-            echo $PMF_LANG['ad_entry_delsuc'];
124
+                $faq->deleteRecord($recordId, $recordLang);
125
+                echo $PMF_LANG['ad_entry_delsuc'];
126 126
             
127
-        } else {
128
-            echo $PMF_LANG['err_NotAuth'];
129
-        }
130
-        break;
131
-
132
-    // delete open questions
133
-    case 'delete_question':
134
-        if ($permission['delquestion']) {
135
-
136
-            $checks  = array(
137
-                'filter'  => FILTER_VALIDATE_INT,
138
-                'flags'   => FILTER_REQUIRE_ARRAY
139
-            );
140
-            $questionIds = PMF_Filter::filterInputArray(INPUT_POST, array('questions' => $checks));
141
-
142
-            if (!is_null($questionIds['questions'])) {
143
-                foreach ($questionIds['questions'] as $questionId) {
144
-                    $faq->deleteQuestion((int)$questionId);
127
+            } else {
128
+                echo $PMF_LANG['err_NotAuth'];
129
+            }
130
+            break;
131
+
132
+        // delete open questions
133
+        case 'delete_question':
134
+            if ($permission['delquestion']) {
135
+
136
+                $checks  = array(
137
+                    'filter'  => FILTER_VALIDATE_INT,
138
+                    'flags'   => FILTER_REQUIRE_ARRAY
139
+                );
140
+                $questionIds = PMF_Filter::filterInputArray(INPUT_POST, array('questions' => $checks));
141
+
142
+                if (!is_null($questionIds['questions'])) {
143
+                    foreach ($questionIds['questions'] as $questionId) {
144
+                        $faq->deleteQuestion((int)$questionId);
145
+                    }
145 146
                 }
147
+                echo $PMF_LANG['ad_entry_delsuc'];
148
+            } else {
149
+                echo $PMF_LANG['err_NotAuth'];
146 150
             }
147
-            echo $PMF_LANG['ad_entry_delsuc'];
148
-        } else {
149
-            echo $PMF_LANG['err_NotAuth'];
150
-        }
151
-        break;
151
+            break;
152 152
 }
Please login to merge, or discard this patch.
phpmyfaq/install/update.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -291,18 +291,18 @@
 block discarded – undo
291 291
         if (isset($PMF_LANG['metaCharset']) && strtolower($PMF_LANG['metaCharset']) != 'utf-8') {
292 292
             // UTF-8 Migration
293 293
             switch($DB['type']) {
294
-            case 'mysql':
295
-                include 'mysql.utf8migration.php';
296
-                break;
297
-
298
-            case 'mysqli':
299
-                include 'mysqli.utf8migration.php';
300
-                break;
301
-
302
-            default:
303
-                echo '<p class="hint">Please read <a target="_blank" href="../docs/documentation.en.html">' .
304
-                      'documenation</a> about migration to UTF-8.</p>';
305
-                break;
294
+                case 'mysql':
295
+                    include 'mysql.utf8migration.php';
296
+                    break;
297
+
298
+                case 'mysqli':
299
+                    include 'mysqli.utf8migration.php';
300
+                    break;
301
+
302
+                default:
303
+                    echo '<p class="hint">Please read <a target="_blank" href="../docs/documentation.en.html">' .
304
+                          'documenation</a> about migration to UTF-8.</p>';
305
+                    break;
306 306
             }
307 307
         }
308 308
 
Please login to merge, or discard this patch.
phpmyfaq/admin/ajax.trans.php 1 patch
Switch Indentation   +151 added lines, -151 removed lines patch added patch discarded remove patch
@@ -39,170 +39,170 @@  discard block
 block discarded – undo
39 39
 
40 40
 switch ($ajax_action) {
41 41
     
42
-    case 'save_page_buffer':
43
-        /**
42
+        case 'save_page_buffer':
43
+            /**
44 44
          * Build language variable definitions
45 45
          * @todo Change input handling using PMF_Filter
46 46
          */
47
-        foreach ((array)@$_POST['PMF_LANG'] as $key => $val) {
47
+            foreach ((array)@$_POST['PMF_LANG'] as $key => $val) {
48 48
         
49
-            if (is_string($val)) {
50
-                $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val);
51
-                $val = str_replace("'", "\\'", $val);
52
-                $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key]"]  = $val;
53
-            } elseif (is_array($val)) {
54
-                /**
49
+                if (is_string($val)) {
50
+                    $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val);
51
+                    $val = str_replace("'", "\\'", $val);
52
+                    $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key]"]  = $val;
53
+                } elseif (is_array($val)) {
54
+                    /**
55 55
                  * Here we deal with a two dimensional array
56 56
                  */
57
-                foreach ($val as $key2 => $val2) {
58
-                    $val2 = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val2);
59
-                    $val2 = str_replace("'", "\\'", $val2);
60
-                    $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key][$key2]"] = $val2;
57
+                    foreach ($val as $key2 => $val2) {
58
+                        $val2 = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val2);
59
+                        $val2 = str_replace("'", "\\'", $val2);
60
+                        $_SESSION['trans']['rightVarsOnly']["PMF_LANG[$key][$key2]"] = $val2;
61
+                    }
61 62
                 }
62 63
             }
63
-        }
64 64
         
65
-        foreach ((array)@$_POST['LANG_CONF'] as $key => $val) {
66
-            // if string like array(blah-blah-blah), extract the contents inside the brackets
67
-            if (preg_match('/^\s*array\s*\(\s*(\d+.+)\s*\).*$/',$val,$matches1)) {
68
-                // split the resulting string of delimiters such as "number =>"
69
-                $valArr = preg_split(
70
-                    '/\s*(\d+)\s*\=\>\s*/',
71
-                    $matches1[1],
72
-                    null,
73
-                    PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY
74
-                );
75
-                // in an array $valArr contents like  "number substring", "substring", "number substring", "substring", ...
76
-                $numVal = count($valArr);
77
-                if ($numVal > 1) {
78
-                    $newValArr = array();
79
-                    for ($i = 0; $i < $numVal; $i += 2) {
80
-                        if (is_numeric($valArr[$i])) {
81
-                            // clearing quotes
82
-                            if (preg_match('/^\s*\\\\*[\"|\'](.+)\\\\*[\"|\'][\s\,]*$/', $valArr[$i + 1], $matches2)) {
83
-                                $subVal = $matches2[1];
84
-                                // normalize quotes
85
-                                $subVal = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $subVal);
86
-                                $subVal = str_replace("'", "\\'", $subVal);
87
-                                // assembly of the original substring back
88
-                                $newValArr[] = $valArr[$i].' => \''.$subVal.'\'';
65
+            foreach ((array)@$_POST['LANG_CONF'] as $key => $val) {
66
+                // if string like array(blah-blah-blah), extract the contents inside the brackets
67
+                if (preg_match('/^\s*array\s*\(\s*(\d+.+)\s*\).*$/',$val,$matches1)) {
68
+                    // split the resulting string of delimiters such as "number =>"
69
+                    $valArr = preg_split(
70
+                        '/\s*(\d+)\s*\=\>\s*/',
71
+                        $matches1[1],
72
+                        null,
73
+                        PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY
74
+                    );
75
+                    // in an array $valArr contents like  "number substring", "substring", "number substring", "substring", ...
76
+                    $numVal = count($valArr);
77
+                    if ($numVal > 1) {
78
+                        $newValArr = array();
79
+                        for ($i = 0; $i < $numVal; $i += 2) {
80
+                            if (is_numeric($valArr[$i])) {
81
+                                // clearing quotes
82
+                                if (preg_match('/^\s*\\\\*[\"|\'](.+)\\\\*[\"|\'][\s\,]*$/', $valArr[$i + 1], $matches2)) {
83
+                                    $subVal = $matches2[1];
84
+                                    // normalize quotes
85
+                                    $subVal = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $subVal);
86
+                                    $subVal = str_replace("'", "\\'", $subVal);
87
+                                    // assembly of the original substring back
88
+                                    $newValArr[] = $valArr[$i].' => \''.$subVal.'\'';
89
+                                }
89 90
                             }
90 91
                         }
92
+                        $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = 'array('.implode(", ",$newValArr).')';
91 93
                     }
92
-                    $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"] = 'array('.implode(", ",$newValArr).')';
94
+                } else {  // compatibility for old behavior
95
+                    $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val);
96
+                    $val = str_replace("'", "\\'", $val);
97
+                    $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"]  = $val;
93 98
                 }
94
-            } else {  // compatibility for old behavior
95
-                $val = str_replace(array('\\\\', '\"', '\\\''), array('\\', '"', "'"), $val);
96
-                $val = str_replace("'", "\\'", $val);
97
-                $_SESSION['trans']['rightVarsOnly']["LANG_CONF[$key]"]  = $val;
98 99
             }
99
-        }
100 100
         
101
-        print 1;
102
-        break;
101
+            print 1;
102
+            break;
103 103
     
104
-    case 'save_translated_lang':
104
+        case 'save_translated_lang':
105 105
         
106
-        if (!$permission["edittranslation"]) {
107
-            print $PMF_LANG['err_NotAuth'];
108
-            exit;
109
-        }
106
+            if (!$permission["edittranslation"]) {
107
+                print $PMF_LANG['err_NotAuth'];
108
+                exit;
109
+            }
110 110
         
111
-        $lang     = strtolower($_SESSION['trans']['rightVarsOnly']["PMF_LANG[metaLanguage]"]);
112
-        $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php";
111
+            $lang     = strtolower($_SESSION['trans']['rightVarsOnly']["PMF_LANG[metaLanguage]"]);
112
+            $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php";
113 113
         
114
-        if (!is_writable(PMF_ROOT_DIR . "/lang")) {
115
-            print 0;
116
-            exit;
117
-        }     
114
+            if (!is_writable(PMF_ROOT_DIR . "/lang")) {
115
+                print 0;
116
+                exit;
117
+            }     
118 118
         
119
-        if (!copy($filename, PMF_ROOT_DIR . "/lang/language_" . $lang . ".bak.php")) {
120
-            print 0;
121
-            exit;
122
-        }
119
+            if (!copy($filename, PMF_ROOT_DIR . "/lang/language_" . $lang . ".bak.php")) {
120
+                print 0;
121
+                exit;
122
+            }
123 123
         
124
-        $newFileContents = '';
125
-        $tmpLines        = array();
124
+            $newFileContents = '';
125
+            $tmpLines        = array();
126 126
         
127
-        // Read in the head of the file we're writing to
128
-        $fh = fopen($filename, 'r');
129
-        do {
130
-            $line = fgets($fh);
131
-            array_push($tmpLines, rtrim($line));
132
-        }
133
-        while ('*/' != substr(trim($line), -2));
134
-        fclose($fh);
127
+            // Read in the head of the file we're writing to
128
+            $fh = fopen($filename, 'r');
129
+            do {
130
+                $line = fgets($fh);
131
+                array_push($tmpLines, rtrim($line));
132
+            }
133
+            while ('*/' != substr(trim($line), -2));
134
+            fclose($fh);
135 135
        
136
-        // Construct lines with variable definitions
137
-        foreach ($_SESSION['trans']['rightVarsOnly'] as $key => $val) {
138
-            if (0 === strpos($key, 'PMF_LANG')) {
139
-                $val = "'$val'";
136
+            // Construct lines with variable definitions
137
+            foreach ($_SESSION['trans']['rightVarsOnly'] as $key => $val) {
138
+                if (0 === strpos($key, 'PMF_LANG')) {
139
+                    $val = "'$val'";
140
+                }
141
+                array_push($tmpLines, '$' . str_replace(array('[', ']'), array("['", "']"), $key) . " = $val;");
140 142
             }
141
-            array_push($tmpLines, '$' . str_replace(array('[', ']'), array("['", "']"), $key) . " = $val;");
142
-        }
143 143
         
144
-        $newFileContents .= implode("\n", $tmpLines);
144
+            $newFileContents .= implode("\n", $tmpLines);
145 145
         
146
-        unset($_SESSION['trans']);
146
+            unset($_SESSION['trans']);
147 147
         
148
-        $retval = file_put_contents($filename, $newFileContents);
149
-        print intval($retval);
150
-        break;
148
+            $retval = file_put_contents($filename, $newFileContents);
149
+            print intval($retval);
150
+            break;
151 151
     
152
-    case 'remove_lang_file':
152
+        case 'remove_lang_file':
153 153
         
154
-        if (!$permission['deltranslation']) {
155
-            print $PMF_LANG['err_NotAuth'];
156
-            exit;
157
-        }
154
+            if (!$permission['deltranslation']) {
155
+                print $PMF_LANG['err_NotAuth'];
156
+                exit;
157
+            }
158 158
          
159
-        $lang = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING);
159
+            $lang = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING);
160 160
         
161
-        if (!is_writable(PMF_ROOT_DIR . "/lang")) {
162
-            print 0;
163
-            exit;
164
-        }     
161
+            if (!is_writable(PMF_ROOT_DIR . "/lang")) {
162
+                print 0;
163
+                exit;
164
+            }     
165 165
         
166
-        if (!copy(PMF_ROOT_DIR . "/lang/language_$lang.php", PMF_ROOT_DIR . "/lang/language_$lang.bak.php")) {
167
-            print 0;
168
-            exit;
169
-        }
166
+            if (!copy(PMF_ROOT_DIR . "/lang/language_$lang.php", PMF_ROOT_DIR . "/lang/language_$lang.bak.php")) {
167
+                print 0;
168
+                exit;
169
+            }
170 170
         
171
-        if (!unlink(PMF_ROOT_DIR . "/lang/language_$lang.php")) {
172
-            print 0;
173
-            exit;
174
-        }
171
+            if (!unlink(PMF_ROOT_DIR . "/lang/language_$lang.php")) {
172
+                print 0;
173
+                exit;
174
+            }
175 175
         
176
-        print 1;
177
-    break;
176
+            print 1;
177
+        break;
178 178
     
179
-    case 'save_added_trans':
179
+        case 'save_added_trans':
180 180
         
181
-        if (!$permission["addtranslation"]) {
182
-            print $PMF_LANG['err_NotAuth'];
183
-            exit;
184
-        }        
181
+            if (!$permission["addtranslation"]) {
182
+                print $PMF_LANG['err_NotAuth'];
183
+                exit;
184
+            }        
185 185
         
186
-        if (!is_writable(PMF_ROOT_DIR . "/lang")) {
187
-            print 0;
188
-            exit;
189
-        }
186
+            if (!is_writable(PMF_ROOT_DIR . "/lang")) {
187
+                print 0;
188
+                exit;
189
+            }
190 190
         
191
-        $langCode    = PMF_Filter::filterInput(INPUT_POST, 'translang', FILTER_SANITIZE_STRING);
192
-        $langName    = @$languageCodes[$langCode];
193
-        $langCharset = "UTF-8";
194
-        $langDir     = PMF_Filter::filterInput(INPUT_POST, 'langdir', FILTER_SANITIZE_STRING);
195
-        $langNPlurals= strval(PMF_Filter::filterVar(@$_POST['langnplurals'], FILTER_VALIDATE_INT, -1));
196
-        $langDesc    = PMF_Filter::filterInput(INPUT_POST, 'langdesc', FILTER_SANITIZE_STRING);
197
-        $author      = (array) @$_POST['author'];
191
+            $langCode    = PMF_Filter::filterInput(INPUT_POST, 'translang', FILTER_SANITIZE_STRING);
192
+            $langName    = @$languageCodes[$langCode];
193
+            $langCharset = "UTF-8";
194
+            $langDir     = PMF_Filter::filterInput(INPUT_POST, 'langdir', FILTER_SANITIZE_STRING);
195
+            $langNPlurals= strval(PMF_Filter::filterVar(@$_POST['langnplurals'], FILTER_VALIDATE_INT, -1));
196
+            $langDesc    = PMF_Filter::filterInput(INPUT_POST, 'langdesc', FILTER_SANITIZE_STRING);
197
+            $author      = (array) @$_POST['author'];
198 198
         
199
-        if(empty($langCode) || empty($langName) || empty($langCharset) ||
200
-           empty($langDir) || empty($langDesc) || empty($author)) {
201
-            print 0;
202
-            exit;
203
-        }
199
+            if(empty($langCode) || empty($langName) || empty($langCharset) ||
200
+               empty($langDir) || empty($langDesc) || empty($author)) {
201
+                print 0;
202
+                exit;
203
+            }
204 204
         
205
-        $fileTpl     = <<<FILE
205
+            $fileTpl     = <<<FILE
206 206
 <?php
207 207
 /**
208 208
  * %s
@@ -228,41 +228,41 @@  discard block
 block discarded – undo
228 228
 \$PMF_LANG['nplurals'] = '%s';
229 229
 FILE;
230 230
 
231
-        $authorTpl = '';
232
-        foreach ($author as $authorData) {
233
-            $authorTpl .= " * @author    $authorData\n";
234
-        }
231
+            $authorTpl = '';
232
+            foreach ($author as $authorData) {
233
+                $authorTpl .= " * @author    $authorData\n";
234
+            }
235 235
         
236
-        $fileTpl = sprintf($fileTpl, $langDesc, $authorTpl, date('Y-m-d'), $langCode, date('Y'),
237
-                                     $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals);
236
+            $fileTpl = sprintf($fileTpl, $langDesc, $authorTpl, date('Y-m-d'), $langCode, date('Y'),
237
+                                         $langCharset, strtolower($langCode), $langName, $langDir, $langNPlurals);
238 238
 
239
-        $retval = @file_put_contents(PMF_ROOT_DIR . '/lang/language_' . strtolower($langCode) . '.php', $fileTpl);
240
-        print intval($retval);
241
-    break;
239
+            $retval = @file_put_contents(PMF_ROOT_DIR . '/lang/language_' . strtolower($langCode) . '.php', $fileTpl);
240
+            print intval($retval);
241
+        break;
242 242
     
243 243
     
244
-    case 'send_translated_file':
244
+        case 'send_translated_file':
245 245
         
246
-        $lang     = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING);
247
-        $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php";
246
+            $lang     = PMF_Filter::filterInput(INPUT_GET, 'translang', FILTER_SANITIZE_STRING);
247
+            $filename = PMF_ROOT_DIR . "/lang/language_" . $lang . ".php";
248 248
         
249
-        if (!file_exists($filename)) {
250
-            print 0;
251
-            exit;
252
-        }
249
+            if (!file_exists($filename)) {
250
+                print 0;
251
+                exit;
252
+            }
253 253
 
254
-        $letterTpl = '';
254
+            $letterTpl = '';
255 255
         
256
-        $mail          = new PMF_Mail($faqConfig);
257
-        $mail->subject = 'New phpMyFAQ language file submitted';
258
-        $mail->message = sprintf('The file below was sent by %s, which is using phpMyFAQ %s on %s',
259
-            $user->userdata->get('email'),
260
-            $faqConfig->get('main.currentVersion'),
261
-            $_SERVER['HTTP_HOST']);
256
+            $mail          = new PMF_Mail($faqConfig);
257
+            $mail->subject = 'New phpMyFAQ language file submitted';
258
+            $mail->message = sprintf('The file below was sent by %s, which is using phpMyFAQ %s on %s',
259
+                $user->userdata->get('email'),
260
+                $faqConfig->get('main.currentVersion'),
261
+                $_SERVER['HTTP_HOST']);
262 262
             
263
-        $mail->addTo('[email protected]');
264
-        $mail->addAttachment($filename, null, 'text/plain');
263
+            $mail->addTo('[email protected]');
264
+            $mail->addAttachment($filename, null, 'text/plain');
265 265
         
266
-        print (int) $mail->send();
267
-    break;
266
+            print (int) $mail->send();
267
+        break;
268 268
 }
Please login to merge, or discard this patch.