From 2442496087ec3ccf0be0d0a3f7aca7ffda70350e Mon Sep 17 00:00:00 2001 From: pecesama Date: Fri, 20 Jul 2007 23:36:39 +0000 Subject: [PATCH] Fixed bug on options --- admin/options.php | 19 +++++++++++++------ classes/gelato.class.php | 6 ++---- languages/en/lang.mo | Bin 305 -> 0 bytes languages/en/lang.po | 13 ------------- 4 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 languages/en/lang.mo delete mode 100644 languages/en/lang.po diff --git a/admin/options.php b/admin/options.php index 963f284..91aebb2 100644 --- a/admin/options.php +++ b/admin/options.php @@ -23,10 +23,17 @@ $conf = new configuration(); if ($user->isAdmin()) { - if(isset($_POST["btnsubmit"])) { - unset($_POST["btnsubmit"]); - $tumble->saveOption($_POST["rich_text"], "rich_text"); - $tumble->saveOption($_POST["urlFriendly"], "rich_text"); + if(isset($_POST["btnsubmit"])) { + if (!$tumble->saveOption($_POST["rich_text"], "rich_text")) { + header("Location: ".$conf->urlGelato."/admin/options.php?error=1&des=".$conf->merror); + die(); + } + if (!$tumble->saveOption($_POST["url_friendly"], "url_friendly")) { + header("Location: ".$conf->urlGelato."/admin/options.php?error=1&des=".$conf->merror); + die(); + } + header("Location: ".$conf->urlGelato."/admin/options.php?modified=true"); + die(); } else { ?> @@ -92,12 +99,12 @@ if ($user->isAdmin()) {