projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for display of empty date
[squirrelmail.git]
/
functions
/
options.php
diff --git
a/functions/options.php
b/functions/options.php
index 653dfc0b8c17fe8a6c888bbcde2e54b02ec6c26a..67c3c132ac378c7562aaf716aa5043fb693b4100 100644
(file)
--- a/
functions/options.php
+++ b/
functions/options.php
@@
-18,7
+18,7
@@
/* Define constants for the various option types. */
define('SMOPT_TYPE_STRING', 0);
define('SMOPT_TYPE_STRLIST', 1);
/* Define constants for the various option types. */
define('SMOPT_TYPE_STRING', 0);
define('SMOPT_TYPE_STRLIST', 1);
-define('SMOPT_TYPE_
textarea
', 2);
+define('SMOPT_TYPE_
TEXTAREA
', 2);
define('SMOPT_TYPE_INTEGER', 3);
define('SMOPT_TYPE_FLOAT', 4);
define('SMOPT_TYPE_BOOLEAN', 5);
define('SMOPT_TYPE_INTEGER', 3);
define('SMOPT_TYPE_FLOAT', 4);
define('SMOPT_TYPE_BOOLEAN', 5);
@@
-90,8
+90,8
@@
class SquirrelOption {
}
/* Check for a new value. */
}
/* Check for a new value. */
- if (isset($
GLOBALS
["new_$name"])) {
- $this->new_value = $
GLOBALS
["new_$name"];
+ if (isset($
_POST
["new_$name"])) {
+ $this->new_value = $
_POST
["new_$name"];
} else {
$this->new_value = '';
}
} else {
$this->new_value = '';
}
@@
-145,7
+145,7
@@
class SquirrelOption {
case SMOPT_TYPE_STRLIST:
$result = $this->createWidget_StrList();
break;
case SMOPT_TYPE_STRLIST:
$result = $this->createWidget_StrList();
break;
- case SMOPT_TYPE_
textarea
:
+ case SMOPT_TYPE_
TEXTAREA
:
$result = $this->createWidget_TextArea();
break;
case SMOPT_TYPE_INTEGER:
$result = $this->createWidget_TextArea();
break;
case SMOPT_TYPE_INTEGER:
@@
-289,16
+289,18
@@
class SquirrelOption {
}
function changed() {
}
function changed() {
- return ($this->value !=
=
$this->new_value);
+ return ($this->value != $this->new_value);
}
}
function save_option($option) {
}
}
function save_option($option) {
- global $data_dir, $username;
- setPref($data_dir, $username, $option->name, $option->new_value);
+ if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+ global $_SESSION;
+ }
+ global $data_dir;
+ $username = $_SESSION['username'];
- /* I do not know if this next line does any good. */
- $GLOBALS[$option->name] = $option->new_value;
+ setPref($data_dir, $username, $option->name, $option->new_value);
}
function save_option_noop($option) {
}
function save_option_noop($option) {
@@
-421,4
+423,3
@@
function OptionSubmit( $name ) {
}
?>
}
?>
-)