commit b58c0161fba9d9eedc5b145bfe1fa5d3030fd1e5
parent 5d106b479b8861726800860bd7e53d8973abff23
Author: markseu <mark2011@mayberg.se>
Date: Fri, 18 Nov 2022 19:52:07 +0100
Updated install extension, skip installation
Diffstat:
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/system/extensions/install.php b/system/extensions/install.php
@@ -2,7 +2,7 @@
// Install extension, https://github.com/annaesvensson/yellow-install
class YellowInstall {
- const VERSION = "0.8.85";
+ const VERSION = "0.8.86";
const PRIORITY = "1";
public $yellow; // access to API
@@ -83,7 +83,7 @@ class YellowInstall {
} elseif ($command=="skip" && $text=="installation") {
$statusCode = $this->updateLog();
if ($statusCode==200) $statusCode = $this->updateLanguages();
- if ($statusCode==200) $statusCode = $this->updateSettings();
+ if ($statusCode==200) $statusCode = $this->updateSettings(true);
if ($statusCode==200) $statusCode = $this->removeInstall();
if ($statusCode>=400) {
echo "ERROR installing files: ".$this->yellow->page->errorMessage."\n";
@@ -236,10 +236,10 @@ class YellowInstall {
}
// Update settings
- public function updateSettings() {
+ public function updateSettings($skipInstallation = false) {
$statusCode = 200;
$fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreSystemFile");
- if (!$this->yellow->system->save($fileName, $this->getSystemSettings())) {
+ if (!$this->yellow->system->save($fileName, $this->getSystemSettings($skipInstallation))) {
$statusCode = 500;
$this->yellow->page->error($statusCode, "Can't write file '$fileName'!");
}
@@ -386,7 +386,7 @@ class YellowInstall {
}
// Return system settings
- public function getSystemSettings() {
+ public function getSystemSettings($skipInstallation) {
$settings = array();
foreach ($_REQUEST as $key=>$value) {
if (!$this->yellow->system->isExisting($key)) continue;
@@ -395,6 +395,7 @@ class YellowInstall {
}
if ($this->yellow->system->get("sitename")=="Datenstrom Yellow") $settings["sitename"] = $this->yellow->toolbox->detectServerSitename();
if ($this->yellow->system->get("commandStaticUrl")=="auto" && getenv("URL")!==false) $settings["commandStaticUrl"] = getenv("URL");
+ if ($this->yellow->system->get("commandStaticUrl")=="auto" && $skipInstallation) $settings["commandStaticUrl"] = "http://localhost:8000/";
if ($this->yellow->system->get("coreTimezone")=="UTC") $settings["coreTimezone"] = $this->yellow->toolbox->detectServerTimezone();
if ($this->yellow->system->get("updateEventPending")=="none") $settings["updateEventPending"] = "website/install";
$settings["updateCurrentRelease"] = YellowCore::RELEASE;
diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini
@@ -54,11 +54,11 @@ media/images/photo.jpg: photo.jpg, create, optional
media/thumbnails/photo-100x40.jpg: photo-100x40.jpg, create, optional
Extension: Install
-Version: 0.8.85
+Version: 0.8.86
Description: Install a brand new, shiny website.
DocumentationUrl: https://github.com/annaesvensson/yellow-install
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/install.zip
-Published: 2022-11-05 11:49:49
+Published: 2022-11-18 19:44:48
Developer: Anna Svensson
Status: unlisted
system/extensions/install.php: install.php, create