pecesama пре 17 година
родитељ
комит
2442496087
4 измењених фајлова са 15 додато и 23 уклоњено
  1. 13 6
      admin/options.php
  2. 2 4
      classes/gelato.class.php
  3. BIN
      languages/en/lang.mo
  4. 0 13
      languages/en/lang.po

+ 13 - 6
admin/options.php Прегледај датотеку

@@ -23,10 +23,17 @@ $conf = new configuration();
23 23
 
24 24
 if ($user->isAdmin()) {
25 25
 	
26
-	if(isset($_POST["btnsubmit"]))	{		
27
-		unset($_POST["btnsubmit"]);		
28
-		$tumble->saveOption($_POST["rich_text"], "rich_text");
29
-		$tumble->saveOption($_POST["urlFriendly"], "rich_text");
26
+	if(isset($_POST["btnsubmit"]))	{
27
+		if (!$tumble->saveOption($_POST["rich_text"], "rich_text")) {
28
+			header("Location: ".$conf->urlGelato."/admin/options.php?error=1&des=".$conf->merror);
29
+			die();
30
+		}
31
+		if (!$tumble->saveOption($_POST["url_friendly"], "url_friendly")) {
32
+			header("Location: ".$conf->urlGelato."/admin/options.php?error=1&des=".$conf->merror);
33
+			die();
34
+		}
35
+		header("Location: ".$conf->urlGelato."/admin/options.php?modified=true");
36
+		die();
30 37
 	} else {
31 38
 ?>
32 39
 	<!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()) {
92 99
 							<fieldset>								
93 100
 								<ul>																	
94 101
 									<li><label for="rich_text"><?=__("Rich text editor:")?></label>
95
-										<select name="rich_text" id="rich_text">										
102
+										<select name="rich_text" id="rich_text">
96 103
 											<option value="1" <?php if($conf->richText) echo "selected"; ?>><?=__("Active")?></option>
97 104
 											<option value="0" <?php if(!$conf->richText) echo "selected"; ?>><?=__("Deactive")?></option>
98 105
 										</select>
99 106
 									</li>
100
-									<li><label for="rich_text">URL friendly:</label>
107
+									<li><label for="url_friendly">URL friendly:</label>
101 108
 										<select name="url_friendly" id="url_friendly">
102 109
 											<option value="1" <?php if($conf->urlFriendly) echo "selected"; ?>><?=__("Active")?></option>
103 110
 											<option value="0" <?php if(!$conf->urlFriendly) echo "selected"; ?>><?=__("Deactive")?></option>

+ 2 - 4
classes/gelato.class.php Прегледај датотеку

@@ -35,11 +35,9 @@ class gelato extends Conexion_Mysql {
35 35
 	function saveOption($value, $name) {
36 36
 		$sqlStr = "UPDATE ".$this->conf->tablePrefix."options SET val='".$value."' WHERE name='".$name."' LIMIT 1";		
37 37
 		if ($this->ejecutarConsulta($sqlStr)) {
38
-			header("Location: ".$this->conf->urlGelato."/admin/options.php?modified=true");
39
-			die();
38
+			return true;
40 39
 		} else {
41
-			header("Location: ".$this->conf->urlGelato."/admin/options.php?error=1&des=".$this->merror);
42
-			die();
40
+			return true;
43 41
 		}
44 42
 	}
45 43
 	

BIN
languages/en/lang.mo Прегледај датотеку


+ 0 - 13
languages/en/lang.po Прегледај датотеку

@@ -1,13 +0,0 @@
1
-msgid ""
2
-msgstr ""
3
-"Project-Id-Version: \n"
4
-"POT-Creation-Date: \n"
5
-"PO-Revision-Date: 2007-07-20 00:14-0600\n"
6
-"Last-Translator: Victor De la Rocha <vyk2rr@gmail.com>\n"
7
-"Language-Team: \n"
8
-"MIME-Version: 1.0\n"
9
-"Content-Type: text/plain; charset=iso-8859-1\n"
10
-"Content-Transfer-Encoding: 8bit\n"
11
-
12
-msgid "this is a test."
13
-msgstr ""