mikuli.cz

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

commit e1f5986c4b346b0f4b879f43376615d3e8ee769c
parent be57613d7ee3fe0a45b5ec2c3d49ed70a39c1c1d
Author: markseu <mark2011@mayberg.se>
Date:   Thu, 28 Apr 2022 09:07:02 +0200

Refactored code, spring cleanup

Diffstat:
Msystem/extensions/core.php | 15+++++++--------
Msystem/extensions/update-current.ini | 4++--
2 files changed, 9 insertions(+), 10 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.73"; + const VERSION = "0.8.74"; const RELEASE = "0.8.19"; public $page; // current page public $content; // content files @@ -639,8 +639,10 @@ class YellowPage { // Parse page layout public function parsePageLayout($name) { foreach ($this->yellow->content->getShared($this->location) as $page) { - $this->sharedPages[basename($page->location)] = $page; - $page->sharedPages["main"] = $this; + if ($page->get("status")=="shared") { + $this->sharedPages[basename($page->location)] = $page; + $page->sharedPages["main"] = $this; + } } $this->outputData = null; foreach ($this->yellow->extension->data as $key=>$value) { @@ -1374,11 +1376,8 @@ class YellowContent { // Return shared pages public function getShared($location) { $pages = new YellowPageCollection($this->yellow); - $location = $this->getHomeLocation($location)."shared/"; - foreach ($this->scanLocation($location) as $page) { - if ($page->get("status")=="shared") $pages->append($page); - } - return $pages; + $sharedLocation = $this->getHomeLocation($location)."shared/"; + return $pages->merge($this->scanLocation($sharedLocation)); } // Return root location 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.73 +Version: 0.8.74 Description: Core functionality of the website. DocumentationUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/core DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/core.zip -Published: 2022-04-25 13:22:21 +Published: 2022-04-28 08:48:31 Developer: Datenstrom Tag: feature system/extensions/core.php: core.php, create, update