Просмотр исходного кода

Feature/nextcloud update (#3725)

* Fix setup failure/req. PHP +8

* Bump min mem to 512M

* Run Pretier

---------

Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
Stephen J. Carnam 2 лет назад
Родитель
Сommit
a63b2e68f6
1 измененных файлов с 12 добавлено и 1 удалено
  1. 12 1
      web/src/app/WebApp/Installers/Nextcloud/NextcloudSetup.php

+ 12 - 1
web/src/app/WebApp/Installers/Nextcloud/NextcloudSetup.php

@@ -29,7 +29,7 @@ class NextcloudSetup extends BaseSetup {
 				"template" => "owncloud",
 			],
 			"php" => [
-				"supported" => ["7.4", "8.0", "8.1"],
+				"supported" => ["8.0", "8.1", "8.2"],
 			],
 		],
 	];
@@ -69,6 +69,17 @@ class NextcloudSetup extends BaseSetup {
 			],
 			$status,
 		);
+
+		// Bump minimum memory limit to 512M
+		$result = null;
+		$file = $this->getDocRoot(".user.ini");
+		$this->appcontext->runUser("v-open-fs-file", [$file], $result);
+		array_push($result->raw, "memory_limit=512M");
+		$tmp = $this->saveTempFile(implode("\r\n", $result->raw));
+		if (!$this->appcontext->runUser("v-move-fs-file", [$tmp, $file], $result)) {
+			throw new \Exception("Error updating file in: " . $tmp . " " . $result->text);
+		}
+
 		return $status->code === 0;
 	}
 }