Refactored code, spring cleanup
This commit is contained in:
parent
be57613d7e
commit
e1f5986c4b
2 changed files with 9 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue