| @@ -45,28 +45,19 @@ | ||
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * @throws MissingColumnsException |
| 48 | 48 | */ |
| 49 | - private function runInstall(): void | |
| 50 | - { | |
| 51 | - $this->databaseHandler->install(); | |
| 52 | - } | |
| 53 | - | |
| 54 | - /** | |
| 55 | - * @throws MissingColumnsException | |
| 56 | - */ | |
| 57 | 49 | public function install(bool $networkWide = false): void |
| 58 | 50 | { |
| 59 | - if ($networkWide === true) { | |
| 60 | - $blogIds = $this->getBlogIds(); | |
| 51 | + if ($networkWide === false) { | |
| 52 | + $this->databaseHandler->install(); | |
| 53 | + return; | |
| 54 | + } | |
| 61 | 55 | |
| 62 | - foreach ($blogIds as $blogId) { | |
| 63 | - $this->wordpress->switchToBlog($blogId); | |
| 64 | - $this->runInstall(); | |
| 65 | - $this->wordpress->restoreCurrentBlog(); | |
| 66 | - } | |
| 67 | - } else { | |
| 68 | - $this->runInstall(); | |
| 56 | + foreach ($this->getBlogIds() as $blogId) { | |
| 57 | + $this->wordpress->switchToBlog($blogId); | |
| 58 | + $this->databaseHandler->install(); | |
| 59 | + $this->wordpress->restoreCurrentBlog(); | |
| 69 | 60 | } |
| 70 | 61 | } |
| 71 | 62 | |
| 72 | 63 | public function update(): bool |