mikuli.cz

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

commit 4dcb4a2bd9eebae14a9e6cbd61f7d476ee175df8
parent 5b2a766c2d8184700318011df7024fe59834324d
Author: markseu <mark2011@mayberg.se>
Date:   Thu,  9 Dec 2021 19:55:46 +0100

Updated tool chain for system testing

Diffstat:
Msystem/extensions/core.php | 22++++++++--------------
Msystem/extensions/install-language.bin | 0
Msystem/extensions/install.php | 12++++++------
Msystem/extensions/update-current.ini | 14++++++++------
Msystem/extensions/update.php | 7++++---
5 files changed, 26 insertions(+), 29 deletions(-)

diff --git a/system/extensions/core.php b/system/extensions/core.php @@ -2,7 +2,7 @@ // Core extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/core class YellowCore { - const VERSION = "0.8.55"; + const VERSION = "0.8.56"; const RELEASE = "0.8.18"; public $page; // current page public $content; // content files @@ -2397,7 +2397,8 @@ class YellowLookup { $contentDirectoryLength = strlenu($this->yellow->system->get("coreContentDirectory")); $mediaDirectoryLength = strlenu($this->yellow->system->get("coreMediaDirectory")); $systemDirectoryLength = strlenu($this->yellow->system->get("coreSystemDirectory")); - return substru($fileName, 0, $contentDirectoryLength)==$this->yellow->system->get("coreContentDirectory") || + return strposu($fileName, "/")===false || + substru($fileName, 0, $contentDirectoryLength)==$this->yellow->system->get("coreContentDirectory") || substru($fileName, 0, $mediaDirectoryLength)==$this->yellow->system->get("coreMediaDirectory") || substru($fileName, 0, $systemDirectoryLength)==$this->yellow->system->get("coreSystemDirectory"); } @@ -3453,18 +3454,11 @@ class YellowToolbox { $textFiltered = ""; $textLength = strlenb($text); for ($pos=0; $pos<$textLength; ++$pos) { - if (($text[$pos]=="/" || $pos==0) && $pos+1<$textLength) { - if ($text[$pos+1]=="/") continue; - if ($text[$pos+1]==".") { - $posNew = $pos+1; - while ($text[$posNew]==".") { - ++$posNew; - } - if ($text[$posNew]=="/" || $text[$posNew]=="") { - $pos = $posNew-1; - continue; - } - } + if ($text[$pos]=="." && ($pos==0 || $text[$pos-1]=="/")) { + while ($text[$pos]==".") ++$pos; + if ($text[$pos]=="/") ++$pos; + --$pos; + continue; } $textFiltered .= $text[$pos]; } 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.60"; + const VERSION = "0.8.61"; const PRIORITY = "1"; public $yellow; // access to API @@ -288,12 +288,12 @@ class YellowInstall { $fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("updateCurrentFile"); $fileData = $this->yellow->toolbox->readFile($fileName); $settings = $this->yellow->toolbox->getTextSettings($fileData, "extension"); - $fileNames = array("yellow.php", "robots.txt", $fileName); + $fileNames = array($fileName); foreach ($settings as $extension=>$block) { foreach ($block as $key=>$value) { if (strposu($key, "/")) { list($entry, $flags) = $this->yellow->toolbox->getTextList($value, ",", 2); - if (preg_match("/delete/i", $flags)) continue; + if (!preg_match("/create/i", $flags)) continue; array_push($fileNames, $key); } } @@ -371,8 +371,8 @@ class YellowInstall { if ($key=="password" || $key=="status") continue; $settings[$key] = trim($value); } - $settings["sitename"] = $this->yellow->toolbox->detectServerSitename(); - $settings["coreTimezone"] = $this->yellow->toolbox->detectServerTimezone(); + if ($this->yellow->system->get("sitename")=="Datenstrom Yellow") $settings["sitename"] = $this->yellow->toolbox->detectServerSitename(); + if ($this->yellow->system->get("coreTimezone")=="UTC") $settings["coreTimezone"] = $this->yellow->toolbox->detectServerTimezone(); if ($this->yellow->system->get("coreStaticUrl")=="auto" && !empty(getenv("URL"))) $settings["coreStaticUrl"] = getenv("URL"); if ($this->yellow->system->get("updateEventPending")=="none") $settings["updateEventPending"] = "website/install"; $settings["updateCurrentRelease"] = YellowCore::RELEASE; @@ -417,7 +417,7 @@ class YellowInstall { $extension = basename($matches[1]); $extension = $this->yellow->lookup->normaliseName($extension, true, true); list($entry, $flags) = $this->yellow->toolbox->getTextList($matches[2], ",", 2); - $arguments = preg_split("/\s*,\s*/", $flags); + $arguments = preg_split("/\s*,\s*/", trim($flags)); $language = array_pop($arguments); if (preg_match("/^(.*)\.php$/", basename($entry))) { $languages[$language] = $extension; diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini @@ -21,11 +21,11 @@ Tag: feature system/extensions/command.php: command.php, create, update Extension: Core -Version: 0.8.55 +Version: 0.8.56 Description: Core functionality of the website. HelpUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/core DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/core.zip -Published: 2021-11-29 11:41:36 +Published: 2021-12-09 17:13:31 Developer: Datenstrom Tag: feature system/extensions/core.php: core.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.60 +Version: 0.8.61 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-11-29 15:38:17 +Published: 2021-12-09 12:27:33 Developer: Datenstrom Status: unlisted system/extensions/install.php: install.php, create @@ -82,6 +82,8 @@ 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.pdf: yellow.pdf, create +./yellow.php: yellow.php, create +./robots.txt: robots.txt, create Extension: Markdown Version: 0.8.17 @@ -129,11 +131,11 @@ system/themes/stockholm-opensans-light.woff: stockholm-opensans-light.woff, crea system/themes/stockholm-opensans-regular.woff: stockholm-opensans-regular.woff, create, update, careful Extension: Update -Version: 0.8.62 +Version: 0.8.63 Description: Keep your website up to date. HelpUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/update DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/update.zip -Published: 2021-11-29 17:22:46 +Published: 2021-12-09 15:00:07 Developer: Datenstrom Tag: feature system/extensions/update.php: update.php, create, update diff --git a/system/extensions/update.php b/system/extensions/update.php @@ -2,7 +2,7 @@ // Update extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/update class YellowUpdate { - const VERSION = "0.8.62"; + const VERSION = "0.8.63"; const PRIORITY = "2"; public $yellow; // access to API public $updates; // number of updates @@ -760,8 +760,9 @@ class YellowUpdate { $invalid = false; foreach ($settings as $key=>$value) { if (strposu($key, "/")) { - if (!$this->yellow->lookup->isValidFile($key)) $invalid = true; - if ($oldModified==0) $oldModified = $this->yellow->toolbox->getFileModified($key); + $fileName = $this->yellow->toolbox->normalisePath($key); + if (!$this->yellow->lookup->isValidFile($fileName)) $invalid = true; + if ($oldModified==0) $oldModified = $this->yellow->toolbox->getFileModified($fileName); } } if ($invalid) $extension = $version = "";