commit fa1f6a7f32e6828a9b2c6d0248aa2d9bca40664c
parent aa80148bf382db66f8b7812af64532876268f421
Author: markseu <mark2011@mayberg.se>
Date: Wed, 28 Aug 2024 10:20:08 +0200
Updated extension for Jérôme, fix warning
Diffstat:
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/system/extensions/update-available.ini b/system/extensions/update-available.ini
@@ -149,14 +149,14 @@ system/themes/copenhagen.css: copenhagen.css, create, update, careful
system/themes/copenhagen.png: copenhagen.png, create
Extension: Core
-Version: 0.9.11
+Version: 0.9.12
Description: Core functionality of your website.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-core
DocumentationLanguage: en, de, sv
-Published: 2024-07-22 11:47:55
+Published: 2024-08-28 10:15:04
Status: available
system/workers/core.php: core.php, create, update
system/extensions/core.php: corepatch.txt, update
diff --git a/system/extensions/yellow-extension.ini b/system/extensions/yellow-extension.ini
@@ -1,14 +1,14 @@
# Datenstrom Yellow extension settings
Extension: Core
-Version: 0.9.11
+Version: 0.9.12
Description: Core functionality of your website.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-core
DocumentationLanguage: en, de, sv
-Published: 2024-07-22 11:47:55
+Published: 2024-08-28 10:15:04
Status: available
system/workers/core.php: core.php, create, update
system/extensions/core.php: corepatch.txt, update
diff --git a/system/workers/core.php b/system/workers/core.php
@@ -2,7 +2,7 @@
// Core extension, https://github.com/annaesvensson/yellow-core
class YellowCore {
- const VERSION = "0.9.11";
+ const VERSION = "0.9.12";
const RELEASE = "0.9";
public $content; // content files
public $media; // media files
@@ -602,16 +602,17 @@ class YellowMedia {
// Return parent location
public function getParentLocation($location) {
+ $parentLocation = "";
$token = rtrim($this->yellow->system->get("coreMediaLocation"), "/");
if (preg_match("#^($token.*\/).+?$#", $location, $matches)) {
if ($matches[1]!="$token/" || $this->yellow->lookup->isFileLocation($location)) $parentLocation = $matches[1];
}
- if (is_string_empty($parentLocation)) $parentLocation = "";
return $parentLocation;
}
// Return top-level location
public function getParentTopLocation($location) {
+ $parentTopLocation = "";
$token = rtrim($this->yellow->system->get("coreMediaLocation"), "/");
if (preg_match("#^($token.+?\/)#", $location, $matches)) $parentTopLocation = $matches[1];
if (is_string_empty($parentTopLocation)) $parentTopLocation = "$token/";