commit a019dd9f53729d15f7b98dae84e2c9741a22253c
parent 2c23111f7fa1f3bdf1ff7c4fad78b03e25f7a376
Author: markseu <mark2011@mayberg.se>
Date: Mon, 27 Jul 2020 10:35:28 +0200
Updated extensions for new API
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/system/extensions/update.php b/system/extensions/update.php
@@ -132,7 +132,7 @@ class YellowUpdate {
$fileDataNew = str_replace("toolbox->getTextArgs", "toolbox->getTextArguments", $fileDataNew);
$fileDataNew = str_replace("toolbox->normaliseArgs", "toolbox->normaliseArguments", $fileDataNew);
$fileDataNew = str_replace("toolbox->isLocationArgs", "toolbox->isLocationArguments", $fileDataNew);
- $fileDataNew = str_replace("text–>getHtml", "language–>getTextHtml", $fileDataNew);
+ $fileDataNew = str_replace("text->getHtml", "language->getTextHtml", $fileDataNew);
$fileDataNew = str_replace("\$this->yellow->page->get(\"navigation\")", "\"navigation\"", $fileDataNew);
$fileDataNew = str_replace("\$this->yellow->page->get(\"header\")", "\"header\"", $fileDataNew);
$fileDataNew = str_replace("\$this->yellow->page->get(\"sidebar\")", "\"sidebar\"", $fileDataNew);
@@ -153,12 +153,17 @@ class YellowUpdate {
$this->yellow->log("error", "Can't write directory '$pathDestination'!");
}
}
- foreach ($this->yellow->toolbox->getDirectoryEntriesRecursive($pathDestination, "/^.*\-icon\.png$/", true, false) as $entry) {
+ foreach ($this->yellow->toolbox->getDirectoryEntries($pathDestination, "/^.*\-icon\.png$/", true, false) as $entry) {
$entryShort = str_replace("-icon.png", ".png", $entry);
if (!is_file($entryShort) && !$this->yellow->toolbox->copyFile($entry, $entryShort)) {
$this->yellow->log("error", "Can't write file '$entryShort'!");
}
}
+ foreach ($this->yellow->toolbox->getDirectoryEntries($pathDestination, "/bundle-.*/", true, false) as $entry) {
+ if (!$this->yellow->toolbox->deleteFile($entry)) {
+ $this->yellow->log("error", "Can't delete file '$entry'!");
+ }
+ }
}
if ($this->yellow->system->get("metaDefaultImage")=="icon") {
$fileName = $this->yellow->system->get("coreSettingDirectory").$this->yellow->system->get("coreSystemFile");