commit ccc4c0171fdbc5e4233f96193b715c350c8ee6a3
parent dc59b4bd363e991b154d45736fdc0278b8bc1163
Author: markseu <mark2011@mayberg.se>
Date: Fri, 29 Apr 2022 17:21:12 +0200
Updated edit extension, better troubleshooting
Diffstat:
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/system/extensions/edit.php b/system/extensions/edit.php
@@ -2,7 +2,7 @@
// Edit extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/edit
class YellowEdit {
- const VERSION = "0.8.59";
+ const VERSION = "0.8.60";
public $yellow; // access to API
public $response; // web response
public $merge; // text merge
@@ -662,11 +662,11 @@ class YellowEdit {
if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) $this->response->status = "invalid";
}
if ($this->response->status=="ok") {
- $fileName = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreSystemFile");
+ $fileNameSystem = $this->yellow->system->get("coreExtensionDirectory").$this->yellow->system->get("coreSystemFile");
$settings = array("sitename" => $sitename, "author" => $author, "email" => $email);
- $file = $this->response->getFileSystem($scheme, $address, $base, $location, $fileName, $settings);
- $this->response->status = (!$file->isError() && $this->yellow->system->save($fileName, $settings)) ? "done" : "error";
- if ($this->response->status=="error") $this->yellow->page->error(500, "Can't write file '$fileName'!");
+ $file = $this->response->getFileSystem($scheme, $address, $base, $location, $fileNameSystem, $settings);
+ $this->response->status = (!$file->isError() && $this->yellow->system->save($fileNameSystem, $settings)) ? "done" : "error";
+ if ($this->response->status=="error") $this->yellow->page->error(500, "Can't write file '$fileNameSystem'!");
}
if ($this->response->status=="done") {
$location = $this->yellow->lookup->normaliseUrl($scheme, $address, $base, $location);
@@ -1185,9 +1185,9 @@ class YellowEditResponse {
}
// Return system file
- public function getFileSystem($scheme, $address, $base, $pageLocation, $fileName, $settings) {
+ public function getFileSystem($scheme, $address, $base, $pageLocation, $fileNameSystem, $settings) {
$file = new YellowPage($this->yellow);
- $file->setRequestInformation($scheme, $address, $base, "/".$fileName, $fileName);
+ $file->setRequestInformation($scheme, $address, $base, "/".$fileNameSystem, $fileNameSystem);
$file->parseData(null, false, 0);
foreach ($settings as $key=>$value) $file->set($key, $value);
$this->editSystemFile($file, "configure", $this->userEmail);
diff --git a/system/extensions/update-current.ini b/system/extensions/update-current.ini
@@ -37,11 +37,11 @@ system/layouts/navigation.html: navigation.html, create, update, careful
system/layouts/pagination.html: pagination.html, create, update, careful
Extension: Edit
-Version: 0.8.59
+Version: 0.8.60
Description: Edit your website in a web browser.
DocumentationUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/edit
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/edit.zip
-Published: 2022-04-29 07:51:22
+Published: 2022-04-29 14:50:00
Developer: Datenstrom
Tag: feature
system/extensions/edit.php: edit.php, create, update
@@ -131,11 +131,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.72
+Version: 0.8.73
Description: Keep your website up to date.
DocumentationUrl: https://github.com/datenstrom/yellow-extensions/tree/master/source/update
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/master/zip/update.zip
-Published: 2022-04-22 18:04:58
+Published: 2022-04-29 10:36:26
Developer: Datenstrom
Tag: feature
system/extensions/update.php: update.php, create, update
diff --git a/system/extensions/update.php b/system/extensions/update.php
@@ -2,7 +2,7 @@
// Update extension, https://github.com/datenstrom/yellow-extensions/tree/master/source/update
class YellowUpdate {
- const VERSION = "0.8.72";
+ const VERSION = "0.8.73";
const PRIORITY = "2";
public $yellow; // access to API
public $extensions; // number of extensions
@@ -873,8 +873,7 @@ class YellowUpdate {
if ($statusCode==200) {
$fileData = $rawData;
} elseif ($statusCode==0) {
- $statusCode = 500;
- list($scheme, $address) = $this->yellow->lookup->getUrlInformation($url);
+ $statusCode = 450;
$this->yellow->page->error($statusCode, "Can't connect to the update server!");
} else {
$statusCode = 500;