mikuli.cz

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

commit a6f1f7a38c101fcf5200e5e409e9b8e170972da3
parent fe74719705286dc83f444c5bb2096926bcd5fd9a
Author: markseu <mark2011@mayberg.se>
Date:   Wed,  3 Sep 2025 15:19:48 +0200

Improved site data cache

Diffstat:
Msystem/extensions/update-available.ini | 12++++++------
Asystem/extensions/update-installed.ini | 141+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dsystem/extensions/yellow-extension.ini | 142-------------------------------------------------------------------------------
Msystem/workers/core.php | 3+--
Msystem/workers/install.php | 8++++----
Msystem/workers/update.php | 10+++++++---
6 files changed, 159 insertions(+), 157 deletions(-)

diff --git a/system/extensions/update-available.ini b/system/extensions/update-available.ini @@ -149,14 +149,14 @@ system/themes/copenhagen.css: copenhagen.css, create, update, careful system/themes/copenhagen.png: copenhagen.png, create Extension: Core -Version: 0.9.15 +Version: 0.9.16 Description: Core functionality of your website. Developer: Anna Svensson Tag: feature DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip DocumentationUrl: https://github.com/annaesvensson/yellow-core DocumentationLanguage: en, de, sv -Published: 2025-03-06 11:17:10 +Published: 2025-09-03 11:42:50 Status: available system/workers/core.php: core.php, create, update system/extensions/core.php: corepatch.txt, update @@ -578,14 +578,14 @@ Status: available system/workers/private.php: private.php, create, update Extension: Publish -Version: 0.9.6 +Version: 0.9.7 Description: Make and publish extensions. Developer: Anna Svensson Tag: feature DownloadUrl: https://github.com/annaesvensson/yellow-publish/archive/refs/heads/main.zip DocumentationUrl: https://github.com/annaesvensson/yellow-publish DocumentationLanguage: en, de, sv -Published: 2025-02-24 11:38:13 +Published: 2025-09-03 11:54:29 Status: available system/workers/publish.php: publish.php, create, update @@ -753,14 +753,14 @@ Status: available system/workers/turkish.php: turkish.php, create, update Extension: Update -Version: 0.9.4 +Version: 0.9.5 Description: Keep your website up to date. Developer: Anna Svensson Tag: feature DownloadUrl: https://github.com/annaesvensson/yellow-update/archive/refs/heads/main.zip DocumentationUrl: https://github.com/annaesvensson/yellow-update DocumentationLanguage: en, de, sv -Published: 2024-04-13 00:52:43 +Published: 2025-09-03 12:18:10 Status: available system/workers/update.php: update.php, create, update system/workers/updatepatch.bin: updatepatch.php, create, additional diff --git a/system/extensions/update-installed.ini b/system/extensions/update-installed.ini @@ -0,0 +1,141 @@ +# Datenstrom Yellow extension settings + +Extension: Core +Version: 0.9.16 +Description: Core functionality of your website. +Developer: Anna Svensson +Tag: feature +DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip +DocumentationUrl: https://github.com/annaesvensson/yellow-core +DocumentationLanguage: en, de, sv +Published: 2025-09-03 11:42:50 +Status: available +system/workers/core.php: core.php, create, update +system/extensions/core.php: corepatch.txt, update +system/layouts/default.html: default.html, create, update, careful +system/layouts/error.html: error.html, create, update, careful +system/layouts/header.html: header.html, create, update, careful +system/layouts/footer.html: footer.html, create, update, careful +system/layouts/navigation.html: navigation.html, create, update, careful +system/layouts/pagination.html: pagination.html, create, update, careful + +Extension: Edit +Version: 0.9.11 +Description: Edit your website in a web browser. +Developer: Anna Svensson +Tag: feature +DownloadUrl: https://github.com/annaesvensson/yellow-edit/archive/refs/heads/main.zip +DocumentationUrl: https://github.com/annaesvensson/yellow-edit +DocumentationLanguage: en, de, sv +Published: 2025-08-11 17:12:59 +Status: available +system/workers/edit.php: edit.php, create, update +system/workers/edit.css: edit.css, create, update +system/workers/edit.js: edit.js, create, update +system/workers/edit-stack.svg: edit-stack.svg, create, update +content/shared/page-new-default.md: page-new-default.md, create, optional + +Extension: Generate +Version: 0.9.7 +Description: Generate a static website. +Developer: Anna Svensson +Tag: feature +DownloadUrl: https://github.com/annaesvensson/yellow-generate/archive/refs/heads/main.zip +DocumentationUrl: https://github.com/annaesvensson/yellow-generate +DocumentationLanguage: en, de, sv +Published: 2025-03-06 11:09:43 +Status: available +system/workers/generate.php: generate.php, create, update + +Extension: Image +Version: 0.9.3 +Description: Add images and thumbnails. +Developer: Anna Svensson +Tag: feature +DownloadUrl: https://github.com/annaesvensson/yellow-image/archive/refs/heads/main.zip +DocumentationUrl: https://github.com/annaesvensson/yellow-image +DocumentationLanguage: en, de, sv +Published: 2024-04-23 11:44:38 +Status: available +system/workers/image.php: image.php, create, update +media/images/photo.jpg: photo.jpg, create, optional +media/thumbnails/photo-100x40.jpg: photo-100x40.jpg, create, optional + +Extension: Install +Version: 0.9.5 +Description: Install a brand new website. +Developer: Anna Svensson +DownloadUrl: https://github.com/annaesvensson/yellow-install/archive/refs/heads/main.zip +DocumentationUrl: https://github.com/annaesvensson/yellow-install +DocumentationLanguage: en, de, sv +Published: 2025-09-03 10:57:50 +Status: unassembled +system/workers/install.php: install.php, create +system/workers/install-language.bin: install-language.bin, compress @source/yellow-language/, create +system/workers/install-wiki.bin: install-wiki.bin, compress @source/yellow-wiki/, create +system/workers/install-blog.bin: install-blog.bin, compress @source/yellow-blog/, create +system/extensions/yellow-system.ini: yellow-system.ini, create +system/extensions/yellow-user.ini: yellow-user.ini, create +system/extensions/yellow-language.ini: yellow-language.ini, create +content/1-home/page.md: 1-home-page.md, create +content/9-about/page.md: 9-about-page.md, create +content/shared/page-error-404.md: page-error-404.md, create +media/downloads/yellow-english.pdf: yellow-english.pdf, create +media/downloads/yellow-deutsch.pdf: yellow-deutsch.pdf, create +media/downloads/yellow-svenska.pdf: yellow-svenska.pdf, create +./yellow.php: yellow.php, create +./robots.txt: robots.txt, create + +Extension: Markdown +Version: 0.9.3 +Description: Text formatting for humans. +Developer: Anna Svensson +Tag: feature +DownloadUrl: https://github.com/annaesvensson/yellow-markdown/archive/refs/heads/main.zip +DocumentationUrl: https://github.com/annaesvensson/yellow-markdown +DocumentationLanguage: en, de, sv +Published: 2024-12-11 10:55:02 +Status: available +system/workers/markdown.php: markdown.php, create, update + +Extension: Serve +Version: 0.9.1 +Description: Built-in web server. +Developer: Anna Svensson +Tag: feature +DownloadUrl: https://github.com/annaesvensson/yellow-serve/archive/refs/heads/main.zip +DocumentationUrl: https://github.com/annaesvensson/yellow-serve +DocumentationLanguage: en, de, sv +Published: 2024-04-04 15:00:12 +Status: available +system/workers/serve.php: serve.php, create, update + +Extension: Stockholm +Version: 0.9.2 +Description: Stockholm is a clean theme. +Designer: Anna Svensson +Tag: default, theme +DownloadUrl: https://github.com/annaesvensson/yellow-stockholm/archive/refs/heads/main.zip +DocumentationUrl: https://github.com/annaesvensson/yellow-stockholm +DocumentationLanguage: en, de, sv +Published: 2024-04-27 10:50:42 +Status: available +system/workers/stockholm.php: stockholm.php, create, update +system/themes/stockholm.css: stockholm.css, create, update, careful +system/themes/stockholm.png: stockholm.png, create +system/themes/stockholm-opensans-bold.woff: stockholm-opensans-bold.woff, create, update, careful +system/themes/stockholm-opensans-light.woff: stockholm-opensans-light.woff, create, update, careful +system/themes/stockholm-opensans-regular.woff: stockholm-opensans-regular.woff, create, update, careful + +Extension: Update +Version: 0.9.5 +Description: Keep your website up to date. +Developer: Anna Svensson +Tag: feature +DownloadUrl: https://github.com/annaesvensson/yellow-update/archive/refs/heads/main.zip +DocumentationUrl: https://github.com/annaesvensson/yellow-update +DocumentationLanguage: en, de, sv +Published: 2025-09-03 12:18:10 +Status: available +system/workers/update.php: update.php, create, update +system/workers/updatepatch.bin: updatepatch.php, create, additional diff --git a/system/extensions/yellow-extension.ini b/system/extensions/yellow-extension.ini @@ -1,142 +0,0 @@ -# Datenstrom Yellow extension settings - -Extension: Core -Version: 0.9.15 -Description: Core functionality of your website. -Developer: Anna Svensson -Tag: feature -DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip -DocumentationUrl: https://github.com/annaesvensson/yellow-core -DocumentationLanguage: en, de, sv -Published: 2025-03-06 11:17:10 -Status: available -system/workers/core.php: core.php, create, update -system/extensions/core.php: corepatch.txt, update -system/layouts/default.html: default.html, create, update, careful -system/layouts/error.html: error.html, create, update, careful -system/layouts/header.html: header.html, create, update, careful -system/layouts/footer.html: footer.html, create, update, careful -system/layouts/navigation.html: navigation.html, create, update, careful -system/layouts/pagination.html: pagination.html, create, update, careful - -Extension: Edit -Version: 0.9.11 -Description: Edit your website in a web browser. -Developer: Anna Svensson -Tag: feature -DownloadUrl: https://github.com/annaesvensson/yellow-edit/archive/refs/heads/main.zip -DocumentationUrl: https://github.com/annaesvensson/yellow-edit -DocumentationLanguage: en, de, sv -Published: 2025-08-11 17:12:59 -Status: available -system/workers/edit.php: edit.php, create, update -system/workers/edit.css: edit.css, create, update -system/workers/edit.js: edit.js, create, update -system/workers/edit-stack.svg: edit-stack.svg, create, update -content/shared/page-new-default.md: page-new-default.md, create, optional - -Extension: Generate -Version: 0.9.7 -Description: Generate a static website. -Developer: Anna Svensson -Tag: feature -DownloadUrl: https://github.com/annaesvensson/yellow-generate/archive/refs/heads/main.zip -DocumentationUrl: https://github.com/annaesvensson/yellow-generate -DocumentationLanguage: en, de, sv -Published: 2025-03-06 11:09:43 -Status: available -system/workers/generate.php: generate.php, create, update - -Extension: Image -Version: 0.9.3 -Description: Add images and thumbnails. -Developer: Anna Svensson -Tag: feature -DownloadUrl: https://github.com/annaesvensson/yellow-image/archive/refs/heads/main.zip -DocumentationUrl: https://github.com/annaesvensson/yellow-image -DocumentationLanguage: en, de, sv -Published: 2024-04-23 11:44:38 -Status: available -system/workers/image.php: image.php, create, update -media/images/photo.jpg: photo.jpg, create, optional -media/thumbnails/photo-100x40.jpg: photo-100x40.jpg, create, optional - -Extension: Install -Version: 0.9.4 -Description: Install a brand new website. -Developer: Anna Svensson -DownloadUrl: https://github.com/annaesvensson/yellow-install/archive/refs/heads/main.zip -DocumentationUrl: https://github.com/annaesvensson/yellow-install -DocumentationLanguage: en, de, sv -Published: 2024-04-13 00:55:28 -Status: unassembled -system/workers/install.php: install.php, create -system/workers/install-language.bin: install-language.bin, compress @source/yellow-language/, create -system/workers/install-wiki.bin: install-wiki.bin, compress @source/yellow-wiki/, create -system/workers/install-blog.bin: install-blog.bin, compress @source/yellow-blog/, create -system/extensions/yellow-system.ini: yellow-system.ini, create -system/extensions/yellow-user.ini: yellow-user.ini, create -system/extensions/yellow-language.ini: yellow-language.ini, create -system/extensions/yellow-extension.ini: yellow-extension.ini, create -content/1-home/page.md: 1-home-page.md, create -content/9-about/page.md: 9-about-page.md, create -content/shared/page-error-404.md: page-error-404.md, create -media/downloads/yellow-english.pdf: yellow-english.pdf, create -media/downloads/yellow-deutsch.pdf: yellow-deutsch.pdf, create -media/downloads/yellow-svenska.pdf: yellow-svenska.pdf, create -./yellow.php: yellow.php, create -./robots.txt: robots.txt, create - -Extension: Markdown -Version: 0.9.3 -Description: Text formatting for humans. -Developer: Anna Svensson -Tag: feature -DownloadUrl: https://github.com/annaesvensson/yellow-markdown/archive/refs/heads/main.zip -DocumentationUrl: https://github.com/annaesvensson/yellow-markdown -DocumentationLanguage: en, de, sv -Published: 2024-12-11 10:55:02 -Status: available -system/workers/markdown.php: markdown.php, create, update - -Extension: Serve -Version: 0.9.1 -Description: Built-in web server. -Developer: Anna Svensson -Tag: feature -DownloadUrl: https://github.com/annaesvensson/yellow-serve/archive/refs/heads/main.zip -DocumentationUrl: https://github.com/annaesvensson/yellow-serve -DocumentationLanguage: en, de, sv -Published: 2024-04-04 15:00:12 -Status: available -system/workers/serve.php: serve.php, create, update - -Extension: Stockholm -Version: 0.9.2 -Description: Stockholm is a clean theme. -Designer: Anna Svensson -Tag: default, theme -DownloadUrl: https://github.com/annaesvensson/yellow-stockholm/archive/refs/heads/main.zip -DocumentationUrl: https://github.com/annaesvensson/yellow-stockholm -DocumentationLanguage: en, de, sv -Published: 2024-04-27 10:50:42 -Status: available -system/workers/stockholm.php: stockholm.php, create, update -system/themes/stockholm.css: stockholm.css, create, update, careful -system/themes/stockholm.png: stockholm.png, create -system/themes/stockholm-opensans-bold.woff: stockholm-opensans-bold.woff, create, update, careful -system/themes/stockholm-opensans-light.woff: stockholm-opensans-light.woff, create, update, careful -system/themes/stockholm-opensans-regular.woff: stockholm-opensans-regular.woff, create, update, careful - -Extension: Update -Version: 0.9.4 -Description: Keep your website up to date. -Developer: Anna Svensson -Tag: feature -DownloadUrl: https://github.com/annaesvensson/yellow-update/archive/refs/heads/main.zip -DocumentationUrl: https://github.com/annaesvensson/yellow-update -DocumentationLanguage: en, de, sv -Published: 2024-04-13 00:52:43 -Status: available -system/workers/update.php: update.php, create, update -system/workers/updatepatch.bin: updatepatch.php, create, additional diff --git a/system/workers/core.php b/system/workers/core.php @@ -2,7 +2,7 @@ // Core extension, https://github.com/annaesvensson/yellow-core class YellowCore { - const VERSION = "0.9.15"; + const VERSION = "0.9.16"; const RELEASE = "0.9"; public $content; // content files public $media; // media files @@ -40,7 +40,6 @@ class YellowCore { $this->system->setDefault("coreContentErrorFile", "page-error-(.*).md"); $this->system->setDefault("coreLanguageFile", "yellow-language.ini"); $this->system->setDefault("coreUserFile", "yellow-user.ini"); - $this->system->setDefault("coreExtensionFile", "yellow-extension.ini"); $this->system->setDefault("coreWebsiteFile", "yellow-website.log"); $this->system->setDefault("coreAssetLocation", "/assets/"); $this->system->setDefault("coreMediaLocation", "/media/"); diff --git a/system/workers/install.php b/system/workers/install.php @@ -2,7 +2,7 @@ // Install extension, https://github.com/annaesvensson/yellow-install class YellowInstall { - const VERSION = "0.9.4"; + const VERSION = "0.9.5"; const PRIORITY = "1"; public $yellow; // access to API @@ -301,7 +301,7 @@ class YellowInstall { $this->yellow->page->error($statusCode, "Can't delete file '$fileName'!"); } if ($statusCode==200) unset($this->yellow->extension->data["install"]); - $fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreExtensionFile"); + $fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("updateInstalledFile"); $fileData = $this->yellow->toolbox->readFile($fileName); $fileDataNew = $this->yellow->toolbox->unsetTextSettings($fileData, "extension", "install"); if ($statusCode==200 && !$this->yellow->toolbox->writeFile($fileName, $fileDataNew)) { @@ -337,7 +337,7 @@ class YellowInstall { // Check web server complete upload public function checkServerComplete() { $complete = true; - $fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreExtensionFile"); + $fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("updateInstalledFile"); $fileData = $this->yellow->toolbox->readFile($fileName); $settings = $this->yellow->toolbox->getTextSettings($fileData, "extension"); $fileNames = array($fileName); @@ -495,7 +495,7 @@ class YellowInstall { // Return extensions installed public function getExtensionsCount() { - $fileNameCurrent = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreExtensionFile"); + $fileNameCurrent = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("updateInstalledFile"); $fileData = $this->yellow->toolbox->readFile($fileNameCurrent); $settings = $this->yellow->toolbox->getTextSettings($fileData, "extension"); return count($settings); diff --git a/system/workers/update.php b/system/workers/update.php @@ -2,7 +2,7 @@ // Update extension, https://github.com/annaesvensson/yellow-update class YellowUpdate { - const VERSION = "0.9.4"; + const VERSION = "0.9.5"; const PRIORITY = "2"; public $yellow; // access to API public $extensions; // number of extensions @@ -13,6 +13,7 @@ class YellowUpdate { $this->yellow->system->setDefault("updateCurrentRelease", "none"); $this->yellow->system->setDefault("updateAvailableUrl", "auto"); $this->yellow->system->setDefault("updateAvailableFile", "update-available.ini"); + $this->yellow->system->setDefault("updateInstalledFile", "update-installed.ini"); $this->yellow->system->setDefault("updateExtensionFile", "extension.ini"); $this->yellow->system->setDefault("updateEventPending", "none"); $this->yellow->system->setDefault("updateEventDaily", "0"); @@ -254,6 +255,7 @@ class YellowUpdate { public function updateExtensions($action) { $statusCode = 200; if (function_exists("opcache_reset")) opcache_reset(); + $this->yellow->page->setHeader("Clear-Site-Data", "cache"); $path = $this->yellow->system->get("coreExtensionDirectory"); foreach ($this->yellow->toolbox->getDirectoryEntries($path, "/^.*\.zip$/", true, false) as $entry) { $statusCode = max($statusCode, $this->updateExtensionArchive($entry, $action)); @@ -370,6 +372,7 @@ class YellowUpdate { } unset($this->yellow->extension->data["updatepatch"]); if (function_exists("opcache_reset")) opcache_reset(); + $this->yellow->page->setHeader("Clear-Site-Data", "cache"); if (!$this->yellow->toolbox->deleteFile($fileName)) { $this->yellow->toolbox->log("error", "Can't delete file '$fileName'!"); } @@ -438,7 +441,7 @@ class YellowUpdate { // Update extension settings public function updateExtensionSettings($extension, $action, $text = "") { $statusCode = 200; - $fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreExtensionFile"); + $fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("updateInstalledFile"); $fileData = $fileDataNew = $this->yellow->toolbox->readFile($fileName); if ($action=="install" || $action=="update") { $settingsCurrent = $this->yellow->toolbox->getTextSettings($fileData, "extension"); @@ -609,6 +612,7 @@ class YellowUpdate { public function removeExtensions($settings) { $statusCode = 200; if (function_exists("opcache_reset")) opcache_reset(); + $this->yellow->page->setHeader("Clear-Site-Data", "cache"); foreach ($settings as $extension=>$block) { $statusCode = max($statusCode, $this->removeExtensionArchive($extension, "uninstall", $block)); } @@ -778,7 +782,7 @@ class YellowUpdate { $statusCode = 200; $settings = array(); if ($current) { - $fileNameCurrent = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreExtensionFile"); + $fileNameCurrent = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("updateInstalledFile"); $fileData = $this->yellow->toolbox->readFile($fileNameCurrent); $settings = $this->yellow->toolbox->getTextSettings($fileData, "extension"); foreach ($settings->getArrayCopy() as $key=>$value) {