Fixed bug on options
parent
fda0b65799
commit
2442496087
|
|
@ -23,10 +23,17 @@ $conf = new configuration();
|
||||||
|
|
||||||
if ($user->isAdmin()) {
|
if ($user->isAdmin()) {
|
||||||
|
|
||||||
if(isset($_POST["btnsubmit"])) {
|
if(isset($_POST["btnsubmit"])) {
|
||||||
unset($_POST["btnsubmit"]);
|
if (!$tumble->saveOption($_POST["rich_text"], "rich_text")) {
|
||||||
$tumble->saveOption($_POST["rich_text"], "rich_text");
|
header("Location: ".$conf->urlGelato."/admin/options.php?error=1&des=".$conf->merror);
|
||||||
$tumble->saveOption($_POST["urlFriendly"], "rich_text");
|
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 {
|
} else {
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
@ -92,12 +99,12 @@ if ($user->isAdmin()) {
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<ul>
|
<ul>
|
||||||
<li><label for="rich_text"><?=__("Rich text editor:")?></label>
|
<li><label for="rich_text"><?=__("Rich text editor:")?></label>
|
||||||
<select name="rich_text" id="rich_text">
|
<select name="rich_text" id="rich_text">
|
||||||
<option value="1" <?php if($conf->richText) echo "selected"; ?>><?=__("Active")?></option>
|
<option value="1" <?php if($conf->richText) echo "selected"; ?>><?=__("Active")?></option>
|
||||||
<option value="0" <?php if(!$conf->richText) echo "selected"; ?>><?=__("Deactive")?></option>
|
<option value="0" <?php if(!$conf->richText) echo "selected"; ?>><?=__("Deactive")?></option>
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li><label for="rich_text">URL friendly:</label>
|
<li><label for="url_friendly">URL friendly:</label>
|
||||||
<select name="url_friendly" id="url_friendly">
|
<select name="url_friendly" id="url_friendly">
|
||||||
<option value="1" <?php if($conf->urlFriendly) echo "selected"; ?>><?=__("Active")?></option>
|
<option value="1" <?php if($conf->urlFriendly) echo "selected"; ?>><?=__("Active")?></option>
|
||||||
<option value="0" <?php if(!$conf->urlFriendly) echo "selected"; ?>><?=__("Deactive")?></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) {
|
function saveOption($value, $name) {
|
||||||
$sqlStr = "UPDATE ".$this->conf->tablePrefix."options SET val='".$value."' WHERE name='".$name."' LIMIT 1";
|
$sqlStr = "UPDATE ".$this->conf->tablePrefix."options SET val='".$value."' WHERE name='".$name."' LIMIT 1";
|
||||||
if ($this->ejecutarConsulta($sqlStr)) {
|
if ($this->ejecutarConsulta($sqlStr)) {
|
||||||
header("Location: ".$this->conf->urlGelato."/admin/options.php?modified=true");
|
return true;
|
||||||
die();
|
|
||||||
} else {
|
} else {
|
||||||
header("Location: ".$this->conf->urlGelato."/admin/options.php?error=1&des=".$this->merror);
|
return true;
|
||||||
die();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
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