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