Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console / src / Command / Multisite / NewCommand.php
index 5f8bcf1b547c72752af3fed73c49496446b0c106..cabaa4306efcb5d3d9220ff53e85a920e685473c 100644 (file)
@@ -70,7 +70,7 @@ class NewCommand extends Command
             )
             ->addOption(
                 'copy-default',
-                '',
+                null,
                 InputOption::VALUE_NONE,
                 $this->trans('commands.multisite.new.options.copy-default')
             );
@@ -159,7 +159,7 @@ class NewCommand extends Command
             throw new FileNotFoundException($this->trans('commands.multisite.new.errors.sites-missing'));
         }
 
-        $sites_file_contents .= "\n\$sites['$uri'] = '$this->directory';";
+        $sites_file_contents .= "\n\$sites['$this->directory'] = '$this->directory';";
 
         try {
             $this->fs->dumpFile($this->appRoot . '/sites/sites.php', $sites_file_contents);
@@ -183,7 +183,7 @@ class NewCommand extends Command
                     'sites/default/settings.php'
                 )
             );
-            return;
+            return 1;
         }
 
         if ($this->fs->exists($this->appRoot . '/sites/default/files')) {
@@ -200,7 +200,7 @@ class NewCommand extends Command
                         'sites/' . $this->directory . '/files'
                     )
                 );
-                return;
+                return 1;
             }
         } else {
             $io->warning($this->trans('commands.multisite.new.warnings.missing-files'));
@@ -221,7 +221,7 @@ class NewCommand extends Command
                     'sites/' . $this->directory . '/settings.php'
                 )
             );
-            return;
+            return 1;
         }
 
         $this->chmodSettings($io);
@@ -255,7 +255,7 @@ class NewCommand extends Command
                         $this->appRoot . '/sites/' . $this->directory . '/settings.php'
                     )
                 );
-                return;
+                return 1;
             }
         } else {
             $io->error(
@@ -264,7 +264,7 @@ class NewCommand extends Command
                     'sites/default/default.settings.php'
                 )
             );
-            return;
+            return 1;
         }
 
         $this->chmodSettings($io);
@@ -275,6 +275,8 @@ class NewCommand extends Command
                 $this->directory
             )
         );
+
+        return 0;
     }
 
     /**
@@ -297,6 +299,8 @@ class NewCommand extends Command
                     $this->appRoot . '/sites/' . $this->directory . '/settings.php'
                 )
             );
+
+            return 1;
         }
     }
 }