Added feedback notifications for successful edits to pages aside from users and settings (iss0000159).

This commit is contained in:
Joshua Ramon Enslin 2018-06-18 15:20:24 +02:00 committed by Stefan Rohde-Enslin
parent c6f481ffcb
commit e73262a649
3 changed files with 9 additions and 1 deletions

View File

@ -51,6 +51,7 @@ if (isset($task) and $task == "update") {
file_put_contents(targetFile, $content, LOCK_EX);
$_SESSION["editHistory"] = ["changesStored", $translations['storedEditsToPageElement'] . " $title"];
header('Location: editHTMLPage.php?id=' . $id);
return;

View File

@ -51,7 +51,9 @@ if (isset($task)) {
if (!isset($id)) $id = "0";
$targetID = storePage($pages, ["title" => (string)$title, "content" => (string)$content, "higher" => $higher, "public" => (bool)$public], (int)$id);
$_SESSION["editHistory"] = ["changesStored", $translations['storedEditsToPage'] . " $title"];
header('Location: page.php?id=' . $targetID);
return;
}
@ -63,12 +65,14 @@ if (isset($task)) {
unlink(__DIR__ . "/../data/static/$id.json");
generateStaticPgCaches();
$_SESSION["editHistory"] = ["changesAborted", $translations['deletedPage'] . " $title"];
header('Location: pages.php');
return;
}
}
/*
* Output
*/

View File

@ -27,6 +27,9 @@ $translations = [
"integrationWithMD" => "Integration with Museum-Digital",
"languageUnavailable" => "This language is not available.",
"settingsUpdated" => "Updated settings.",
"storedEditsToPage" => "Stored edits to page.",
"storedEditsToPageElement" => "Stored edits to page element.",
"deletedPage" => "Removed page.",
"staticPageTitle" => "Page title",
"staticPageContent" => "Page content",
"staticPagePublic" => "Draft / Public",