Added files, new way of publishing

This commit is contained in:
markseu 2023-11-14 21:25:59 +01:00
parent 531e9a247b
commit 69e4a3c654
6 changed files with 79 additions and 74 deletions

Binary file not shown.

Binary file not shown.

View file

@ -4,7 +4,7 @@ Extension: Core
Version: 0.8.125
Description: Core functionality of your website.
DocumentationUrl: https://github.com/annaesvensson/yellow-core
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/core.zip
DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip
Published: 2023-10-27 17:02:46
Developer: Anna Svensson
Tag: feature
@ -20,7 +20,7 @@ Extension: Edit
Version: 0.8.76
Description: Edit your website in a web browser.
DocumentationUrl: https://github.com/annaesvensson/yellow-edit
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/edit.zip
DownloadUrl: https://github.com/annaesvensson/yellow-edit/archive/refs/heads/main.zip
Published: 2023-09-18 20:10:06
Developer: Anna Svensson
Tag: feature
@ -35,7 +35,7 @@ Extension: Generate
Version: 0.8.52
Description: Generate a static website.
DocumentationUrl: https://github.com/annaesvensson/yellow-generate
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/generate.zip
DownloadUrl: https://github.com/annaesvensson/yellow-generate/archive/refs/heads/main.zip
Published: 2023-06-09 15:56:36
Developer: Anna Svensson
Tag: feature
@ -45,7 +45,7 @@ Extension: Image
Version: 0.8.19
Description: Add images and thumbnails.
DocumentationUrl: https://github.com/annaesvensson/yellow-image
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/image.zip
DownloadUrl: https://github.com/annaesvensson/yellow-image/archive/refs/heads/main.zip
Published: 2023-04-16 23:50:53
Developer: Anna Svensson
Tag: feature
@ -57,14 +57,14 @@ Extension: Install
Version: 0.8.90
Description: Install a brand new website.
DocumentationUrl: https://github.com/annaesvensson/yellow-install
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/install.zip
DownloadUrl: https://github.com/annaesvensson/yellow-install/archive/refs/heads/main.zip
Published: 2023-05-26 12:46:13
Developer: Anna Svensson
Status: unlisted
system/extensions/install.php: install.php, create
system/extensions/install-language.bin: @base/downloads/language.zip, create
system/extensions/install-wiki.bin: @base/downloads/wiki.zip, create
system/extensions/install-blog.bin: @base/downloads/blog.zip, create
system/extensions/install-language.bin: install-language.bin, compress @source/yellow-language/, create
system/extensions/install-wiki.bin: install-wiki.bin, compress @source/yellow-wiki/, create
system/extensions/install-blog.bin: install-blog.bin, compress @source/yellow-blog/, create
system/extensions/yellow-system.ini: yellow-system.ini, create
system/extensions/yellow-user.ini: yellow-user.ini, create
system/extensions/yellow-language.ini: yellow-language.ini, create
@ -79,7 +79,7 @@ Extension: Markdown
Version: 0.8.26
Description: Text formatting for humans.
DocumentationUrl: https://github.com/annaesvensson/yellow-markdown
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/markdown.zip
DownloadUrl: https://github.com/annaesvensson/yellow-markdown/archive/refs/heads/main.zip
Published: 2023-09-18 20:49:33
Developer: Anna Svensson
Tag: feature
@ -89,7 +89,7 @@ Extension: Serve
Version: 0.8.24
Description: Built-in web server.
DocumentationUrl: https://github.com/annaesvensson/yellow-serve
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/serve.zip
DownloadUrl: https://github.com/annaesvensson/yellow-serve/archive/refs/heads/main.zip
Published: 2023-05-25 22:35:15
Developer: Anna Svensson
Tag: feature
@ -99,7 +99,7 @@ Extension: Stockholm
Version: 0.8.14
Description: Stockholm is a clean theme.
DocumentationUrl: https://github.com/annaesvensson/yellow-stockholm
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/stockholm.zip
DownloadUrl: https://github.com/annaesvensson/yellow-stockholm/archive/refs/heads/main.zip
Published: 2022-10-20 12:44:02
Designer: Anna Svensson
Tag: theme
@ -111,11 +111,11 @@ system/themes/stockholm-opensans-light.woff: stockholm-opensans-light.woff, crea
system/themes/stockholm-opensans-regular.woff: stockholm-opensans-regular.woff, create, update, careful
Extension: Update
Version: 0.8.95
Version: 0.8.96
Description: Keep your website up to date.
DocumentationUrl: https://github.com/annaesvensson/yellow-update
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/update.zip
Published: 2023-10-09 15:53:34
DownloadUrl: https://github.com/annaesvensson/yellow-update/archive/refs/heads/main.zip
Published: 2023-11-14 18:16:45
Developer: Anna Svensson
Tag: feature
system/extensions/update.php: update.php, create, update

View file

@ -20,7 +20,7 @@ Extension: Blog
Version: 0.8.30
Description: Blog for your website.
DocumentationUrl: https://github.com/annaesvensson/yellow-blog
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/blog.zip
DownloadUrl: https://github.com/annaesvensson/yellow-blog/archive/refs/heads/main.zip
Published: 2023-11-01 17:49:02
Developer: Anna Svensson
Tag: feature
@ -56,7 +56,7 @@ Extension: Catalan
Version: 0.8.43
Description: Catalan language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/catalan
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/catalan.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/catalan.zip
Published: 2023-04-13 22:54:43
Translator: Andreu Ferrer
Tag: language
@ -76,7 +76,7 @@ Extension: Chinese
Version: 0.8.43
Description: Chinese language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/chinese
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/chinese.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/chinese.zip
Published: 2023-04-13 22:53:25
Translator: Hyson Lee
Tag: language
@ -110,7 +110,7 @@ Extension: Core
Version: 0.8.125
Description: Core functionality of your website.
DocumentationUrl: https://github.com/annaesvensson/yellow-core
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/core.zip
DownloadUrl: https://github.com/annaesvensson/yellow-core/archive/refs/heads/main.zip
Published: 2023-10-27 17:02:46
Developer: Anna Svensson
Tag: feature
@ -126,7 +126,7 @@ Extension: Czech
Version: 0.8.43
Description: Czech language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/czech
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/czech.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/czech.zip
Published: 2023-04-13 22:59:43
Translator: Ufo Vyhuleny
Tag: language
@ -136,7 +136,7 @@ Extension: Danish
Version: 0.8.43
Description: Danish language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/danish
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/danish.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/danish.zip
Published: 2023-04-13 23:07:01
Translator: David Garcia
Tag: language
@ -156,7 +156,7 @@ Extension: Dutch
Version: 0.8.43
Description: Dutch language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/dutch
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/dutch.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/dutch.zip
Published: 2023-04-13 23:07:33
Translator: Robin Vannieuwenhuijse
Tag: language
@ -166,7 +166,7 @@ Extension: Edit
Version: 0.8.76
Description: Edit your website in a web browser.
DocumentationUrl: https://github.com/annaesvensson/yellow-edit
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/edit.zip
DownloadUrl: https://github.com/annaesvensson/yellow-edit/archive/refs/heads/main.zip
Published: 2023-09-18 20:10:06
Developer: Anna Svensson
Tag: feature
@ -201,7 +201,7 @@ Extension: English
Version: 0.8.43
Description: English language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/english
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/english.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/english.zip
Published: 2023-04-13 22:54:43
Translator: Mark Seuffert
Tag: language
@ -211,7 +211,7 @@ Extension: Feed
Version: 0.8.25
Description: Feed with recent changes.
DocumentationUrl: https://github.com/annaesvensson/yellow-feed
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/feed.zip
DownloadUrl: https://codeload.github.com/annaesvensson/yellow-feed/zip/refs/heads/main
Published: 2023-11-04 01:58:26
Developer: Anna Svensson
Tag: feature
@ -223,7 +223,7 @@ Extension: French
Version: 0.8.43
Description: French language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/french
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/french.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/french.zip
Published: 2023-04-13 23:07:59
Translator: Juh Nibreh
Tag: language
@ -233,7 +233,7 @@ Extension: Gallery
Version: 0.8.18
Description: Image gallery with popup.
DocumentationUrl: https://github.com/annaesvensson/yellow-gallery
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/gallery.zip
DownloadUrl: https://codeload.github.com/annaesvensson/yellow-gallery/zip/refs/heads/main
Published: 2022-11-04 09:39:17
Developer: Anna Svensson
Tag: feature
@ -249,7 +249,7 @@ Extension: Generate
Version: 0.8.52
Description: Generate a static website.
DocumentationUrl: https://github.com/annaesvensson/yellow-generate
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/generate.zip
DownloadUrl: https://github.com/annaesvensson/yellow-generate/archive/refs/heads/main.zip
Published: 2023-06-09 15:56:36
Developer: Anna Svensson
Tag: feature
@ -259,7 +259,7 @@ Extension: German
Version: 0.8.43
Description: German language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/german
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/german.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/german.zip
Published: 2023-04-13 22:54:43
Translator: David Fehrmann
Tag: language
@ -352,7 +352,7 @@ Extension: Hungarian
Version: 0.8.43
Description: Hungarian language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/hungarian
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/hungarian.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/hungarian.zip
Published: 2023-04-13 23:08:22
Translator: Ádám Tuba
Tag: language
@ -374,7 +374,7 @@ Extension: Image
Version: 0.8.19
Description: Add images and thumbnails.
DocumentationUrl: https://github.com/annaesvensson/yellow-image
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/image.zip
DownloadUrl: https://github.com/annaesvensson/yellow-image/archive/refs/heads/main.zip
Published: 2023-04-16 23:50:53
Developer: Anna Svensson
Tag: feature
@ -397,7 +397,7 @@ Extension: Italian
Version: 0.8.43
Description: Italian language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/italian
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/italian.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/italian.zip
Published: 2023-04-13 23:08:39
Translator: Giovanni Salmeri
Tag: language
@ -407,7 +407,7 @@ Extension: Japanese
Version: 0.8.43
Description: Japanese language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/japanese
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/japanese.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/japanese.zip
Published: 2023-04-13 23:03:24
Translator: Yuhko Senuma, Tomonori Ikeda
Tag: language
@ -439,7 +439,7 @@ Extension: Markdown
Version: 0.8.26
Description: Text formatting for humans.
DocumentationUrl: https://github.com/annaesvensson/yellow-markdown
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/markdown.zip
DownloadUrl: https://github.com/annaesvensson/yellow-markdown/archive/refs/heads/main.zip
Published: 2023-09-18 20:49:33
Developer: Anna Svensson
Tag: feature
@ -459,7 +459,7 @@ Extension: Norwegian
Version: 0.8.43
Description: Norwegian language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/norwegian
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/norwegian.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/norwegian.zip
Published: 2023-04-13 23:08:53
Translator: Per Arne Solvik
Tag: language
@ -487,7 +487,7 @@ Extension: Parsedown
Version: 0.8.26
Description: Text formatting for humans.
DocumentationUrl: https://github.com/annaesvensson/yellow-parsedown
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/parsedown.zip
DownloadUrl: https://github.com/annaesvensson/yellow-parsedown/archive/refs/heads/main.zip
Published: 2023-09-18 20:49:49
Developer: Anna Svensson
Tag: feature
@ -497,7 +497,7 @@ Extension: Polish
Version: 0.8.43
Description: Polish language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/polish
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/polish.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/polish.zip
Published: 2023-04-13 23:09:08
Translator: Paweł Klockiewicz, Kanbeq
Tag: language
@ -507,7 +507,7 @@ Extension: Portuguese
Version: 0.8.43
Description: Portuguese language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/portuguese
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/portuguese.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/portuguese.zip
Published: 2023-04-13 23:09:38
Translator: Al Garcia
Tag: language
@ -534,11 +534,11 @@ Developer: Steffen Schultz
system/extensions/private.php: private.php, create, update
Extension: Publish
Version: 0.8.67
Version: 0.8.68
Description: Make and publish extensions.
DocumentationUrl: https://github.com/annaesvensson/yellow-publish
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/publish.zip
Published: 2023-10-09 21:08:59
DownloadUrl: https://github.com/annaesvensson/yellow-publish/archive/refs/heads/main.zip
Published: 2023-11-14 13:02:52
Developer: Anna Svensson
Tag: feature
system/extensions/publish.php: publish.php, create, update
@ -547,7 +547,7 @@ Extension: Russian
Version: 0.8.43
Description: Russian language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/russian
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/russian.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/russian.zip
Published: 2023-04-13 23:09:57
Translator: Сергей Ворон
Tag: language
@ -557,7 +557,7 @@ Extension: Search
Version: 0.8.29
Description: Full-text search.
DocumentationUrl: https://github.com/annaesvensson/yellow-search
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/search.zip
DownloadUrl: https://codeload.github.com/annaesvensson/yellow-search/zip/refs/heads/main
Published: 2023-10-13 12:38:07
Developer: Anna Svensson
Tag: feature
@ -569,7 +569,7 @@ Extension: Serve
Version: 0.8.24
Description: Built-in web server.
DocumentationUrl: https://github.com/annaesvensson/yellow-serve
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/serve.zip
DownloadUrl: https://github.com/annaesvensson/yellow-serve/archive/refs/heads/main.zip
Published: 2023-05-25 22:35:15
Developer: Anna Svensson
Tag: feature
@ -579,7 +579,7 @@ Extension: Sitemap
Version: 0.8.15
Description: Sitemap with all pages.
DocumentationUrl: https://github.com/annaesvensson/yellow-sitemap
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/sitemap.zip
DownloadUrl: https://codeload.github.com/annaesvensson/yellow-sitemap/zip/refs/heads/main
Published: 2023-10-26 16:26:39
Developer: Anna Svensson
Tag: feature
@ -591,7 +591,7 @@ Extension: Slider
Version: 0.8.18
Description: Image gallery with slider.
DocumentationUrl: https://github.com/annaesvensson/yellow-slider
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/slider.zip
DownloadUrl: https://codeload.github.com/annaesvensson/yellow-slider/zip/refs/heads/main
Published: 2022-11-04 09:39:38
Developer: Anna Svensson
Tag: feature
@ -604,7 +604,7 @@ Extension: Slovak
Version: 0.8.43
Description: Slovak language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/slovak
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/slovak.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/slovak.zip
Published: 2023-04-13 23:10:38
Translator: Ádám Tuba
Tag: language
@ -614,7 +614,7 @@ Extension: Spanish
Version: 0.8.43
Description: Spanish language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/spanish
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/spanish.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/spanish.zip
Published: 2023-04-13 23:11:01
Translator: Al Garcia, David Garcia
Tag: language
@ -624,7 +624,7 @@ Extension: Stockholm
Version: 0.8.14
Description: Stockholm is a clean theme.
DocumentationUrl: https://github.com/annaesvensson/yellow-stockholm
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/stockholm.zip
DownloadUrl: https://github.com/annaesvensson/yellow-stockholm/archive/refs/heads/main.zip
Published: 2022-10-20 12:44:02
Designer: Anna Svensson
Tag: theme
@ -639,7 +639,7 @@ Extension: Swedish
Version: 0.8.43
Description: Swedish language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/swedish
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/swedish.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/swedish.zip
Published: 2023-04-13 22:54:43
Translator: Anna Svensson
Tag: language
@ -669,18 +669,18 @@ Extension: Turkish
Version: 0.8.43
Description: Turkish language.
DocumentationUrl: https://github.com/annaesvensson/yellow-language/tree/main/translations/turkish
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/turkish.zip
DownloadUrl: https://github.com/annaesvensson/yellow-language/raw/main/downloads/turkish.zip
Published: 2023-04-13 23:11:16
Translator: Osman Kars
Tag: language
system/extensions/turkish.php: turkish.php, create, update
Extension: Update
Version: 0.8.95
Version: 0.8.96
Description: Keep your website up to date.
DocumentationUrl: https://github.com/annaesvensson/yellow-update
DownloadUrl: https://codeload.github.com/annaesvensson/yellow-update/zip/refs/heads/main
Published: 2023-10-09 15:53:34
DownloadUrl: https://github.com/annaesvensson/yellow-update/archive/refs/heads/main.zip
Published: 2023-11-14 18:16:45
Developer: Anna Svensson
Tag: feature
system/extensions/update.php: update.php, create, update
@ -690,7 +690,7 @@ Extension: Wiki
Version: 0.8.30
Description: Wiki for your website.
DocumentationUrl: https://github.com/annaesvensson/yellow-wiki
DownloadUrl: https://codeload.github.com/annaesvensson/yellow-wiki/zip/refs/heads/main
DownloadUrl: https://github.com/annaesvensson/yellow-wiki/archive/refs/heads/main.zip
Published: 2023-11-01 17:49:10
Developer: Anna Svensson
Tag: feature

View file

@ -2,7 +2,7 @@
// Update extension, https://github.com/annaesvensson/yellow-update
class YellowUpdate {
const VERSION = "0.8.95";
const VERSION = "0.8.96";
const PRIORITY = "2";
public $yellow; // access to API
public $extensions; // number of extensions
@ -10,11 +10,11 @@ class YellowUpdate {
// Handle initialisation
public function onLoad($yellow) {
$this->yellow = $yellow;
$this->yellow->system->setDefault("updateExtensionUrl", "https://github.com/datenstrom/yellow-extensions");
$this->yellow->system->setDefault("updateExtensionFile", "extension.ini");
$this->yellow->system->setDefault("updateCurrentRelease", "none");
$this->yellow->system->setDefault("updateLatestUrl", "auto");
$this->yellow->system->setDefault("updateLatestFile", "update-latest.ini");
$this->yellow->system->setDefault("updateCurrentFile", "update-current.ini");
$this->yellow->system->setDefault("updateCurrentRelease", "none");
$this->yellow->system->setDefault("updateExtensionFile", "extension.ini");
$this->yellow->system->setDefault("updateEventPending", "none");
$this->yellow->system->setDefault("updateEventDaily", "0");
$this->yellow->system->setDefault("updateTrashTimeout", "7776660");
@ -111,7 +111,7 @@ class YellowUpdate {
if ($statusCode==200) {
foreach ($settings as $key=>$value) {
echo ucfirst($key)." ".$value->get("version")." - ".$this->getExtensionDescription($key, $value)."\n";
echo $this->getExtensionDocumentation($key, $value)."\n";
if ($value->isExisting("documentationUrl")) echo "Read more at ".$value->get("documentationUrl")."\n";
}
}
if ($statusCode>=400) echo "ERROR checking extensions: ".$this->yellow->page->errorMessage."\n";
@ -283,11 +283,7 @@ class YellowUpdate {
foreach ($this->getExtensionFileNames($settings) as $fileName) {
list($entry, $flags) = $this->yellow->toolbox->getTextList($settings[$fileName], ",", 2);
if (!$this->yellow->lookup->isContentFile($fileName)) {
if (preg_match("/^@base/i", $entry)) {
$fileNameSource = preg_replace("/@base/i", rtrim($pathBase, "/"), $entry);
} else {
$fileNameSource = $pathBase.$entry;
}
$fileNameSource = $pathBase.$entry;
$fileData = $zip->getFromName($fileNameSource);
$lastModified = $this->yellow->toolbox->getFileModified($fileName);
$statusCode = max($statusCode, $this->updateExtensionFile($fileName, $fileData,
@ -791,7 +787,8 @@ class YellowUpdate {
$fileNameLatest = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("updateLatestFile");
$expire = $this->yellow->toolbox->getFileModified($fileNameLatest) + 60*10;
if ($expire<=time()) {
$url = $this->yellow->system->get("updateExtensionUrl")."/raw/main/".$this->yellow->system->get("updateLatestFile");
$url = $this->yellow->system->get("updateLatestUrl");
if ($url=="auto") $url = "https://raw.githubusercontent.com/datenstrom/yellow/main/system/extensions/update-latest.ini";
list($statusCode, $fileData) = $this->getExtensionFile($url);
if ($statusCode==200 && !$this->yellow->toolbox->createFile($fileNameLatest, $fileData)) {
$statusCode = 500;
@ -892,23 +889,17 @@ class YellowUpdate {
return "$description $responsible";
}
// Return extension documentation
public function getExtensionDocumentation($key, $value) {
return "Read more at ".($value->isExisting("documentationUrl") ? $value->get("documentationUrl") : $this->yellow->system->get("updateExtensionUrl"));
}
// Return extension file
public function getExtensionFile($url) {
$urlRequest = $url;
if (preg_match("#^https://github.com/(.+)/raw/(.+)$#", $url, $matches)) $urlRequest = "https://raw.githubusercontent.com/".$matches[1]."/".$matches[2];
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $urlRequest);
curl_setopt($curlHandle, CURLOPT_URL, $this->getExtensionDownloadUrl($url));
curl_setopt($curlHandle, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; YellowUpdate/".YellowUpdate::VERSION."; SoftwareUpdater)");
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_CONNECTTIMEOUT, 30);
$rawData = curl_exec($curlHandle);
$statusCode = curl_getinfo($curlHandle, CURLINFO_HTTP_CODE);
$fileData = "";
$redirectUrl = ($statusCode>=300 && $statusCode<=399) ? curl_getinfo($curlHandle, CURLINFO_REDIRECT_URL) : "";
curl_close($curlHandle);
if ($statusCode==200) {
$fileData = $rawData;
@ -919,12 +910,26 @@ class YellowUpdate {
$statusCode = 500;
$this->yellow->page->error($statusCode, "Can't download file '$url'!");
}
if ($this->yellow->system->get("coreDebugMode")>=2 && !is_string_empty($redirectUrl)) {
echo "YellowUpdate::getExtensionFile redirected to url:$redirectUrl<br/>\n";
}
if ($this->yellow->system->get("coreDebugMode")>=2) {
echo "YellowUpdate::getExtensionFile status:$statusCode url:$urlRequest<br/>\n";
echo "YellowUpdate::getExtensionFile status:$statusCode url:$url<br/>\n";
}
return array($statusCode, $fileData);
}
// Return extension download URL, redirect to known URL if necessary
public function getExtensionDownloadUrl($url) {
if (preg_match("#^https://github.com/(.+)/archive/refs/heads/main.zip$#", $url, $matches)) {
$url = "https://codeload.github.com/".$matches[1]."/zip/refs/heads/main";
}
if (preg_match("#^https://github.com/(.+)/raw/main/(.+)$#", $url, $matches)) {
$url = "https://raw.githubusercontent.com/".$matches[1]."/main/".$matches[2];
}
return $url;
}
// Return time of next daily update
public function getTimestampDaily() {
$timeOffset = 0;