mikuli.cz

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

commit 33436c99a052196a0f174f1c64dacf2cdd106eb4
parent 190da3344f2acd2c9eef452b6060c3b67a8a1c80
Author: markseu <mark2011@mayberg.se>
Date:   Sun, 22 Nov 2020 20:29:24 +0100

Updated core, file lookup

Diffstat:
Msystem/extensions/core.php | 17++++-------------
Msystem/extensions/update-current.ini | 4++--
2 files changed, 6 insertions(+), 15 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.33"; + const VERSION = "0.8.34"; const RELEASE = "0.8.16"; public $page; // current page public $content; // content files @@ -2056,8 +2056,7 @@ class YellowLookup { if ($i || $token!=$pathHome) $location .= $token; } $token = $this->normaliseToken($tokens[$i], $fileExtension); - $fileFolder = $this->normaliseToken($tokens[$i-1], $fileExtension); - if ($token!=$fileDefault && $token!=$fileFolder) { + if ($token!=$fileDefault) { $location .= $this->normaliseToken($tokens[$i], $fileExtension, true); } $extension = ($pos = strrposu($fileName, ".")) ? substru($fileName, $pos) : ""; @@ -2110,8 +2109,7 @@ class YellowLookup { if (!$directory) { if (!strempty($tokens[$i])) { $token = $tokens[$i].$fileExtension; - $fileFolder = $tokens[$i-1].$fileExtension; - if ($token==$fileDefault || $token==$fileFolder) $invalid = true; + if ($token==$fileDefault) $invalid = true; $path .= $this->findFileDirectory($path, $token, $fileExtension, false, true, $found, $invalid); } else { $path .= $this->findFileDefault($path, $fileDefault, $fileExtension, false); @@ -2146,17 +2144,12 @@ class YellowLookup { public function findFileDefault($path, $fileDefault, $fileExtension, $includePath = true) { $token = $fileDefault; if (!is_file($path."/".$fileDefault)) { - $fileFolder = $this->normaliseToken(basename($path), $fileExtension); - $regex = "/^[\d\-\_\.]*($fileDefault|$fileFolder)$/"; + $regex = "/^[\d\-\_\.]*($fileDefault)$/"; foreach ($this->yellow->toolbox->getDirectoryEntries($path, $regex, true, false, false) as $entry) { if ($this->normaliseToken($entry, $fileExtension)==$fileDefault) { $token = $entry; break; } - if ($this->normaliseToken($entry, $fileExtension)==$fileFolder) { - $token = $entry; - break; - } } } return $includePath ? "$path/$token" : $token; @@ -2174,11 +2167,9 @@ class YellowLookup { array_push($fileNames, $path.$entry."/".$token); } if (!$this->isRootLocation($location)) { - $fileFolder = $this->normaliseToken(basename($path), $fileExtension); $regex = "/^.*\\".$fileExtension."$/"; foreach ($this->yellow->toolbox->getDirectoryEntries($path, $regex, true, false, false) as $entry) { if ($this->normaliseToken($entry, $fileExtension)==$fileDefault) continue; - if ($this->normaliseToken($entry, $fileExtension)==$fileFolder) continue; array_push($fileNames, $path.$entry); } } 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.33 +Version: 0.8.34 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: 2020-11-18 23:31:02 +Published: 2020-11-22 19:14:02 Developer: Datenstrom Tag: feature system/extensions/core.php: core.php, create, update