]> git.agnieray.net Git - galette.git/commitdiff
Scrutinizer Auto-Fixes
authorScrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>
Thu, 11 Jun 2020 16:51:35 +0000 (16:51 +0000)
committerJohan Cwiklinski <trasher@x-tnd.be>
Thu, 11 Jun 2020 21:57:50 +0000 (23:57 +0200)
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com

galette/includes/routes/main.routes.php
galette/includes/sql_parse.php
galette/install/scripts/upgrade-to-0.8.php
galette/install/steps/db_checks.php

index 3a03b51c1139420df9819531609fbe770d58531e..24fca476ef74784d570fef22c83987669b48c49a 100644 (file)
@@ -65,7 +65,7 @@ $app->get(
 //system information - keep old route with typo ('s' on 'information') for now (0.9.4)
 $app->get(
     '/system-informations',
-    function($request, $response, $args) {
+    function ($request, $response, $args) {
         return $response
             ->withStatus(302)
             ->withHeader('Location', $this->router->pathFor('sysinfos'));
index 6809fbadfcf2b4440753ba290416abbc98b66e5d..3652940f6b075de914bbade05aa81b646549cbad 100644 (file)
@@ -41,19 +41,19 @@ function remove_comments(&$output)
        $linecount = count($lines);
 
        $in_comment = false;
-       for($i = 0; $i < $linecount; $i++)
+       for ($i = 0; $i < $linecount; $i++)
        {
-               if( preg_match("/^\/\*/", preg_quote($lines[$i])) )
+               if (preg_match("/^\/\*/", preg_quote($lines[$i])))
                {
                        $in_comment = true;
                }
 
-               if( !$in_comment )
+               if (!$in_comment)
                {
                        $output .= $lines[$i] . "\n";
                }
 
-               if( preg_match("/\*\/$/", preg_quote($lines[$i])) )
+               if (preg_match("/\*\/$/", preg_quote($lines[$i])))
                {
                        $in_comment = false;
                }
index 1900e6babb6239cf86594760eea24d2d2ad4a14e..63c8c34c99a3decf7e6aec2df1b1668a456d6952 100644 (file)
@@ -134,54 +134,54 @@ class UpgradeTo08 extends AbstractUpdater
             'tempimages'
         );
 
-        if ( !in_array($dirname, $nomove) ) {
+        if (!in_array($dirname, $nomove)) {
             $origdir = GALETTE_ROOT . $dirname . '/';
             $destdir = GALETTE_DATA_PATH . $dirname . '/';
 
             $go = false;
             //move directory contents
-            switch ( $dirname ) {
+            switch ($dirname) {
                 case 'logs':
-                    if ( GALETTE_LOGS_PATH === $destdir && file_exists($origdir) ) {
+                    if (GALETTE_LOGS_PATH === $destdir && file_exists($origdir)) {
                         $go = true;
                     }
                     break;
                 case 'exports':
-                    if ( GALETTE_EXPORTS_PATH === $destdir && file_exists($origdir) ) {
+                    if (GALETTE_EXPORTS_PATH === $destdir && file_exists($origdir)) {
                         $go = true;
                     }
                     break;
                 case 'imports':
-                    if ( GALETTE_IMPORTS_PATH === $destdir && file_exists($origdir) ) {
+                    if (GALETTE_IMPORTS_PATH === $destdir && file_exists($origdir)) {
                         $go = true;
                     }
                     break;
                 case 'photos':
-                    if ( GALETTE_PHOTOS_PATH === $destdir && file_exists($origdir) ) {
+                    if (GALETTE_PHOTOS_PATH === $destdir && file_exists($origdir)) {
                         $go = true;
                     }
                     break;
                 case 'attachments':
-                    if ( GALETTE_ATTACHMENTS_PATH === $destdir
+                    if (GALETTE_ATTACHMENTS_PATH === $destdir
                         && file_exists($origdir)
                     ) {
                         $go = true;
                     }
                     break;
                 case 'files':
-                    if ( GALETTE_FILES_PATH === $destdir && file_exists($origdir) ) {
+                    if (GALETTE_FILES_PATH === $destdir && file_exists($origdir)) {
                         $go = true;
                     }
                     break;
             }
 
-            if ( $go ) {
+            if ($go) {
                 $moved = true;
                 $d = dir($origdir);
                 while (($entry = $d->read()) !== false) {
-                    if ( $entry != '.' && $entry != '..' ) {
+                    if ($entry != '.' && $entry != '..') {
                         $moved = @rename($origdir . $entry, $destdir . $entry);
-                        if ( !$moved ) {
+                        if (!$moved) {
                             $moved = false;
                             $this->addError(
                                 str_replace(
index d60aaba778f626b7f0db46258a165f2553a3e46e..01e585cc50188e68ee01d10f6255c456a86c5e1b 100644 (file)
@@ -239,7 +239,7 @@ if (!isset($install_plugin)) {
 ?>
             <form action="installer.php" method="POST">
                 <p id="btn_box">
-                    <input id="next_btn" type="submit" value="<?php echo _T("Next step"); ?>"<?php if (!$conndb_ok || !$permsdb_ok) { echo ' disabled="disabled"';  } ?>/>
+                    <input id="next_btn" type="submit" value="<?php echo _T("Next step"); ?>"<?php if (!$conndb_ok || !$permsdb_ok) { echo ' disabled="disabled"'; } ?>/>
 <?php
 if ($conndb_ok && $permsdb_ok) {
     ?>