/**
* options.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Functions needed to display the options pages.
}
/* Check for a new value. */
- if (isset($_POST["new_$name"])) {
- $this->new_value = $_POST["new_$name"];
- } else {
+ if ( !sqgetGlobalVar("new_$name", $this->new_value, SQ_POST ) ) {
$this->new_value = '';
}
}
function createWidget_Integer() {
- return ($this->createWidget_String());
+
+ return $this->createWidget_String();
+
}
function createWidget_Float() {
- return ($this->createWidget_String());
+
+ return $this->createWidget_String();
+
}
function createWidget_Boolean() {
}
function save_option($option) {
- if ( !check_php_version(4,1) ) {
- global $_SESSION;
+ if ( !sqgetGlobalVar('username', $username, SQ_SESSION ) ) {
+ /* Can't save the pref if we don't have the username */
+ return;
}
global $data_dir;
- $username = $_SESSION['username'];
-
setPref($data_dir, $username, $option->name, $option->new_value);
}