Added feedback notifications for successful edits to pages aside from users and settings (iss0000159).
This commit is contained in:
parent
c6f481ffcb
commit
e73262a649
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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",
|
||||
|
|
Reference in New Issue
Block a user