mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit a447f2f986f25adfca73f3ad2786cea4e567621f
parent 5b36a087a7082c1de13445b4efb2a4b33816064a
Author: markseu <mark2011@mayberg.se>
Date:   Tue, 17 Aug 2021 20:37:26 +0200

Updated install extension

Diffstat:
Msystem/extensions/install.php | 12+++++++++++-
Msystem/extensions/update-current.ini | 4++--
2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/system/extensions/install.php b/system/extensions/install.php @@ -2,7 +2,7 @@ // Install extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/install class YellowInstall { - const VERSION = "0.8.55"; + const VERSION = "0.8.56"; const PRIORITY = "1"; public $yellow; // access to API @@ -41,6 +41,7 @@ class YellowInstall { $this->yellow->page->parseData($this->getRawDataInstall(), false, $statusCode, $this->yellow->page->get("pageError")); if ($status=="install") $status = $this->updateExtension($extension)==200 ? "ok" : "error"; if ($status=="ok") $status = $this->updateUser($email, $password, $author, $language)==200 ? "ok" : "error"; + if ($status=="ok") $status = $this->updateAuthentication($scheme, $address, $base, $email)==200 ? "ok" : "error"; if ($status=="ok") $status = $this->updateContent($language, "installHome", "/")==200 ? "ok" : "error"; if ($status=="ok") $status = $this->updateContent($language, "installAbout", "/about/")==200 ? "ok" : "error"; if ($status=="ok") $status = $this->updateContent($language, "installDefault", "/shared/page-new-default")==200 ? "ok" : "error"; @@ -185,6 +186,15 @@ class YellowInstall { return $statusCode; } + // Update authentication + public function updateAuthentication($scheme, $address, $base, $email) { + if ($this->yellow->user->isExisting($email) && $this->yellow->extension->isExisting("edit")) { + $base = rtrim($base.$this->yellow->system->get("editLocation"), "/"); + $this->yellow->extension->get("edit")->response->createCookies($scheme, $address, $base, $email); + } + return 200; + } + // Update content public function updateContent($language, $name, $location) { $statusCode = 200; diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini @@ -65,11 +65,11 @@ media/images/photo.jpg: photo.jpg, create, optional media/thumbnails/photo-100x40.jpg: photo-100x40.jpg, create, optional Extension: Install -Version: 0.8.55 +Version: 0.8.56 Description: Install a brand new, shiny website. HelpUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/install DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/install.zip -Published: 2021-08-16 17:03:56 +Published: 2021-08-17 20:31:42 Developer: Datenstrom Status: unlisted system/extensions/install.php: install.php, create