aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-05-02 20:04:15 +0200
committerpiernov <piernov@piernov.org>2016-05-02 20:04:15 +0200
commitbb029a5feff5c3d284ef8d509c116eee345c13b9 (patch)
treede151dfb014175908fbe0415dd1fadac1a66edbe
parent035a477c4f30180edecead29e8bcda34a0725881 (diff)
downloadcandybox-bb029a5feff5c3d284ef8d509c116eee345c13b9.tar.gz
candybox-bb029a5feff5c3d284ef8d509c116eee345c13b9.tar.bz2
candybox-bb029a5feff5c3d284ef8d509c116eee345c13b9.tar.xz
candybox-bb029a5feff5c3d284ef8d509c116eee345c13b9.zip
Better when error/info messages aren't swapped
-rw-r--r--inc/messages.inc2
-rw-r--r--inc/savegame.inc4
2 files changed, 3 insertions, 3 deletions
diff --git a/inc/messages.inc b/inc/messages.inc
index 5574bcf..4938fa1 100644
--- a/inc/messages.inc
+++ b/inc/messages.inc
@@ -10,7 +10,7 @@ $messages = array(
"gamesave_ok" => "Game saved.",
"gamesave_error" => "An error occured when trying to save the game.",
"gamesave_not_found" => "Couldn't find the specified save file.",
- "gamesave_delete_error" => "Couldn't delete the specified save file.",
+ "gamesave_delete_fail" => "Couldn't delete the specified save file.",
"gamesave_delete_success" => "Game save successfully removed from server",
);
diff --git a/inc/savegame.inc b/inc/savegame.inc
index 0dfb1c8..1fa95b0 100644
--- a/inc/savegame.inc
+++ b/inc/savegame.inc
@@ -75,8 +75,8 @@ function deleteSave() {
if(empty($_POST["filename"])) return;
$path = SAVEDIR . "/" . basename($_POST["filename"]); // remove any leading directory
if(file_exists($path) && unlink($path))
- sendError("gamesave_delete_failed");
- else sendInfo("gamesave_delete_success");
+ sendInfo("gamesave_delete_success");
+ else sendError("gamesave_delete_fail");
}
function loadSave() {