commit 11ad5cb68e69d3459e55978d2b936e4b01859218
parent c9cac5ec7615fc3e646fe74607e40c87ecd71048
Author: markseu <mark2011@mayberg.se>
Date: Wed, 20 Mar 2024 19:47:39 +0100
Updated installer for testing available extensions
Diffstat:
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/system/extensions/install.php b/system/extensions/install.php
@@ -2,7 +2,7 @@
// Install extension, https://github.com/annaesvensson/yellow-install
class YellowInstall {
- const VERSION = "0.8.93";
+ const VERSION = "0.8.94";
const PRIORITY = "1";
public $yellow; // access to API
@@ -177,7 +177,7 @@ class YellowInstall {
$statusCode = 200;
if ($this->yellow->extension->isExisting("update")) {
if ($option=="maximal") {
- $statusCode = $this->downloadExtensionsLatest();
+ $statusCode = $this->downloadExtensionsAvailable();
$path = $this->yellow->system->get("coreExtensionDirectory");
foreach ($this->yellow->toolbox->getDirectoryEntries($path, "/^.*\.bin$/", true, false) as $entry) {
if (basename($entry)=="install-language.bin") continue;
@@ -391,12 +391,12 @@ class YellowInstall {
return $rewrite;
}
- // Download latest extension files
- public function downloadExtensionsLatest() {
+ // Download available extension files
+ public function downloadExtensionsAvailable() {
$statusCode = 200;
if ($this->yellow->extension->isExisting("update")) {
$path = $this->yellow->system->get("coreExtensionDirectory");
- $fileData = $this->yellow->toolbox->readFile($path.$this->yellow->system->get("updateLatestFile"));
+ $fileData = $this->yellow->toolbox->readFile($path.$this->yellow->system->get("updateAvailableFile"));
$settings = $this->yellow->toolbox->getTextSettings($fileData, "extension");
$extensionsNow = 0;
$extensionsEstimated = count($settings) - substr_count(strtoloweru($fileData), "tag: language");
@@ -405,7 +405,7 @@ class YellowInstall {
$fileName = $path."install-".$this->yellow->lookup->normaliseName($key, true, false, true).".bin";
if (is_file($fileName)) continue;
if (preg_match("/language/i", $value->get("tag"))) continue;
- echo "\rDownloading latest extensions ".$this->getProgressPercent(++$extensionsNow, $extensionsEstimated, 5, 95)."%... ";
+ echo "\rDownloading available extensions ".$this->getProgressPercent(++$extensionsNow, $extensionsEstimated, 5, 95)."%... ";
$url = $value->get("downloadUrl");
curl_setopt($curlHandle, CURLOPT_URL, $this->yellow->extension->get("update")->getExtensionDownloadUrl($url));
curl_setopt($curlHandle, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; YellowInstall/".YellowInstall::VERSION).")";
@@ -427,15 +427,15 @@ class YellowInstall {
$this->yellow->page->error($statusCode, "Can't write file '$fileName'!");
}
if ($this->yellow->system->get("coreDebugMode")>=2 && !is_string_empty($redirectUrl)) {
- echo "YellowInstall::downloadExtensionsLatest redirected to url:$redirectUrl<br/>\n";
+ echo "YellowInstall::downloadExtensionsAvailable redirected to url:$redirectUrl<br/>\n";
}
if ($this->yellow->system->get("coreDebugMode")>=2) {
- echo "YellowInstall::downloadExtensionsLatest status:$statusCode url:$url<br/>\n";
+ echo "YellowInstall::downloadExtensionsAvailable status:$statusCode url:$url<br/>\n";
}
if ($statusCode!=200) break;
}
curl_close($curlHandle);
- echo "\rDownloading latest extensions 100%... done\n";
+ echo "\rDownloading available extensions 100%... done\n";
}
return $statusCode;
}
diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini
@@ -58,12 +58,12 @@ media/images/photo.jpg: photo.jpg, create, optional
media/thumbnails/photo-100x40.jpg: photo-100x40.jpg, create, optional
Extension: Install
-Version: 0.8.93
+Version: 0.8.94
Description: Install a brand new website.
DownloadUrl: https://github.com/annaesvensson/yellow-install/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-install
DocumentationLanguage: en, de, sv
-Published: 2023-12-04 20:53:04
+Published: 2024-03-20 19:41:21
Developer: Anna Svensson
Status: unlisted
system/extensions/install.php: install.php, create