Completed
Push — master ( 7e84c7...e29d63 )
by Yannick
50:28 queued 21:43
created
plugin/vchamilo/lib/Virtual.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 $data['SYS_HOME_PATH'] = self::addTrailingSlash($homePath).$data['slug'];
100 100
                 $data['SYS_COURSE_PATH'] = self::addTrailingSlash($coursePath).$data['slug'];
101 101
                 $data['SYS_UPLOAD_PATH'] = self::addTrailingSlash($uploadPath).$data['slug'];
102
-                $data['WEB_UPLOAD_PATH'] = $_configuration['vchamilo_web_root'] . 'var/upload/' . $data['slug'];
102
+                $data['WEB_UPLOAD_PATH'] = $_configuration['vchamilo_web_root'].'var/upload/'.$data['slug'];
103 103
 
104 104
                 if (!empty($passwordEncryption)) {
105 105
                     $_configuration['password_encryption'] = $passwordEncryption;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         if (preg_match('#https?://#', $url)) {
230 230
             header('location: '.$url);
231 231
         } else {
232
-            header('location: ' . api_get_path(WEB_PATH).$url);
232
+            header('location: '.api_get_path(WEB_PATH).$url);
233 233
         }
234 234
         exit;
235 235
     }
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         }
413 413
 
414 414
         // Making the command line (see 'vconfig.php' file for defining the right paths).
415
-        $sqlcmd = $pgm.' -h'.$vchamilodata->db_host.(isset($vchamilodata->db_port) ? ' -P'.$vchamilodata->db_port.' ' : ' ' );
415
+        $sqlcmd = $pgm.' -h'.$vchamilodata->db_host.(isset($vchamilodata->db_port) ? ' -P'.$vchamilodata->db_port.' ' : ' ');
416 416
         $sqlcmd .= '-u'.$vchamilodata->db_user.' '.$databasePassword;
417 417
         $sqlcmd .= '%DATABASE% < ';
418 418
 
@@ -492,10 +492,10 @@  discard block
 block discarded – undo
492 492
         //if ($CFG->ostype == 'WINDOWS') {
493 493
         if (false) {
494 494
             $cmd_main = "-h{$host} -P{$port} -u{$vchamilo->db_user} {$pass} {$vchamilo->main_database}";
495
-            $cmds[] = $cmd_main . ' > ' . $outputfilerad;
495
+            $cmds[] = $cmd_main.' > '.$outputfilerad;
496 496
         } else {
497 497
             $cmd_main = "-h{$host} -P{$port} -u{$vchamilo->db_user} {$pass} {$vchamilo->main_database}";
498
-            $cmds[] = $cmd_main . ' > ' . escapeshellarg($outputfilerad);
498
+            $cmds[] = $cmd_main.' > '.escapeshellarg($outputfilerad);
499 499
         }
500 500
 
501 501
         $mysqldumpcmd = self::getConfig('vchamilo', 'cmd_mysqldump', true);
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
                 Display::return_message('You cannot use the same database as the chamilo master', 'error')
943 943
             );
944 944
 
945
-            return ;
945
+            return;
946 946
         }
947 947
 
948 948
         $databaseName = $data->main_database;
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
                     'error'
957 957
                 )
958 958
             );
959
-            return ;
959
+            return;
960 960
         }
961 961
 
962 962
         $data->root_web = api_add_trailing_slash($data->root_web);
@@ -980,7 +980,7 @@  discard block
 block discarded – undo
980 980
                 Display::addFlash(
981 981
                     Display::return_message('Cannot create slug from url: '.$data->root_web, 'error')
982 982
                 );
983
-                return ;
983
+                return;
984 984
             }
985 985
             Database::insert($tablename, (array) $data);
986 986
         }
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
                 $newDatabase->sitename = $siteName;
1123 1123
                 $newDatabase->institution = $institution;
1124 1124
                 $slug = $newDatabase->slug = $data->slug = Virtual::getSlugFromUrl($data->root_web);
1125
-                $id = Database::insert($table, (array)$newDatabase);
1125
+                $id = Database::insert($table, (array) $newDatabase);
1126 1126
             }
1127 1127
         }
1128 1128
 
@@ -1299,7 +1299,7 @@  discard block
 block discarded – undo
1299 1299
             $id = (int) $id;
1300 1300
             $sql = "SELECT * FROM vchamilo WHERE id = $id";
1301 1301
             $result = Database::query($sql);
1302
-            $vhost =  (object) Database::fetch_array($result, 'ASSOC');
1302
+            $vhost = (object) Database::fetch_array($result, 'ASSOC');
1303 1303
         }
1304 1304
 
1305 1305
         return $vhost;
Please login to merge, or discard this patch.