PluginProbe
User Access Manager / 2.3.16
User Access Manager v2.3.16
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/Setup/SetupHandler.php +17 -8 trunk2.3.16 View file →
@@ -45,19 +45,28 @@
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 + */
49 57 public function install(bool $networkWide = false): void
50 58 {
51 - if ($networkWide === false) {
52 - $this->databaseHandler->install();
53 - return;
54 - }
59 + if ($networkWide === true) {
60 + $blogIds = $this->getBlogIds();
55 61
56 - foreach ($this->getBlogIds() as $blogId) {
57 - $this->wordpress->switchToBlog($blogId);
58 - $this->databaseHandler->install();
59 - $this->wordpress->restoreCurrentBlog();
62 + foreach ($blogIds as $blogId) {
63 + $this->wordpress->switchToBlog($blogId);
64 + $this->runInstall();
65 + $this->wordpress->restoreCurrentBlog();
66 + }
67 + } else {
68 + $this->runInstall();
60 69 }
61 70 }
62 71
63 72 public function update(): bool