mikuli.cz

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

commit a37a18d7bd20e88523ee6b6f8b2e7b78a310ea23
parent 0a7a5ac22bab34867113e76f48298bbbfa13232b
Author: markseu <mark2011@mayberg.se>
Date:   Wed, 19 Oct 2022 10:57:52 +0200

Updated core for PHP 8.1 compatibility

Diffstat:
Msystem/extensions/core.php | 9+++++----
Msystem/extensions/update-current.ini | 4++--
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/system/extensions/core.php b/system/extensions/core.php @@ -2,7 +2,7 @@ // Core extension, https://github.com/annaesvensson/yellow-core class YellowCore { - const VERSION = "0.8.93"; + const VERSION = "0.8.94"; const RELEASE = "0.8.21"; public $page; // current page public $content; // content files @@ -119,7 +119,7 @@ class YellowCore { if ($this->page->isError()) $statusCode = $this->processRequestError(); ob_end_flush(); $this->toolbox->timerStop($time); - if ($this->system->get("coreDebugMode")>=1 && $this->lookup->isContentFile($fileName)) { + if ($this->system->get("coreDebugMode")>=1 && ($this->lookup->isContentFile($fileName) || $this->page->isError())) { echo "YellowCore::request status:$statusCode time:$time ms<br/>\n"; } return $statusCode; @@ -144,12 +144,12 @@ class YellowCore { if ($statusCode==0) { if ($this->lookup->isContentFile($fileName)) { $statusCode = $this->sendPage($scheme, $address, $base, $location, $fileName, $cacheable, true); - } else { + } elseif (!empty($fileName)) { $statusCode = $this->sendFile(200, $fileName, $cacheable); } if (!is_readable($fileName)) $this->page->error(404); } - if ($this->system->get("coreDebugMode")>=1 && $this->lookup->isContentFile($fileName)) { + if ($this->system->get("coreDebugMode")>=1 && ($this->lookup->isContentFile($fileName) || $this->page->isError())) { echo "YellowCore::processRequest file:$fileName<br/>\n"; } return $statusCode; @@ -350,6 +350,7 @@ class YellowCore { } } $location = substru($this->toolbox->detectServerLocation(), strlenu($base)); + $fileName = ""; if (empty($fileName)) $fileName = $this->lookup->findFileFromMediaLocation($location); if (empty($fileName)) $fileName = $this->lookup->findFileFromContentLocation($location); return array($scheme, $address, $base, $location, $fileName); diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini @@ -11,11 +11,11 @@ Tag: feature system/extensions/command.php: command.php, create, update Extension: Core -Version: 0.8.93 +Version: 0.8.94 Description: Core functionality of the website. DocumentationUrl: https://github.com/annaesvensson/yellow-core DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/core.zip -Published: 2022-10-10 16:58:48 +Published: 2022-10-19 10:46:26 Developer: Mark Seuffert, David Fehrmann Tag: feature system/extensions/core.php: core.php, create, update