mikuli.cz

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

commit fd27fe91ca8bd25e9aa30d255731bc1b5a615734
parent d0c6106b840914b9fd8f0f3ba342dab3db4c9a2c
Author: markseu <mark2011@mayberg.se>
Date:   Tue, 19 Apr 2022 23:11:57 +0200

Updated edit extension, user accounts with optional user description

Diffstat:
Msystem/extensions/edit.php | 22++++++++++++++--------
Msystem/extensions/install-language.bin | 0
Msystem/extensions/install.php | 5+++--
Msystem/extensions/update-current.ini | 8++++----
4 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/system/extensions/edit.php b/system/extensions/edit.php @@ -2,7 +2,7 @@ // Edit extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/edit class YellowEdit { - const VERSION = "0.8.57"; + const VERSION = "0.8.58"; public $yellow; // access to API public $response; // web response public $merge; // text merge @@ -23,8 +23,8 @@ class YellowEdit { $this->yellow->system->setDefault("editUserPasswordMinLength", "8"); $this->yellow->system->setDefault("editUserHashAlgorithm", "bcrypt"); $this->yellow->system->setDefault("editUserHashCost", "10"); - $this->yellow->system->setDefault("editUserHome", "/"); $this->yellow->system->setDefault("editUserAccess", "create, edit, delete, restore, upload"); + $this->yellow->system->setDefault("editUserHome", "/"); $this->yellow->system->setDefault("editLoginRestriction", "0"); $this->yellow->system->setDefault("editLoginSessionTimeout", "2592000"); $this->yellow->system->setDefault("editBruteForceProtection", "25"); @@ -164,12 +164,14 @@ class YellowEdit { } if ($status=="ok") { $name = $this->yellow->system->get("sitename"); + $userLanguage = $this->yellow->system->get("language"); $fileNameUser = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreUserFile"); $settings = array( "name" => $name, - "language" => $this->yellow->system->get("language"), - "home" => $this->yellow->system->get("editUserHome"), + "description" => $this->yellow->language->getText("editUserDescription", $userLanguage), + "language" => $userLanguage, "access" => $this->yellow->system->get("editUserAccess"), + "home" => $this->yellow->system->get("editUserHome"), "hash" => $this->response->createHash($password), "stamp" => $this->response->createStamp(), "pending" => "none", @@ -348,12 +350,14 @@ class YellowEdit { if ($this->response->status=="ok" && $this->response->isLoginRestriction()) $this->response->status = "next"; if ($this->response->status=="ok" && $this->isUserAccountTaken($email)) $this->response->status = "next"; if ($this->response->status=="ok") { + $userLanguage = $this->yellow->lookup->findContentLanguage($fileName, $this->yellow->system->get("language")); $fileNameUser = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreUserFile"); $settings = array( "name" => $name, - "language" => $this->yellow->lookup->findContentLanguage($fileName, $this->yellow->system->get("language")), - "home" => $this->yellow->system->get("editUserHome"), + "description" => $this->yellow->language->getText("editUserDescription", $userLanguage), + "language" => $userLanguage, "access" => $this->yellow->system->get("editUserAccess"), + "home" => $this->yellow->system->get("editUserHome"), "hash" => $this->response->createHash($password), "stamp" => $this->response->createStamp(), "pending" => "none", @@ -597,9 +601,10 @@ class YellowEdit { $fileNameUser = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreUserFile"); $settings = array( "name" => $name, + "description" => $this->yellow->user->getUser("description", $emailSource), "language" => $language, - "home" => $this->yellow->user->getUser("home", $emailSource), "access" => $this->yellow->user->getUser("access", $emailSource), + "home" => $this->yellow->user->getUser("home", $emailSource), "hash" => $this->response->createHash("none"), "stamp" => $this->response->createStamp(), "pending" => $emailSource, @@ -1257,10 +1262,11 @@ class YellowEditResponse { if ($this->isUser()) { $data["email"] = $this->userEmail; $data["name"] = $this->yellow->user->getUser("name", $this->userEmail); + $data["description"] = $this->yellow->user->getUser("description", $this->userEmail); $data["language"] = $this->yellow->user->getUser("language", $this->userEmail); $data["status"] = $this->yellow->user->getUser("status", $this->userEmail); - $data["home"] = $this->yellow->user->getUser("home", $this->userEmail); $data["access"] = $this->yellow->user->getUser("access", $this->userEmail); + $data["home"] = $this->yellow->user->getUser("home", $this->userEmail); } return $data; } diff --git a/system/extensions/install-language.bin b/system/extensions/install-language.bin Binary files differ. 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.69"; + const VERSION = "0.8.70"; const PRIORITY = "1"; public $yellow; // access to API @@ -186,9 +186,10 @@ class YellowInstall { $fileNameUser = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreUserFile"); $settings = array( "name" => $name, + "description" => $this->yellow->language->getText("editUserDescription", $language), "language" => $language, - "home" => "/", "access" => "create, edit, delete, restore, upload, configure, update", + "home" => "/", "hash" => $this->yellow->extension->get("edit")->response->createHash($password), "stamp" => $this->yellow->extension->get("edit")->response->createStamp(), "pending" => "none", diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini @@ -37,11 +37,11 @@ system/layouts/navigation.html: navigation.html, create, update, careful system/layouts/pagination.html: pagination.html, create, update, careful Extension: Edit -Version: 0.8.57 +Version: 0.8.58 Description: Edit your website in a web browser. DocumentationUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/edit DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/edit.zip -Published: 2022-04-18 23:11:04 +Published: 2022-04-19 22:33:56 Developer: Datenstrom Tag: feature system/extensions/edit.php: edit.php, create, update @@ -64,11 +64,11 @@ media/images/photo.jpg: photo.jpg, create, optional media/thumbnails/photo-100x40.jpg: photo-100x40.jpg, create, optional Extension: Install -Version: 0.8.69 +Version: 0.8.70 Description: Install a brand new, shiny website. DocumentationUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/install DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/install.zip -Published: 2022-04-18 23:25:29 +Published: 2022-04-19 22:49:34 Developer: Datenstrom Status: unlisted system/extensions/install.php: install.php, create