Fixed bug on options
parent
fda0b65799
commit
2442496087
|
|
@ -24,9 +24,16 @@ $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 (!$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 {
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
|
@ -97,7 +104,7 @@ if ($user->isAdmin()) {
|
|||
<option value="0" <?php if(!$conf->richText) echo "selected"; ?>><?=__("Deactive")?></option>
|
||||
</select>
|
||||
</li>
|
||||
<li><label for="rich_text">URL friendly:</label>
|
||||
<li><label for="url_friendly">URL friendly:</label>
|
||||
<select name="url_friendly" id="url_friendly">
|
||||
<option value="1" <?php if($conf->urlFriendly) echo "selected"; ?>><?=__("Active")?></option>
|
||||
<option value="0" <?php if(!$conf->urlFriendly) echo "selected"; ?>><?=__("Deactive")?></option>
|
||||
|
|
|
|||
|
|
@ -35,11 +35,9 @@ class gelato extends Conexion_Mysql {
|
|||
function saveOption($value, $name) {
|
||||
$sqlStr = "UPDATE ".$this->conf->tablePrefix."options SET val='".$value."' WHERE name='".$name."' LIMIT 1";
|
||||
if ($this->ejecutarConsulta($sqlStr)) {
|
||||
header("Location: ".$this->conf->urlGelato."/admin/options.php?modified=true");
|
||||
die();
|
||||
return true;
|
||||
} else {
|
||||
header("Location: ".$this->conf->urlGelato."/admin/options.php?error=1&des=".$this->merror);
|
||||
die();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,13 +0,0 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2007-07-20 00:14-0600\n"
|
||||
"Last-Translator: Victor De la Rocha <vyk2rr@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=iso-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "this is a test."
|
||||
msgstr ""
|
||||
Loading…
Reference in New Issue