From: Scott P. <wht...@us...> - 2007-09-08 23:56:57
|
Update of /cvsroot/helpmeict/Helpdesk/system In directory sc8-pr-cvs17:/tmp/cvs-serv9207/system Modified Files: global_preferences.php lang.php message.php Log Message: added $_GET, $_POST, $_REQUEST sanitizing added magic_quotes dectection added checking existince of superglobals index's before using them 'isset' is your friend \ this removes the Undefined Index notices from these files. fixed all undefined constants in these files. This removes the undefined constants from these files. added globals where needed to remove the undefined variable notices from these files. Index: message.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/message.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** message.php 7 Feb 2007 01:20:17 -0000 1.3 --- message.php 8 Sep 2007 23:56:50 -0000 1.4 *************** *** 29,38 **** --- 29,42 ---- */ + if (strpos($_SERVER["SCRIPT_NAME"],basename(__FILE__, '.php')) !== false) { header("location: index.php"); } + global $color, $bgcolor; + function display(&$message) { if ($message != '') { $color = 'blue'; + $bgcolor = ''; if (strtoupper(substr($message,0,7)) == "WARNING") { $color = 'black'; Index: global_preferences.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/global_preferences.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** global_preferences.php 11 Mar 2007 15:23:48 -0000 1.3 --- global_preferences.php 8 Sep 2007 23:56:50 -0000 1.4 *************** *** 50,54 **** $global_prefs = Array(); foreach ($result as $pref) { ! $global_prefs[$pref[identifier]] = $pref[value]; } --- 50,54 ---- $global_prefs = Array(); foreach ($result as $pref) { ! $global_prefs[$pref['identifier']] = $pref['value']; } Index: lang.php =================================================================== RCS file: /cvsroot/helpmeict/Helpdesk/system/lang.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang.php 11 Mar 2007 15:23:48 -0000 1.3 --- lang.php 8 Sep 2007 23:56:50 -0000 1.4 *************** *** 40,44 **** global $_lang; $_lang = $conf['default_lang']; ! if ($_SESSION['_id']) { // Override with user's chosen settings $user_prefs = get_user_prefs($_SESSION['_id']); --- 40,44 ---- global $_lang; $_lang = $conf['default_lang']; ! if (isset($_SESSION['_id'])) { // Override with user's chosen settings $user_prefs = get_user_prefs($_SESSION['_id']); |