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 ( 41d2f7...b9ed1f )
by Thorsten
25:52 queued 10:52
created
phpmyfaq/install/update.php 3 patches
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.
Spacing   +132 added lines, -132 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
     die("Sorry, but you need PHP 5.3.3 or later!"); // Die hard because of "use"
32 32
 }
33 33
 
34
-require PMF_ROOT_DIR . '/inc/Bootstrap.php';
34
+require PMF_ROOT_DIR.'/inc/Bootstrap.php';
35 35
 
36 36
 $step    = PMF_Filter::filterInput(INPUT_GET, 'step', FILTER_VALIDATE_INT, 1);
37 37
 $version = PMF_Filter::filterInput(INPUT_POST, 'version', FILTER_SANITIZE_STRING);
38 38
 $query   = array();
39 39
 
40 40
 if (file_exists(PMF_ROOT_DIR.'/inc/data.php')) {
41
-    require PMF_ROOT_DIR . '/inc/data.php'; // before 2.6.0-alpha
41
+    require PMF_ROOT_DIR.'/inc/data.php'; // before 2.6.0-alpha
42 42
 } else {
43
-    if (!file_exists(PMF_ROOT_DIR . '/config/database.php')) {
43
+    if (!file_exists(PMF_ROOT_DIR.'/config/database.php')) {
44 44
         header("Location: setup.php");
45 45
         exit();
46 46
     }
47
-    require PMF_ROOT_DIR . '/config/database.php'; // after 2.6.0-alpha
47
+    require PMF_ROOT_DIR.'/config/database.php'; // after 2.6.0-alpha
48 48
 }
49 49
 ?>
50 50
 <!doctype html>
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
 
137 137
 <?php
138 138
     if (version_compare($version, '2.8.0-alpha2', '>=')) {
139
-        if (! $faqConfig->get('main.maintenanceMode')) {
140
-            echo '<p class="alert alert-warning"><strong>Warning!</strong> Your phpMyFAQ installation is not in ' .
139
+        if (!$faqConfig->get('main.maintenanceMode')) {
140
+            echo '<p class="alert alert-warning"><strong>Warning!</strong> Your phpMyFAQ installation is not in '.
141 141
             'maintenance mode, you should enable the maintenance mode in your administration backend.</p>';
142 142
         }
143 143
     }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 <?php
160 160
                 // 2.5 versions only
161 161
                 if (version_compare($version, '2.6.0-alpha', '<') && !is_writeable('../template')) {
162
-                    echo '<p class="alert alert-error"><strong>Please change the directory ../template and its ' .
162
+                    echo '<p class="alert alert-error"><strong>Please change the directory ../template and its '.
163 163
                          'contents writable (777 on Linux/UNIX).</strong></p>';
164 164
                 }
165 165
 
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
     // First backup old inc/data.php, then backup new config/bak.database.php and copy inc/data.php
204 204
     // to config/database.php
205 205
     // This is needed for 2.5 updates only
206
-    if (file_exists(PMF_ROOT_DIR . '/inc/data.php')) {
207
-        if (!copy(PMF_ROOT_DIR . '/inc/data.php', PMF_ROOT_DIR . '/config/database.bak.php') ||
208
-            !copy(PMF_ROOT_DIR . '/inc/data.php', PMF_ROOT_DIR . '/config/database.php')) {
209
-            echo "<p class=\"alert alert-error\"><strong>Error:</strong> The backup file ../config/database.bak.php " .
206
+    if (file_exists(PMF_ROOT_DIR.'/inc/data.php')) {
207
+        if (!copy(PMF_ROOT_DIR.'/inc/data.php', PMF_ROOT_DIR.'/config/database.bak.php') ||
208
+            !copy(PMF_ROOT_DIR.'/inc/data.php', PMF_ROOT_DIR.'/config/database.php')) {
209
+            echo "<p class=\"alert alert-error\"><strong>Error:</strong> The backup file ../config/database.bak.php ".
210 210
                   "could not be written. Please correct this!</p>";
211 211
         } else {
212 212
             $checkDatabaseSetupFile = true;
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
 
216 216
     // The backup an existing config/database.php
217 217
     // 2.6+ updates
218
-    if (file_exists(PMF_ROOT_DIR . '/config/database.php')) {
219
-        if (!copy(PMF_ROOT_DIR . '/config/database.php', PMF_ROOT_DIR . '/config/database.bak.php')) {
220
-            echo "<p class=\"alert alert-error\"><strong>Error:</strong> The backup file ../config/database.bak.php " .
218
+    if (file_exists(PMF_ROOT_DIR.'/config/database.php')) {
219
+        if (!copy(PMF_ROOT_DIR.'/config/database.php', PMF_ROOT_DIR.'/config/database.bak.php')) {
220
+            echo "<p class=\"alert alert-error\"><strong>Error:</strong> The backup file ../config/database.bak.php ".
221 221
                   "could not be written. Please correct this!</p>";
222 222
         } else {
223 223
             $checkDatabaseSetupFile = true;
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
 
227 227
     // Now backup and move LDAP setup if available
228 228
     // This is needed for 2.5+ updates with a LDAP configuration file
229
-    if (file_exists(PMF_ROOT_DIR . '/inc/dataldap.php')) {
230
-        if (!copy(PMF_ROOT_DIR . '/inc/dataldap.php', PMF_ROOT_DIR . '/config/ldap.bak.php') ||
231
-            !copy(PMF_ROOT_DIR . '/inc/dataldap.php', PMF_ROOT_DIR . '/config/ldap.php')) {
232
-            echo "<p class=\"alert alert-error\"><strong>Error:</strong> The backup file ../config/ldap.bak.php " .
229
+    if (file_exists(PMF_ROOT_DIR.'/inc/dataldap.php')) {
230
+        if (!copy(PMF_ROOT_DIR.'/inc/dataldap.php', PMF_ROOT_DIR.'/config/ldap.bak.php') ||
231
+            !copy(PMF_ROOT_DIR.'/inc/dataldap.php', PMF_ROOT_DIR.'/config/ldap.php')) {
232
+            echo "<p class=\"alert alert-error\"><strong>Error:</strong> The backup file ../config/ldap.bak.php ".
233 233
                   "could not be written. Please correct this!</p>";
234 234
         } else {
235 235
             $checkLdapSetupFile = true;
@@ -270,14 +270,14 @@  discard block
 block discarded – undo
270 270
     //
271 271
     if (version_compare($version, '2.5.1', '<')) {
272 272
         // Truncate table and re-import all stopwords with the new Lithuanian ones
273
-        $query[] = "DELETE FROM ". PMF_Db::getTablePrefix() . "faqstopwords";
273
+        $query[] = "DELETE FROM ".PMF_Db::getTablePrefix()."faqstopwords";
274 274
         require 'stopwords.sql.php';
275 275
     }
276 276
 
277 277
     //
278 278
     // UPDATES FROM 2.5.2
279 279
     if (version_compare($version, '2.5.3', '<')) {
280
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'spam.enableCaptchaCode'
280
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'spam.enableCaptchaCode'
281 281
             WHERE config_name = 'spam.enableCatpchaCode'";
282 282
     }
283 283
 
@@ -286,11 +286,11 @@  discard block
 block discarded – undo
286 286
     //
287 287
     if (version_compare($version, '2.6.0-alpha', '<')) {
288 288
 
289
-        require '../lang/' . $faqConfig->get('main.language');
289
+        require '../lang/'.$faqConfig->get('main.language');
290 290
 
291 291
         if (isset($PMF_LANG['metaCharset']) && strtolower($PMF_LANG['metaCharset']) != 'utf-8') {
292 292
             // UTF-8 Migration
293
-            switch($DB['type']) {
293
+            switch ($DB['type']) {
294 294
             case 'mysql':
295 295
                 include 'mysql.utf8migration.php';
296 296
                 break;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                 break;
301 301
 
302 302
             default:
303
-                echo '<p class="hint">Please read <a target="_blank" href="../docs/documentation.en.html">' .
303
+                echo '<p class="hint">Please read <a target="_blank" href="../docs/documentation.en.html">'.
304 304
                       'documenation</a> about migration to UTF-8.</p>';
305 305
                 break;
306 306
             }
@@ -317,9 +317,9 @@  discard block
 block discarded – undo
317 317
         $faqConfig->add('records.attachmentsStorageType', '0');
318 318
         $faqConfig->add('records.enableAttachmentEncryption', 'false');
319 319
         $faqConfig->add('records.defaultAttachmentEncKey', '');
320
-        switch($DB['type']) {
320
+        switch ($DB['type']) {
321 321
             case 'pgsql':
322
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqattachment (
322
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqattachment (
323 323
                     id SERIAL NOT NULL,
324 324
                     record_id int4 NOT NULL,
325 325
                     record_lang varchar(5) NOT NULL,
@@ -332,14 +332,14 @@  discard block
 block discarded – undo
332 332
                     mime_type varchar(255) NULL,
333 333
                     PRIMARY KEY (id))";
334 334
 
335
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqattachment_file (
335
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqattachment_file (
336 336
                     virtual_hash char(32) NOT NULL,
337 337
                     contents bytea,
338 338
                     PRIMARY KEY (virtual_hash))";
339 339
                 break;
340 340
             case 'mysqli':
341 341
             case 'mysql':
342
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqattachment (
342
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqattachment (
343 343
                     id int(11) NOT NULL,
344 344
                     record_id int(11) NOT NULL,
345 345
                     record_lang varchar(5) NOT NULL,
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
                     mime_type varchar(255) NULL,
353 353
                     PRIMARY KEY (id))";
354 354
 
355
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqattachment_file (
355
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqattachment_file (
356 356
                     virtual_hash char(32) NOT NULL,
357 357
                     contents blob NOT NULL,
358 358
                     PRIMARY KEY (virtual_hash))";
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
                 /**
362 362
                  * Just try standard SQL and hope for the best
363 363
                  */
364
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqattachment (
364
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqattachment (
365 365
                     id int NOT NULL,
366 366
                     record_id int NOT NULL,
367 367
                     record_lang varchar(5) NOT NULL,
@@ -406,33 +406,33 @@  discard block
 block discarded – undo
406 406
         $faqConfig->add('socialnetworks.enableFacebookSupport', 'false');
407 407
 
408 408
         // Migrate faqquestion table to new structure
409
-        switch($DB['type']) {
409
+        switch ($DB['type']) {
410 410
             case 'pgsql':
411
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions RENAME COLUMN ask_username TO username";
412
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions RENAME COLUMN ask_usermail TO email";
413
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions RENAME COLUMN ask_rubrik TO category_id";
414
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions RENAME COLUMN ask_content TO question";
415
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions RENAME COLUMN ask_date TO created";
411
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions RENAME COLUMN ask_username TO username";
412
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions RENAME COLUMN ask_usermail TO email";
413
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions RENAME COLUMN ask_rubrik TO category_id";
414
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions RENAME COLUMN ask_content TO question";
415
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions RENAME COLUMN ask_date TO created";
416 416
                 break;
417 417
             case 'mssql':
418 418
             case 'sqlsrv':
419
-                $query[] = "EXEC sp_RENAME '" . PMF_Db::getTablePrefix() . "faqquestions.ask_username', 'username', 'COLUMN'";
420
-                $query[] = "EXEC sp_RENAME '" . PMF_Db::getTablePrefix() . "faqquestions.ask_usermail', 'email', 'COLUMN'";
421
-                $query[] = "EXEC sp_RENAME '" . PMF_Db::getTablePrefix() . "faqquestions.ask_rubrik', 'category_id', 'COLUMN'";
422
-                $query[] = "EXEC sp_RENAME '" . PMF_Db::getTablePrefix() . "faqquestions.ask_content', 'question', 'COLUMN'";
423
-                $query[] = "EXEC sp_RENAME '" . PMF_Db::getTablePrefix() . "faqquestions.ask_date', 'created', 'COLUMN'";
419
+                $query[] = "EXEC sp_RENAME '".PMF_Db::getTablePrefix()."faqquestions.ask_username', 'username', 'COLUMN'";
420
+                $query[] = "EXEC sp_RENAME '".PMF_Db::getTablePrefix()."faqquestions.ask_usermail', 'email', 'COLUMN'";
421
+                $query[] = "EXEC sp_RENAME '".PMF_Db::getTablePrefix()."faqquestions.ask_rubrik', 'category_id', 'COLUMN'";
422
+                $query[] = "EXEC sp_RENAME '".PMF_Db::getTablePrefix()."faqquestions.ask_content', 'question', 'COLUMN'";
423
+                $query[] = "EXEC sp_RENAME '".PMF_Db::getTablePrefix()."faqquestions.ask_date', 'created', 'COLUMN'";
424 424
                 break;
425 425
             case 'mysql':
426 426
             case 'mysqli':
427
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions CHANGE ask_username username VARCHAR(100) NOT NULL";
428
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions CHANGE ask_usermail email VARCHAR(100) NOT NULL";
429
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions CHANGE ask_rubrik category_id INT(11) NOT NULL";
430
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions CHANGE ask_content question TEXT NOT NULL";
431
-                $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions CHANGE ask_date created VARCHAR(20) NOT NULL";
427
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions CHANGE ask_username username VARCHAR(100) NOT NULL";
428
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions CHANGE ask_usermail email VARCHAR(100) NOT NULL";
429
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions CHANGE ask_rubrik category_id INT(11) NOT NULL";
430
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions CHANGE ask_content question TEXT NOT NULL";
431
+                $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions CHANGE ask_date created VARCHAR(20) NOT NULL";
432 432
                 break;
433 433
             case 'sqlite':
434 434
                 $query[] = "BEGIN TRANSACTION";
435
-                $query[] = "CREATE TEMPORARY TABLE " . PMF_Db::getTablePrefix() . "faqquestions_temp (
435
+                $query[] = "CREATE TEMPORARY TABLE ".PMF_Db::getTablePrefix()."faqquestions_temp (
436 436
                                 id int(11) NOT NULL,
437 437
                                 username varchar(100) NOT NULL,
438 438
                                 email varchar(100) NOT NULL,
@@ -441,9 +441,9 @@  discard block
 block discarded – undo
441 441
                                 created varchar(20) NOT NULL,
442 442
                                 is_visible char(1) default 'Y',
443 443
                                 PRIMARY KEY (id))";
444
-                $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqquestions_temp SELECT * FROM " . PMF_Db::getTablePrefix() . "faqquestions";
445
-                $query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faqquestions";
446
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqquestions (
444
+                $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqquestions_temp SELECT * FROM ".PMF_Db::getTablePrefix()."faqquestions";
445
+                $query[] = "DROP TABLE ".PMF_Db::getTablePrefix()."faqquestions";
446
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqquestions (
447 447
                                 id int(11) NOT NULL,
448 448
                                 username varchar(100) NOT NULL,
449 449
                                 email varchar(100) NOT NULL,
@@ -452,42 +452,42 @@  discard block
 block discarded – undo
452 452
                                 created varchar(20) NOT NULL,
453 453
                                 is_visible char(1) default 'Y',
454 454
                                 PRIMARY KEY (id))";
455
-                $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqquestions SELECT * FROM " . PMF_Db::getTablePrefix() . "faqquestions_temp";
456
-                $query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faqquestions_temp";
455
+                $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqquestions SELECT * FROM ".PMF_Db::getTablePrefix()."faqquestions_temp";
456
+                $query[] = "DROP TABLE ".PMF_Db::getTablePrefix()."faqquestions_temp";
457 457
                 $query[] = "COMMIT";
458 458
                 break;
459 459
         }
460 460
 
461
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faqright (right_id, name, description, for_users, for_groups) VALUES
461
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description, for_users, for_groups) VALUES
462 462
             (34, 'addattachment', 'Right to add attachments', 1, 1)";
463
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faqright (right_id, name, description, for_users, for_groups) VALUES
463
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description, for_users, for_groups) VALUES
464 464
             (35, 'editattachment', 'Right to edit attachments', 1, 1)";
465
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faqright (right_id, name, description, for_users, for_groups) VALUES
465
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description, for_users, for_groups) VALUES
466 466
             (36, 'delattachment', 'Right to delete attachments', 1, 1)";
467
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faqright (right_id, name, description, for_users, for_groups) VALUES
467
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description, for_users, for_groups) VALUES
468 468
             (37, 'dlattachment', 'Right to download attachments', 1, 1)";
469
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 34)";
470
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 35)";
471
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 36)";
472
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 37)";
469
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 34)";
470
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 35)";
471
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 36)";
472
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 37)";
473 473
     }
474 474
 
475 475
     //
476 476
     // UPDATES FROM 2.7.0-alpha2
477 477
     //
478 478
     if (version_compare($version, '2.7.0-alpha2', '<')) {
479
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faqright (right_id, name, description, for_users, for_groups) VALUES
479
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description, for_users, for_groups) VALUES
480 480
             (38, 'reports', 'Right to generate reports', 1, 1)";
481
-        $query[] = "INSERT INTO ". PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 38)";
481
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 38)";
482 482
     }
483 483
 
484 484
     //
485 485
     // UPDATES FROM 2.7.0-beta
486 486
     //
487 487
     if (version_compare($version, '2.7.0-beta', '<')) {
488
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'search.numberSearchTerms'
488
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'search.numberSearchTerms'
489 489
             WHERE config_name = 'main.numberSearchTerms'";
490
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'search.useAjaxSearchOnStartpage'
490
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'search.useAjaxSearchOnStartpage'
491 491
             WHERE config_name = 'main.useAjaxSearchOnStartpage'";
492 492
     }
493 493
 
@@ -505,39 +505,39 @@  discard block
 block discarded – undo
505 505
     // UPDATES FROM 2.7.0-RC
506 506
     //
507 507
     if (version_compare($version, '2.7.0-RC', '<')) {
508
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'records.numberOfRecordsPerPage'
508
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'records.numberOfRecordsPerPage'
509 509
             WHERE config_name = 'main.numberOfRecordsPerPage'";
510
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'records.numberOfShownNewsEntries'
510
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'records.numberOfShownNewsEntries'
511 511
             WHERE config_name = 'main.numberOfShownNewsEntries'";
512
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'records.orderingPopularFaqs'
512
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'records.orderingPopularFaqs'
513 513
             WHERE config_name = 'main.orderingPopularFaqs'";
514
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'records.disableAttachments'
514
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'records.disableAttachments'
515 515
             WHERE config_name = 'main.disableAttachments'";
516
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'records.maxAttachmentSize'
516
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'records.maxAttachmentSize'
517 517
             WHERE config_name = 'main.maxAttachmentSize'";
518
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'records.attachmentsPath'
518
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'records.attachmentsPath'
519 519
             WHERE config_name = 'main.attachmentsPath'";
520
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'records.attachmentsStorageType'
520
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'records.attachmentsStorageType'
521 521
             WHERE config_name = 'main.attachmentsStorageType'";
522
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'records.enableAttachmentEncryption'
522
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'records.enableAttachmentEncryption'
523 523
             WHERE config_name = 'main.enableAttachmentEncryption'";
524
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'records.defaultAttachmentEncKey'
524
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'records.defaultAttachmentEncKey'
525 525
             WHERE config_name = 'main.defaultAttachmentEncKey'";
526
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'security.permLevel'
526
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'security.permLevel'
527 527
             WHERE config_name = 'main.permLevel'";
528
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'security.ipCheck'
528
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'security.ipCheck'
529 529
             WHERE config_name = 'main.ipCheck'";
530
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'security.enableLoginOnly'
530
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'security.enableLoginOnly'
531 531
             WHERE config_name = 'main.enableLoginOnly'";
532
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'security.ldapSupport'
532
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'security.ldapSupport'
533 533
             WHERE config_name = 'main.ldapSupport'";
534
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'security.bannedIPs'
534
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'security.bannedIPs'
535 535
             WHERE config_name = 'main.bannedIPs'";
536
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'security.ssoSupport'
536
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'security.ssoSupport'
537 537
             WHERE config_name = 'main.ssoSupport'";
538
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'security.ssoLogoutRedirect'
538
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'security.ssoLogoutRedirect'
539 539
             WHERE config_name = 'main.ssoLogoutRedirect'";
540
-        $query[] = "UPDATE ". PMF_Db::getTablePrefix() . "faqconfig SET config_name = 'security.useSslForLogins'
540
+        $query[] = "UPDATE ".PMF_Db::getTablePrefix()."faqconfig SET config_name = 'security.useSslForLogins'
541 541
             WHERE config_name = 'main.useSslForLogins'";
542 542
     }
543 543
 
@@ -562,15 +562,15 @@  discard block
 block discarded – undo
562 562
     //
563 563
     if (version_compare($version, '2.8.0-alpha', '<')) {
564 564
 
565
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqright (right_id, name, description, for_users, for_groups) VALUES
565
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description, for_users, for_groups) VALUES
566 566
             (39, 'addfaq', 'Right to add FAQs in frontend', 1, 1)";
567
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 39)";
568
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqright (right_id, name, description, for_users, for_groups) VALUES
567
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 39)";
568
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description, for_users, for_groups) VALUES
569 569
             (40, 'addquestion', 'Right to add questions in frontend', 1, 1)";
570
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 40)";
571
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqright (right_id, name, description, for_users, for_groups) VALUES
570
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 40)";
571
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description, for_users, for_groups) VALUES
572 572
             (41, 'addcomment', 'Right to add comments in frontend', 1, 1)";
573
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 41)";
573
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 41)";
574 574
 
575 575
         $faqConfig->add('cache.varnishEnable', 'false');
576 576
         $faqConfig->add('cache.varnishHost', '127.0.0.1');
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
 
583 583
         if ('sqlite' === $DB['type']) {
584 584
             $query[] = "BEGIN TRANSACTION";
585
-            $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqquestions_temp (
585
+            $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqquestions_temp (
586 586
                                 id int(11) NOT NULL,
587 587
                                 username varchar(100) NOT NULL,
588 588
                                 email varchar(100) NOT NULL,
@@ -591,9 +591,9 @@  discard block
 block discarded – undo
591 591
                                 created varchar(20) NOT NULL,
592 592
                                 is_visible char(1) default 'Y',
593 593
                                 PRIMARY KEY (id))";
594
-            $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqquestions_temp SELECT * FROM " . PMF_Db::getTablePrefix() . "faqquestions";
595
-            $query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faqquestions";
596
-            $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqquestions (
594
+            $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqquestions_temp SELECT * FROM ".PMF_Db::getTablePrefix()."faqquestions";
595
+            $query[] = "DROP TABLE ".PMF_Db::getTablePrefix()."faqquestions";
596
+            $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqquestions (
597 597
                                 id int(11) NOT NULL,
598 598
                                 username varchar(100) NOT NULL,
599 599
                                 email varchar(100) NOT NULL,
@@ -603,39 +603,39 @@  discard block
 block discarded – undo
603 603
                                 is_visible char(1) default 'Y',
604 604
                                 answer_id INT NOT NULL DEFAULT 0,
605 605
                                 PRIMARY KEY (id))";
606
-            $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqquestions SELECT id, username, email, category_id, question, created, is_visible, 0 FROM " . PMF_Db::getTablePrefix() . "faqquestions_temp";
607
-            $query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faqquestions_temp";
606
+            $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqquestions SELECT id, username, email, category_id, question, created, is_visible, 0 FROM ".PMF_Db::getTablePrefix()."faqquestions_temp";
607
+            $query[] = "DROP TABLE ".PMF_Db::getTablePrefix()."faqquestions_temp";
608 608
             $query[] = "COMMIT";
609 609
         } elseif ('sqlite3' === $DB['type']) {
610
-            $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions ADD COLUMN answer_id INT NOT NULL DEFAULT 0";
610
+            $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions ADD COLUMN answer_id INT NOT NULL DEFAULT 0";
611 611
         } else {
612
-            $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faqquestions ADD answer_id INT NOT NULL DEFAULT 0";
612
+            $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faqquestions ADD answer_id INT NOT NULL DEFAULT 0";
613 613
         }
614 614
 
615 615
         $faqConfig->add('records.enableCloseQuestion', 'false');
616 616
         $faqConfig->add('records.enableDeleteQuestion', 'false');
617 617
 
618
-        $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faquserlogin_temp (
618
+        $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faquserlogin_temp (
619 619
             login varchar(128) NOT NULL,
620 620
             pass varchar(80) NOT NULL,
621 621
             PRIMARY KEY (login))";
622
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquserlogin_temp SELECT * FROM " . PMF_Db::getTablePrefix() . "faquserlogin";
623
-        $query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faquserlogin";
624
-        $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faquserlogin (
622
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquserlogin_temp SELECT * FROM ".PMF_Db::getTablePrefix()."faquserlogin";
623
+        $query[] = "DROP TABLE ".PMF_Db::getTablePrefix()."faquserlogin";
624
+        $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faquserlogin (
625 625
             login varchar(128) NOT NULL,
626 626
             pass varchar(80) NOT NULL,
627 627
             PRIMARY KEY (login))";
628
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquserlogin SELECT * FROM " . PMF_Db::getTablePrefix() . "faquserlogin_temp";
629
-        $query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faquserlogin_temp";
628
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquserlogin SELECT * FROM ".PMF_Db::getTablePrefix()."faquserlogin_temp";
629
+        $query[] = "DROP TABLE ".PMF_Db::getTablePrefix()."faquserlogin_temp";
630 630
     }
631 631
 
632 632
     //
633 633
     // UPDATES FROM 2.8.0-alpha2
634 634
     //
635 635
     if (version_compare($version, '2.8.0-alpha2', '<')) {
636
-        switch($DB['type']) {
636
+        switch ($DB['type']) {
637 637
             case 'pgsql':
638
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqinstances (
638
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqinstances (
639 639
                     id int4 NOT NULL,
640 640
                     url VARCHAR(255) NOT NULL,
641 641
                     instance VARCHAR(255) NOT NULL,
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
                     created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
644 644
                     modified TIMESTAMP NOT NULL,
645 645
                     PRIMARY KEY (id))";
646
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqinstances_config (
646
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqinstances_config (
647 647
                     instance_id int4 NOT NULL,
648 648
                     config_name VARCHAR(255) NOT NULL default '',
649 649
                     config_value VARCHAR(255) DEFAULT NULL,
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
             case 'sqlsrv':
654 654
             case 'sqlite':
655 655
             case 'sqlite3':
656
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqinstances (
656
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqinstances (
657 657
                     id INT NOT NULL,
658 658
                     url VARCHAR(255) NOT NULL,
659 659
                     instance VARCHAR(255) NOT NULL,
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
                     created DATETIME NOT NULL,
662 662
                     modified DATETIME NOT NULL,
663 663
                     PRIMARY KEY (id))";
664
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqinstances_config (
664
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqinstances_config (
665 665
                     instance_id INT NOT NULL,
666 666
                     config_name VARCHAR(255) NOT NULL default '',
667 667
                     config_value VARCHAR(255) DEFAULT NULL,
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
                 break;
670 670
             case 'mysql':
671 671
             case 'mysqli':
672
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqinstances (
672
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqinstances (
673 673
                     id INT(11) NOT NULL,
674 674
                     url VARCHAR(255) NOT NULL,
675 675
                     instance VARCHAR(255) NOT NULL,
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
                     created TIMESTAMP DEFAULT 0,
678 678
                     modified TIMESTAMP ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
679 679
                     PRIMARY KEY (id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
680
-                $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faqinstances_config (
680
+                $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faqinstances_config (
681 681
                     instance_id INT(11) NOT NULL,
682 682
                     config_name VARCHAR(255) NOT NULL default '',
683 683
                     config_value VARCHAR(255) DEFAULT NULL,
@@ -685,19 +685,19 @@  discard block
 block discarded – undo
685 685
                 break;
686 686
         }
687 687
 
688
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqright (right_id, name, description) VALUES
688
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description) VALUES
689 689
             (42, 'editinstances', 'Right to edit multi-site instances')";
690
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 42)";
691
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqright (right_id, name, description) VALUES
690
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 42)";
691
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description) VALUES
692 692
             (43, 'addinstances', 'Right to add multi-site instances')";
693
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 43)";
694
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqright (right_id, name, description) VALUES
693
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 43)";
694
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description) VALUES
695 695
             (44, 'delinstances', 'Right to delete multi-site instances')";
696
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 44)";
696
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 44)";
697 697
 
698 698
         if ('sqlite' === $DB['type']) {
699 699
             $query[] = "BEGIN TRANSACTION";
700
-            $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faquser_temp (
700
+            $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faquser_temp (
701 701
                                 user_id INT(11) NOT NULL,
702 702
                                 login VARCHAR(25) NOT NULL,
703 703
                                 session_id VARCHAR(150) NULL,
@@ -708,9 +708,9 @@  discard block
 block discarded – undo
708 708
                                 auth_source VARCHAR(100) NULL,
709 709
                                 member_since TIMESTAMP(14) NULL,
710 710
                                 PRIMARY KEY(user_id))";
711
-            $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquser_temp SELECT * FROM " . PMF_Db::getTablePrefix() . "faquser";
712
-            $query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faquser";
713
-            $query[] = "CREATE TABLE " . PMF_Db::getTablePrefix() . "faquser (
711
+            $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_temp SELECT * FROM ".PMF_Db::getTablePrefix()."faquser";
712
+            $query[] = "DROP TABLE ".PMF_Db::getTablePrefix()."faquser";
713
+            $query[] = "CREATE TABLE ".PMF_Db::getTablePrefix()."faquser (
714 714
                                 user_id INT(11) NOT NULL,
715 715
                                 login VARCHAR(25) NOT NULL,
716 716
                                 session_id VARCHAR(150) NULL,
@@ -722,13 +722,13 @@  discard block
 block discarded – undo
722 722
                                 member_since TIMESTAMP(14) NULL,
723 723
                                 remember_me VARCHAR(150) NULL,
724 724
                                 PRIMARY KEY(user_id))";
725
-            $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquser SELECT user_id, login, session_id, session_timestamp, ip, account_status, last_login, auth_source, member_since, '' FROM " . PMF_Db::getTablePrefix() . "faquser_temp";
726
-            $query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faquser_temp";
725
+            $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser SELECT user_id, login, session_id, session_timestamp, ip, account_status, last_login, auth_source, member_since, '' FROM ".PMF_Db::getTablePrefix()."faquser_temp";
726
+            $query[] = "DROP TABLE ".PMF_Db::getTablePrefix()."faquser_temp";
727 727
             $query[] = "COMMIT";
728 728
         } elseif ('sqlite3' === $DB['type']) {
729
-            $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faquser ADD COLUMN remember_me VARCHAR(150) NULL";
729
+            $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faquser ADD COLUMN remember_me VARCHAR(150) NULL";
730 730
         } else {
731
-            $query[] = "ALTER TABLE " . PMF_Db::getTablePrefix() . "faquser ADD remember_me VARCHAR(150) NULL";
731
+            $query[] = "ALTER TABLE ".PMF_Db::getTablePrefix()."faquser ADD remember_me VARCHAR(150) NULL";
732 732
         }
733 733
     }
734 734
 
@@ -739,13 +739,13 @@  discard block
 block discarded – undo
739 739
         foreach ($query as $key => $executeQuery) {
740 740
             $result = $faqConfig->getDb()->query($executeQuery);
741 741
             echo '.';
742
-            if (!($key % 100)) {
742
+            if (!($key%100)) {
743 743
                 echo '<br />';
744 744
             }
745 745
             if (!$result) {
746 746
                 echo "</div>";
747
-                echo '<p class="alert alert-error"><strong>Error:</strong> Please update your version of phpMyFAQ ' .
748
-                      'once again or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.' .
747
+                echo '<p class="alert alert-error"><strong>Error:</strong> Please update your version of phpMyFAQ '.
748
+                      'once again or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.'.
749 749
                       '</p>';
750 750
                 printf(
751 751
                     '<p class="alert alert-error"><strong>DB error:</strong> %s</p>',
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
             }
760 760
             usleep(10000);
761 761
             $count++;
762
-            if (!($count % 10)) {
762
+            if (!($count%10)) {
763 763
                 ob_flush();
764 764
             }
765 765
         }
@@ -799,10 +799,10 @@  discard block
 block discarded – undo
799 799
     //
800 800
     if (version_compare($version, '2.8.0-alpha3', '<')) {
801 801
 
802
-        $query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faqlinkverifyrules";
803
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqright (right_id, name, description) VALUES
802
+        $query[] = "DROP TABLE ".PMF_Db::getTablePrefix()."faqlinkverifyrules";
803
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faqright (right_id, name, description) VALUES
804 804
             (45, 'export', 'Right to export the complete FAQ')";
805
-        $query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faquser_right (user_id, right_id) VALUES (1, 45)";
805
+        $query[] = "INSERT INTO ".PMF_Db::getTablePrefix()."faquser_right (user_id, right_id) VALUES (1, 45)";
806 806
 
807 807
     }
808 808
 
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
     // UPDATED FROM 2.8.15
834 834
     //
835 835
     if (version_compare($version, '2.8.16', '<')) {
836
-        $query[] = "CREATE INDEX index_time ON " . PMF_Db::getTablePrefix() . "faqsessions (time)";
836
+        $query[] = "CREATE INDEX index_time ON ".PMF_Db::getTablePrefix()."faqsessions (time)";
837 837
     }
838 838
 
839 839
     // Always the last step: Update version number
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
             $result = $faqConfig->getDb()->query($executeQuery);
864 864
             printf('<span title="%s">.</span>', $executeQuery);
865 865
             if (!$result) {
866
-                echo '<p class="alert alert-error"><strong>Error:</strong> Please install your version of phpMyFAQ once again ' .
866
+                echo '<p class="alert alert-error"><strong>Error:</strong> Please install your version of phpMyFAQ once again '.
867 867
                       'or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.</p>';
868 868
                 printf('<p class="error"><strong>DB error:</strong> %s</p>', $faqConfig->getDb()->error());
869 869
                 printf('<code>%s</code>', htmlentities($executeQuery));
@@ -885,13 +885,13 @@  discard block
 block discarded – undo
885 885
         }
886 886
     }
887 887
     // Remove 'setup.php' file
888
-    if (is_writeable(__DIR__ . '/setup.php') && @unlink(__DIR__ . '/setup.php')) {
888
+    if (is_writeable(__DIR__.'/setup.php') && @unlink(__DIR__.'/setup.php')) {
889 889
         echo "<p class=\"alert alert-success\">The file <em>./install/setup.php</em> was deleted automatically.</p>\n";
890 890
     } else {
891 891
         echo "<p class=\"alert alert-error\">Please delete the file <em>./install/setup.php</em> manually.</p>\n";
892 892
     }
893 893
     // Remove 'update.php' file
894
-    if (is_writeable(__DIR__ . '/update.php') && @unlink(__DIR__ . '/update.php')) {
894
+    if (is_writeable(__DIR__.'/update.php') && @unlink(__DIR__.'/update.php')) {
895 895
         echo "<p class=\"alert alert-success\">The file <em>./install/update.php</em> was deleted automatically.</p>\n";
896 896
     } else {
897 897
         echo "<p class=\"alert alert-error\">Please delete the file <em>./install/update.php</em> manually.</p>\n";
Please login to merge, or discard this patch.
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Main update script
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Setup
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @author    Thomas Melchinger <[email protected]>
15
- * @author    Matteo Scaramuccia <[email protected]>
16
- * @copyright 2002-2016 phpMyFAQ Team
17
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
18
- * @link      http://www.phpmyfaq.de
19
- * @since     2002-01-10
20
- */
3
+     * Main update script
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Setup
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @author    Thomas Melchinger <[email protected]>
15
+     * @author    Matteo Scaramuccia <[email protected]>
16
+     * @copyright 2002-2016 phpMyFAQ Team
17
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
18
+     * @link      http://www.phpmyfaq.de
19
+     * @since     2002-01-10
20
+     */
21 21
 
22 22
 define('COPYRIGHT', '&copy; 2001-2015 <a href="http://www.phpmyfaq.de/">phpMyFAQ Team</a> | Follow us on <a href="http://twitter.com/phpMyFAQ">Twitter</a> | All rights reserved.');
23 23
 define('PMF_ROOT_DIR', dirname(dirname(__FILE__)));
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 // 2.5 versions only
161 161
                 if (version_compare($version, '2.6.0-alpha', '<') && !is_writeable('../template')) {
162 162
                     echo '<p class="alert alert-error"><strong>Please change the directory ../template and its ' .
163
-                         'contents writable (777 on Linux/UNIX).</strong></p>';
163
+                            'contents writable (777 on Linux/UNIX).</strong></p>';
164 164
                 }
165 165
 
166 166
                 // We only support updates from 2.5+
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         if (!copy(PMF_ROOT_DIR . '/inc/data.php', PMF_ROOT_DIR . '/config/database.bak.php') ||
208 208
             !copy(PMF_ROOT_DIR . '/inc/data.php', PMF_ROOT_DIR . '/config/database.php')) {
209 209
             echo "<p class=\"alert alert-error\"><strong>Error:</strong> The backup file ../config/database.bak.php " .
210
-                  "could not be written. Please correct this!</p>";
210
+                    "could not be written. Please correct this!</p>";
211 211
         } else {
212 212
             $checkDatabaseSetupFile = true;
213 213
         }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     if (file_exists(PMF_ROOT_DIR . '/config/database.php')) {
219 219
         if (!copy(PMF_ROOT_DIR . '/config/database.php', PMF_ROOT_DIR . '/config/database.bak.php')) {
220 220
             echo "<p class=\"alert alert-error\"><strong>Error:</strong> The backup file ../config/database.bak.php " .
221
-                  "could not be written. Please correct this!</p>";
221
+                    "could not be written. Please correct this!</p>";
222 222
         } else {
223 223
             $checkDatabaseSetupFile = true;
224 224
         }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         if (!copy(PMF_ROOT_DIR . '/inc/dataldap.php', PMF_ROOT_DIR . '/config/ldap.bak.php') ||
231 231
             !copy(PMF_ROOT_DIR . '/inc/dataldap.php', PMF_ROOT_DIR . '/config/ldap.php')) {
232 232
             echo "<p class=\"alert alert-error\"><strong>Error:</strong> The backup file ../config/ldap.bak.php " .
233
-                  "could not be written. Please correct this!</p>";
233
+                    "could not be written. Please correct this!</p>";
234 234
         } else {
235 235
             $checkLdapSetupFile = true;
236 236
         }
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 
302 302
             default:
303 303
                 echo '<p class="hint">Please read <a target="_blank" href="../docs/documentation.en.html">' .
304
-                      'documenation</a> about migration to UTF-8.</p>';
304
+                        'documenation</a> about migration to UTF-8.</p>';
305 305
                 break;
306 306
             }
307 307
         }
@@ -745,8 +745,8 @@  discard block
 block discarded – undo
745 745
             if (!$result) {
746 746
                 echo "</div>";
747 747
                 echo '<p class="alert alert-error"><strong>Error:</strong> Please update your version of phpMyFAQ ' .
748
-                      'once again or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.' .
749
-                      '</p>';
748
+                        'once again or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.' .
749
+                        '</p>';
750 750
                 printf(
751 751
                     '<p class="alert alert-error"><strong>DB error:</strong> %s</p>',
752 752
                     $faqConfig->getDb()->error()
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
             printf('<span title="%s">.</span>', $executeQuery);
865 865
             if (!$result) {
866 866
                 echo '<p class="alert alert-error"><strong>Error:</strong> Please install your version of phpMyFAQ once again ' .
867
-                      'or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.</p>';
867
+                        'or send us a <a href="http://bugs.phpmyfaq.de" target="_blank">bug report</a>.</p>';
868 868
                 printf('<p class="error"><strong>DB error:</strong> %s</p>', $faqConfig->getDb()->error());
869 869
                 printf('<code>%s</code>', htmlentities($executeQuery));
870 870
                 PMF_System::renderFooter();
Please login to merge, or discard this patch.
phpmyfaq/install/pgsql.sql.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 )";
240 240
 
241 241
 //faqinstances
242
-$query[] = "CREATE TABLE " . $sqltblpre . "faqinstances (
242
+$query[] = "CREATE TABLE ".$sqltblpre."faqinstances (
243 243
 id int4 NOT NULL,
244 244
 url VARCHAR(255) NOT NULL,
245 245
 instance VARCHAR(255) NOT NULL,
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 PRIMARY KEY (id))";
379 379
 
380 380
 //faqattachment
381
-$query[] = "CREATE TABLE " . $sqltblpre . "faqattachment (
381
+$query[] = "CREATE TABLE ".$sqltblpre."faqattachment (
382 382
 id SERIAL NOT NULL,
383 383
 record_id int4 NOT NULL,
384 384
 record_lang varchar(5) NOT NULL,
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 PRIMARY KEY (id))";
393 393
 
394 394
 //faqattachment file
395
-$query[] = "CREATE TABLE " . $sqltblpre . "faqattachment_file (
395
+$query[] = "CREATE TABLE ".$sqltblpre."faqattachment_file (
396 396
 virtual_hash char(32) NOT NULL,
397 397
 contents bytea,
398 398
 PRIMARY KEY (virtual_hash))";
Please login to merge, or discard this patch.
phpmyfaq/install/mysqli.sql.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 PRIMARY KEY (id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
66 66
 
67 67
 //faqattachment
68
-$query[] = "CREATE TABLE " . $sqltblpre . "faqattachment (
68
+$query[] = "CREATE TABLE ".$sqltblpre."faqattachment (
69 69
 id int(11) NOT NULL,
70 70
 record_id int(11) NOT NULL,
71 71
 record_lang varchar(5) NOT NULL,
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 PRIMARY KEY (id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
80 80
 
81 81
 //faqattachment file
82
-$query[] = "CREATE TABLE " . $sqltblpre . "faqattachment_file (
82
+$query[] = "CREATE TABLE ".$sqltblpre."faqattachment_file (
83 83
 virtual_hash char(32) NOT NULL,
84 84
 contents blob NOT NULL,
85 85
 PRIMARY KEY (virtual_hash)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 PRIMARY KEY (group_id, right_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
239 239
 
240 240
 //faqinstances
241
-$query[] = "CREATE TABLE " . $sqltblpre . "faqinstances (
241
+$query[] = "CREATE TABLE ".$sqltblpre."faqinstances (
242 242
 id INT(11) NOT NULL,
243 243
 url VARCHAR(255) NOT NULL,
244 244
 instance VARCHAR(255) NOT NULL,
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 PRIMARY KEY (id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
249 249
 
250 250
 //faqinstances_config
251
-$query[] = "CREATE TABLE " . $sqltblpre . "faqinstances_config (
251
+$query[] = "CREATE TABLE ".$sqltblpre."faqinstances_config (
252 252
 instance_id INT(11) NOT NULL,
253 253
 config_name VARCHAR(255) NOT NULL default '',
254 254
 config_value VARCHAR(255) DEFAULT NULL,
Please login to merge, or discard this patch.
phpmyfaq/install/setup.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 define('COPYRIGHT', '&copy; 2001-2015 <a href="http://www.phpmyfaq.de/">phpMyFAQ Team</a> | Follow us on <a href="http://twitter.com/phpMyFAQ">Twitter</a> | All rights reserved.');
29 29
 define('PMF_ROOT_DIR', dirname(dirname(__FILE__)));
30
-define('PMF_INCLUDE_DIR', PMF_ROOT_DIR . '/inc');
30
+define('PMF_INCLUDE_DIR', PMF_ROOT_DIR.'/inc');
31 31
 define('IS_VALID_PHPMYFAQ', null);
32 32
 
33 33
 if (version_compare(PHP_VERSION, '5.3.3') < 0) {
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 use Symfony\Component\ClassLoader\UniversalClassLoader;
38 38
 
39
-if (! defined('DEBUG')) {
39
+if (!defined('DEBUG')) {
40 40
     define('DEBUG', true);
41 41
 }
42 42
 
@@ -47,16 +47,16 @@  discard block
 block discarded – undo
47 47
 session_name('phpmyfaq-setup');
48 48
 session_start();
49 49
 
50
-require PMF_ROOT_DIR . '/config/constants.php';
51
-require PMF_ROOT_DIR . '/install/questionnaire.php';
50
+require PMF_ROOT_DIR.'/config/constants.php';
51
+require PMF_ROOT_DIR.'/install/questionnaire.php';
52 52
 
53 53
 //
54 54
 // Setting up PSR-0 autoloader for Symfony Components
55 55
 //
56
-require PMF_INCLUDE_DIR . '/libs/Symfony/Component/ClassLoader/UniversalClassLoader.php';
56
+require PMF_INCLUDE_DIR.'/libs/Symfony/Component/ClassLoader/UniversalClassLoader.php';
57 57
 
58 58
 $loader = new UniversalClassLoader();
59
-$loader->registerNamespace('Symfony', PMF_INCLUDE_DIR . '/libs');
59
+$loader->registerNamespace('Symfony', PMF_INCLUDE_DIR.'/libs');
60 60
 $loader->registerPrefix('PMF_', PMF_INCLUDE_DIR);
61 61
 $loader->register();
62 62
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
                         <div class="controls">
302 302
                             <select name="language" size="1" id="language">
303 303
                             <?php
304
-                                if ($dir = @opendir(PMF_ROOT_DIR . '/lang')) {
304
+                                if ($dir = @opendir(PMF_ROOT_DIR.'/lang')) {
305 305
                                     $options = array();
306 306
                                     while ($dat = @readdir($dir)) {
307 307
                                         $option = '';
Please login to merge, or discard this patch.
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The main phpMyFAQ Setup
4
- *
5
- * This script checks the complete environment, writes the database connection
6
- * parameters into the file config/database.php and the configuration into the database.
7
- *
8
- * PHP Version 5.3
9
- *
10
- * This Source Code Form is subject to the terms of the Mozilla Public License,
11
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
12
- * obtain one at http://mozilla.org/MPL/2.0/.
13
- *
14
- * @category  phpMyFAQ
15
- * @package   Setup
16
- * @author    Thorsten Rinne <[email protected]>
17
- * @author    Tom Rochester <[email protected]>
18
- * @author    Johannes Schlüter <[email protected]>
19
- * @author    Uwe Pries <[email protected]>
20
- * @author    Matteo Scaramuccia <[email protected]>
21
- * @author    Florian Anderiasch <[email protected]>
22
- * @copyright 2002-2016 phpMyFAQ Team
23
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
24
- * @link      http://www.phpmyfaq.de
25
- * @since     2002-08-20
26
- */
3
+     * The main phpMyFAQ Setup
4
+     *
5
+     * This script checks the complete environment, writes the database connection
6
+     * parameters into the file config/database.php and the configuration into the database.
7
+     *
8
+     * PHP Version 5.3
9
+     *
10
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
11
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
12
+     * obtain one at http://mozilla.org/MPL/2.0/.
13
+     *
14
+     * @category  phpMyFAQ
15
+     * @package   Setup
16
+     * @author    Thorsten Rinne <[email protected]>
17
+     * @author    Tom Rochester <[email protected]>
18
+     * @author    Johannes Schlüter <[email protected]>
19
+     * @author    Uwe Pries <[email protected]>
20
+     * @author    Matteo Scaramuccia <[email protected]>
21
+     * @author    Florian Anderiasch <[email protected]>
22
+     * @copyright 2002-2016 phpMyFAQ Team
23
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
24
+     * @link      http://www.phpmyfaq.de
25
+     * @since     2002-08-20
26
+     */
27 27
 
28 28
 define('COPYRIGHT', '&copy; 2001-2015 <a href="http://www.phpmyfaq.de/">phpMyFAQ Team</a> | Follow us on <a href="http://twitter.com/phpMyFAQ">Twitter</a> | All rights reserved.');
29 29
 define('PMF_ROOT_DIR', dirname(dirname(__FILE__)));
Please login to merge, or discard this patch.
phpmyfaq/install/sqlite3.sql.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 PRIMARY KEY (id))";
64 64
 
65 65
 //faqattachment
66
-$query[] = "CREATE TABLE " . $sqltblpre . "faqattachment (
66
+$query[] = "CREATE TABLE ".$sqltblpre."faqattachment (
67 67
 id INTEGER NOT NULL,
68 68
 record_id INTEGER NOT NULL,
69 69
 record_lang VARCHAR(5) NOT NULL,
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 PRIMARY KEY (id))";
78 78
 
79 79
 //faqattachment file
80
-$query[] = "CREATE TABLE " . $sqltblpre . "faqattachment_file (
80
+$query[] = "CREATE TABLE ".$sqltblpre."faqattachment_file (
81 81
 virtual_hash CHAR(32) NOT NULL,
82 82
 contents BLOB NOT NULL,
83 83
 PRIMARY KEY (virtual_hash))";
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 )";
240 240
 
241 241
 //faqinstances
242
-$query[] = "CREATE TABLE " . $sqltblpre . "faqinstances (
242
+$query[] = "CREATE TABLE ".$sqltblpre."faqinstances (
243 243
 id INT(11) NOT NULL,
244 244
 url VARCHAR(255) NOT NULL,
245 245
 instance VARCHAR(255) NOT NULL,
Please login to merge, or discard this patch.
phpmyfaq/feed/category/rss.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
                 $oLink            = new PMF_Link($link, $faqConfig);
127 127
                 $oLink->itemTitle = $item['record_title'];
128 128
                 $link             = $oLink->toString();
129
-           }
129
+            }
130 130
         }
131 131
 
132 132
         $rss->startElement('item');
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 //
24 24
 // Bootstrapping
25 25
 //
26
-require PMF_ROOT_DIR . '/inc/Bootstrap.php';
26
+require PMF_ROOT_DIR.'/inc/Bootstrap.php';
27 27
 
28 28
 //
29 29
 // get language (default: english)
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 PMF_String::init($LANGCODE);
38 38
 
39 39
 // Preload English strings
40
-require_once PMF_ROOT_DIR . '/lang/language_en.php';
40
+require_once PMF_ROOT_DIR.'/lang/language_en.php';
41 41
 $faqConfig->setLanguage($Language);
42 42
 
43 43
 if ($faqConfig->get('security.enableLoginOnly')) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     }
60 60
 } else {
61 61
     $user = PMF_User_CurrentUser::getFromCookie($faqConfig);
62
-    if (! $user instanceof PMF_User_CurrentUser) {
62
+    if (!$user instanceof PMF_User_CurrentUser) {
63 63
         $user = PMF_User_CurrentUser::getFromSession($faqConfig);
64 64
     }
65 65
 }
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 $rss->writeAttribute('version', '2.0');
107 107
 $rss->writeAttribute('xmlns:atom', 'http://www.w3.org/2005/Atom');
108 108
 $rss->startElement('channel');
109
-$rss->writeElement('title', $faqConfig->get('main.titleFAQ') . ' - ');
109
+$rss->writeElement('title', $faqConfig->get('main.titleFAQ').' - ');
110 110
 $rss->writeElement('description', html_entity_decode($faqConfig->get('main.metaDescription')));
111 111
 $rss->writeElement('link', $faqConfig->get('main.referenceURL'));
112 112
 $rss->startElementNS('atom', 'link', 'http://www.w3.org/2005/Atom');
113 113
 $rss->writeAttribute('rel', 'self');
114 114
 $rss->writeAttribute('type', 'application/rss+xml');
115
-$rss->writeAttribute('href', $faqConfig->get('main.referenceURL') . 'feed/category/rss.php');
115
+$rss->writeAttribute('href', $faqConfig->get('main.referenceURL').'feed/category/rss.php');
116 116
 $rss->endElement();
117 117
 
118 118
 if (is_array($records)) {
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
         }
131 131
 
132 132
         $rss->startElement('item');
133
-        $rss->writeElement('title', html_entity_decode($item['record_title'] .
134
-                                    ' (' . $item['visits'] . ' '.$PMF_LANG['msgViews'].')', ENT_COMPAT, 'UTF-8'));
133
+        $rss->writeElement('title', html_entity_decode($item['record_title'].
134
+                                    ' ('.$item['visits'].' '.$PMF_LANG['msgViews'].')', ENT_COMPAT, 'UTF-8'));
135 135
 
136 136
         $rss->startElement('description');
137 137
         $rss->writeCdata($item['record_preview']);
138 138
         $rss->endElement();
139 139
 
140
-        $rss->writeElement('link', $faqConfig->get('main.referenceURL') . $link);
141
-        $rss->writeElement('guid', $faqConfig->get('main.referenceURL') . $link);
140
+        $rss->writeElement('link', $faqConfig->get('main.referenceURL').$link);
141
+        $rss->writeElement('guid', $faqConfig->get('main.referenceURL').$link);
142 142
 
143 143
         $rss->writeElement('pubDate', PMF_Date::createRFC822Date($item['record_date'], true));
144 144
 
Please login to merge, or discard this patch.
phpmyfaq/feed/topten/rss.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 //
25 25
 // Bootstrapping
26 26
 //
27
-require PMF_ROOT_DIR . '/inc/Bootstrap.php';
27
+require PMF_ROOT_DIR.'/inc/Bootstrap.php';
28 28
 
29 29
 //
30 30
 // get language (default: english)
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     }
62 62
 } else {
63 63
     $user = PMF_User_CurrentUser::getFromCookie($faqConfig);
64
-    if (! $user instanceof PMF_User_CurrentUser) {
64
+    if (!$user instanceof PMF_User_CurrentUser) {
65 65
         $user = PMF_User_CurrentUser::getFromSession($faqConfig);
66 66
     }
67 67
 }
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 $rss->writeAttribute('version', '2.0');
106 106
 $rss->writeAttribute('xmlns:atom', 'http://www.w3.org/2005/Atom');
107 107
 $rss->startElement('channel');
108
-$rss->writeElement('title', $faqConfig->get('main.titleFAQ') . ' - ' . $PMF_LANG['msgTopTen']);
108
+$rss->writeElement('title', $faqConfig->get('main.titleFAQ').' - '.$PMF_LANG['msgTopTen']);
109 109
 $rss->writeElement('description', html_entity_decode($faqConfig->get('main.metaDescription')));
110 110
 $rss->writeElement('link', $faqConfig->get('main.referenceURL'));
111 111
 $rss->startElementNS('atom', 'link', 'http://www.w3.org/2005/Atom');
112 112
 $rss->writeAttribute('rel', 'self');
113 113
 $rss->writeAttribute('type', 'application/rss+xml');
114
-$rss->writeAttribute('href', $faqConfig->get('main.referenceURL') . 'feed/topten/rss.php');
114
+$rss->writeAttribute('href', $faqConfig->get('main.referenceURL').'feed/topten/rss.php');
115 115
 $rss->endElement();
116 116
 
117 117
 if ($num > 0) {
@@ -129,15 +129,15 @@  discard block
 block discarded – undo
129 129
         }
130 130
 
131 131
         $rss->startElement('item');
132
-        $rss->writeElement('title', PMF_Utils::makeShorterText(html_entity_decode($item['thema'], ENT_COMPAT, 'UTF-8'), 8) .
132
+        $rss->writeElement('title', PMF_Utils::makeShorterText(html_entity_decode($item['thema'], ENT_COMPAT, 'UTF-8'), 8).
133 133
                                     " (".$item['visits']." ".$PMF_LANG['msgViews'].")");
134 134
 
135 135
         $rss->startElement('description');
136 136
         $rss->writeCdata("[".$i.".] ".$item['thema']." (".$item['visits']." ".$PMF_LANG['msgViews'].")");
137 137
         $rss->endElement();
138 138
 
139
-        $rss->writeElement('link', $faqConfig->get('main.referenceURL') . $link);
140
-        $rss->writeElement('guid', $faqConfig->get('main.referenceURL') . $link);
139
+        $rss->writeElement('link', $faqConfig->get('main.referenceURL').$link);
140
+        $rss->writeElement('guid', $faqConfig->get('main.referenceURL').$link);
141 141
 
142 142
         $rss->writeElement('pubDate', PMF_Date::createRFC822Date($item['last_visit'], false));
143 143
         $rss->endElement();
Please login to merge, or discard this patch.
phpmyfaq/feed/latest/rss.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 //
23 23
 // Bootstrapping
24 24
 //
25
-require PMF_ROOT_DIR . '/inc/Bootstrap.php';
25
+require PMF_ROOT_DIR.'/inc/Bootstrap.php';
26 26
 
27 27
 //
28 28
 // get language (default: english)
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
 if (isset($LANGCODE) && PMF_Language::isASupportedLanguage($LANGCODE)) {
38 38
     // Overwrite English strings with the ones we have in the current language
39
-    require_once PMF_ROOT_DIR . '/lang/language_' . $LANGCODE . '.php';
39
+    require_once PMF_ROOT_DIR.'/lang/language_'.$LANGCODE.'.php';
40 40
 } else {
41 41
     $LANGCODE = 'en';
42 42
 }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     }
61 61
 } else {
62 62
     $user = PMF_User_CurrentUser::getFromCookie($faqConfig);
63
-    if (! $user instanceof PMF_User_CurrentUser) {
63
+    if (!$user instanceof PMF_User_CurrentUser) {
64 64
         $user = PMF_User_CurrentUser::getFromSession($faqConfig);
65 65
     }
66 66
 }
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
 $rss->writeAttribute('version', '2.0');
105 105
 $rss->writeAttribute('xmlns:atom', 'http://www.w3.org/2005/Atom');
106 106
 $rss->startElement('channel');
107
-$rss->writeElement('title', $faqConfig->get('main.titleFAQ') . ' - ' . $PMF_LANG['msgLatestArticles']);
107
+$rss->writeElement('title', $faqConfig->get('main.titleFAQ').' - '.$PMF_LANG['msgLatestArticles']);
108 108
 $rss->writeElement('description', html_entity_decode($faqConfig->get('main.metaDescription')));
109 109
 $rss->writeElement('link', $faqConfig->get('main.referenceURL'));
110 110
 $rss->startElementNS('atom', 'link', 'http://www.w3.org/2005/Atom');
111 111
 $rss->writeAttribute('rel', 'self');
112 112
 $rss->writeAttribute('type', 'application/rss+xml');
113
-$rss->writeAttribute('href', $faqConfig->get('main.referenceURL') . 'feed/latest/rss.php');
113
+$rss->writeAttribute('href', $faqConfig->get('main.referenceURL').'feed/latest/rss.php');
114 114
 $rss->endElement();
115 115
 
116 116
 if ($num > 0) {
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
         $rss->writeCdata($content);
137 137
         $rss->endElement();
138 138
 
139
-        $rss->writeElement('link', $faqConfig->get('main.referenceURL') . $link);
140
-        $rss->writeElement('guid', $faqConfig->get('main.referenceURL') . $link);
139
+        $rss->writeElement('link', $faqConfig->get('main.referenceURL').$link);
140
+        $rss->writeElement('guid', $faqConfig->get('main.referenceURL').$link);
141 141
         $rss->writeElement('pubDate', PMF_Date::createRFC822Date($item['datum'], true));
142 142
         $rss->endElement();
143 143
     }
Please login to merge, or discard this patch.
phpmyfaq/feed/openquestions/rss.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 //
25 25
 // Bootstrapping
26 26
 //
27
-require PMF_ROOT_DIR . '/inc/Bootstrap.php';
27
+require PMF_ROOT_DIR.'/inc/Bootstrap.php';
28 28
 
29 29
 //
30 30
 // get language (default: english)
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 $rss->writeAttribute('version', '2.0');
61 61
 $rss->writeAttribute('xmlns:atom', 'http://www.w3.org/2005/Atom');
62 62
 $rss->startElement('channel');
63
-$rss->writeElement('title', $faqConfig->get('main.titleFAQ') . ' - ' . $PMF_LANG['msgOpenQuestions']);
63
+$rss->writeElement('title', $faqConfig->get('main.titleFAQ').' - '.$PMF_LANG['msgOpenQuestions']);
64 64
 $rss->writeElement('description', html_entity_decode($faqConfig->get('main.metaDescription')));
65 65
 $rss->writeElement('link', $faqConfig->get('main.referenceURL'));
66 66
 $rss->startElementNS('atom', 'link', 'http://www.w3.org/2005/Atom');
67 67
 $rss->writeAttribute('rel', 'self');
68 68
 $rss->writeAttribute('type', 'application/rss+xml');
69
-$rss->writeAttribute('href', $faqConfig->get('main.referenceURL') . 'feed/openquestions/rss.php');
69
+$rss->writeAttribute('href', $faqConfig->get('main.referenceURL').'feed/openquestions/rss.php');
70 70
 $rss->endElement();
71 71
 
72 72
 if ($num > 0) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             $counter++;
77 77
 
78 78
             $rss->startElement('item');
79
-            $rss->writeElement('title', PMF_Utils::makeShorterText(html_entity_decode($item['question'], ENT_COMPAT, 'UTF-8'), 8) .
79
+            $rss->writeElement('title', PMF_Utils::makeShorterText(html_entity_decode($item['question'], ENT_COMPAT, 'UTF-8'), 8).
80 80
                                         " (".$item['username'].")");
81 81
 
82 82
             $rss->startElement('description');
Please login to merge, or discard this patch.