commit 999f1fa056cad2bf69578ad9454d59eaf918a19a
parent 45559c8bb5f76640554c0f80963c52c5e4b3b449
Author: markseu <mark2011@mayberg.se>
Date: Tue, 30 Apr 2024 18:19:41 +0200
Updated edit events for Steffen
Diffstat:
5 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/system/extensions/update-available.ini b/system/extensions/update-available.ini
@@ -45,14 +45,14 @@ system/themes/berlin-opensans-light.woff: berlin-opensans-light.woff, create, up
system/themes/berlin-opensans-regular.woff: berlin-opensans-regular.woff, create, update, careful
Extension: Blog
-Version: 0.9.1
+Version: 0.9.2
Description: Blog for your website.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-blog/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-blog
DocumentationLanguage: en, de, sv
-Published: 2024-04-04 17:13:35
+Published: 2024-04-30 18:03:27
Status: available
system/workers/blog.php: blog.php, create, update
system/layouts/blog.html: blog.html, create, update, careful
@@ -213,14 +213,14 @@ Status: available
system/workers/dutch.php: dutch.php, create, update
Extension: Edit
-Version: 0.9.5
+Version: 0.9.6
Description: Edit your website in a web browser.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-edit/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-edit
DocumentationLanguage: en, de, sv
-Published: 2024-04-23 11:37:34
+Published: 2024-04-30 17:04:26
Status: available
system/workers/edit.php: edit.php, create, update
system/workers/edit.css: edit.css, create, update
@@ -792,14 +792,14 @@ system/workers/update.php: update.php, create, update
system/workers/updatepatch.bin: updatepatch.php, create, additional
Extension: Wiki
-Version: 0.9.2
+Version: 0.9.3
Description: Wiki for your website.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-wiki/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-wiki
DocumentationLanguage: en, de, sv
-Published: 2024-04-26 16:22:52
+Published: 2024-04-30 16:45:31
Status: available
system/workers/wiki.php: wiki.php, create, update
system/layouts/wiki.html: wiki.html, create, update, careful
diff --git a/system/extensions/yellow-extension.ini b/system/extensions/yellow-extension.ini
@@ -20,14 +20,14 @@ system/layouts/navigation.html: navigation.html, create, update, careful
system/layouts/pagination.html: pagination.html, create, update, careful
Extension: Edit
-Version: 0.9.5
+Version: 0.9.6
Description: Edit your website in a web browser.
Developer: Anna Svensson
Tag: feature
DownloadUrl: https://github.com/annaesvensson/yellow-edit/archive/refs/heads/main.zip
DocumentationUrl: https://github.com/annaesvensson/yellow-edit
DocumentationLanguage: en, de, sv
-Published: 2024-04-23 11:37:34
+Published: 2024-04-30 17:04:26
Status: available
system/workers/edit.php: edit.php, create, update
system/workers/edit.css: edit.css, create, update
diff --git a/system/workers/edit.php b/system/workers/edit.php
@@ -2,7 +2,7 @@
// Edit extension, https://github.com/annaesvensson/yellow-edit
class YellowEdit {
- const VERSION = "0.9.5";
+ const VERSION = "0.9.6";
public $yellow; // access to API
public $response; // web response
public $merge; // text merge
@@ -1078,17 +1078,16 @@ class YellowEditResponse {
$rawData = $this->yellow->lookup->normaliseLines($rawData, $endOfLine);
$page = new YellowPage($this->yellow);
$page->setRequestInformation($scheme, $address, $base, $location, $fileName, false);
- $page->parseMeta($rawData);
- $this->editContentFile($page, "create", $this->userEmail);
+ $page->parseMeta($rawData, 200);
if ($this->yellow->content->find($page->location)) {
$page->location = $this->getPageNewLocation($page->rawData, $page->location, $page->get("editNewLocation"));
- $page->fileName = $this->getPageNewFile($page->location, $page->fileName, $page->get("published"));
+ $page->fileName = $this->getPageNewFile($page->location, $page->fileName, $page->get("editNewPrefix"));
$pageCounter = 0;
while ($this->yellow->content->find($page->location) || is_string_empty($page->fileName)) {
$page->rawData = $this->yellow->toolbox->setMetaData($page->rawData, "title", $this->getTitleNext($page->rawData));
$page->rawData = $this->yellow->lookup->normaliseLines($page->rawData, $endOfLine);
$page->location = $this->getPageNewLocation($page->rawData, $page->location, $page->get("editNewLocation"));
- $page->fileName = $this->getPageNewFile($page->location, $page->fileName, $page->get("published"));
+ $page->fileName = $this->getPageNewFile($page->location, $page->fileName, $page->get("editNewPrefix"));
if (++$pageCounter>999) break;
}
if ($this->yellow->content->find($page->location) || is_string_empty($page->fileName)) {
@@ -1100,6 +1099,7 @@ class YellowEditResponse {
if (!$this->isUserAccess("create", $page->location)) {
$page->error(500, "Page '".$page->get("title")."' is restricted!");
}
+ $this->editContentFile($page, "create", $this->userEmail);
return $page;
}
@@ -1111,14 +1111,13 @@ class YellowEditResponse {
$rawData = $this->extension->merge->merge($rawDataSource, $rawDataEdit, $rawDataFile);
$page = new YellowPage($this->yellow);
$page->setRequestInformation($scheme, $address, $base, $location, $fileName, false);
- $page->parseMeta($rawData);
+ $page->parseMeta($rawData, 200);
$pageSource = new YellowPage($this->yellow);
$pageSource->setRequestInformation($scheme, $address, $base, $location, $fileName, false);
- $pageSource->parseMeta($rawDataSource);
- $this->editContentFile($page, "edit", $this->userEmail);
+ $pageSource->parseMeta($rawDataSource, 200);
if ($this->isMetaModified($pageSource, $page) && $page->location!=$this->yellow->content->getHomeLocation($page->location)) {
$page->location = $this->getPageNewLocation($page->rawData, $page->location, $page->get("editNewLocation"), true);
- $page->fileName = $this->getPageNewFile($page->location, $page->fileName, $page->get("published"));
+ $page->fileName = $this->getPageNewFile($page->location, $page->fileName, $page->get("editNewPrefix"));
if ($page->location!=$pageSource->location && ($this->yellow->content->find($page->location) || is_string_empty($page->fileName))) {
$page->error(500, "Page '".$page->get("title")."' is not possible!");
}
@@ -1128,6 +1127,7 @@ class YellowEditResponse {
!$this->isUserAccess("edit", $pageSource->location)) {
$page->error(500, "Page '".$page->get("title")."' is restricted!");
}
+ $this->editContentFile($page, "edit", $this->userEmail);
return $page;
}
@@ -1136,11 +1136,11 @@ class YellowEditResponse {
$rawData = $this->yellow->lookup->normaliseLines($rawData, $endOfLine);
$page = new YellowPage($this->yellow);
$page->setRequestInformation($scheme, $address, $base, $location, $fileName, false);
- $page->parseMeta($rawData);
- $this->editContentFile($page, "delete", $this->userEmail);
+ $page->parseMeta($rawData, 200);
if (!$this->isUserAccess("delete", $page->location)) {
$page->error(500, "Page '".$page->get("title")."' is restricted!");
}
+ $this->editContentFile($page, "delete", $this->userEmail);
return $page;
}
@@ -1149,10 +1149,10 @@ class YellowEditResponse {
$page = new YellowPage($this->yellow);
$page->setRequestInformation($scheme, $address, $base, $location, $fileName, false);
$page->parseMeta("");
- $this->editContentFile($page, "restore", $this->userEmail);
if (!$this->isUserAccess("restore", $page->location)) {
$page->error(500, "Page '".$page->get("title")."' is restricted!");
}
+ $this->editContentFile($page, "restore", $this->userEmail);
return $page;
}
diff --git a/system/workers/install-blog.bin b/system/workers/install-blog.bin
Binary files differ.
diff --git a/system/workers/install-wiki.bin b/system/workers/install-wiki.bin
Binary files differ.