Index: send.php
===================================================================
--- send.php	(revision 3164)
+++ send.php	(working copy)
@@ -44,7 +44,7 @@
 $prj_id = Auth::getCurrentProject();
 $usr_id = Auth::getUserID();
 
-@$issue_id = $HTTP_GET_VARS["issue_id"] ? $HTTP_GET_VARS["issue_id"] : $HTTP_POST_VARS["issue_id"];
+@$issue_id = $_GET["issue_id"] ? $_GET["issue_id"] : $_POST["issue_id"];
 $tpl->assign("issue_id", $issue_id);
 
 if (!Issue::canAccess($issue_id, $usr_id)) {
@@ -56,50 +56,50 @@
 // since emails associated with issues are sent to the notification list, not the to: field, set the to field to be blank
 // this field should already be blank, but may also be unset.
 if (!empty($issue_id)) {
-    $HTTP_POST_VARS['to'] = '';
+    $_POST['to'] = '';
 }
 
-if (@$HTTP_POST_VARS["cat"] == "send_email") {
-    $res = Support::sendEmail($HTTP_POST_VARS['parent_id']);
+if (@$_POST["cat"] == "send_email") {
+    $res = Support::sendEmail($_POST['parent_id']);
     $tpl->assign("send_result", $res);
-    if (!@empty($HTTP_POST_VARS['new_status'])) {
-        $res = Issue::setStatus($issue_id, $HTTP_POST_VARS['new_status']);
+    if (!@empty($_POST['new_status'])) {
+        $res = Issue::setStatus($issue_id, $_POST['new_status']);
         if ($res != -1) {
-            $new_status = Status::getStatusTitle($HTTP_POST_VARS['new_status']);
+            $new_status = Status::getStatusTitle($_POST['new_status']);
             History::add($issue_id, $usr_id, History::getTypeID('status_changed'), "Status changed to '$new_status' by " . User::getFullName($usr_id) . " when sending an email");
         }
     }
     // remove the existing email draft, if appropriate
-    if (!empty($HTTP_POST_VARS['draft_id'])) {
-        Draft::remove($HTTP_POST_VARS['draft_id']);
+    if (!empty($_POST['draft_id'])) {
+        Draft::remove($_POST['draft_id']);
     }
     // enter the time tracking entry about this new email
-    if (!empty($HTTP_POST_VARS['time_spent'])) {
-        $HTTP_POST_VARS['issue_id'] = $issue_id;
-        $HTTP_POST_VARS['category'] = Time_Tracking::getCategoryID('Email Discussion');
-        $HTTP_POST_VARS['summary'] = 'Time entry inserted when sending outgoing email.';
+    if (!empty($_POST['time_spent'])) {
+        $_POST['issue_id'] = $issue_id;
+        $_POST['category'] = Time_Tracking::getCategoryID('Email Discussion');
+        $_POST['summary'] = 'Time entry inserted when sending outgoing email.';
         Time_Tracking::insertEntry();
     }
-} elseif (@$HTTP_POST_VARS["cat"] == "save_draft") {
-    $res = Draft::saveEmail($issue_id, $HTTP_POST_VARS["to"], $HTTP_POST_VARS["cc"], $HTTP_POST_VARS["subject"], $HTTP_POST_VARS["message"], $HTTP_POST_VARS["parent_id"]);
+} elseif (@$_POST["cat"] == "save_draft") {
+    $res = Draft::saveEmail($issue_id, $_POST["to"], $_POST["cc"], $_POST["subject"], $_POST["message"], $_POST["parent_id"]);
     $tpl->assign("draft_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "update_draft") {
-    $res = Draft::update($issue_id, $HTTP_POST_VARS["draft_id"], $HTTP_POST_VARS["to"], $HTTP_POST_VARS["cc"], $HTTP_POST_VARS["subject"], $HTTP_POST_VARS["message"], $HTTP_POST_VARS["parent_id"]);
+} elseif (@$_POST["cat"] == "update_draft") {
+    $res = Draft::update($issue_id, $_POST["draft_id"], $_POST["to"], $_POST["cc"], $_POST["subject"], $_POST["message"], $_POST["parent_id"]);
     $tpl->assign("draft_result", $res);
 }
 
 // enter the time tracking entry about this new email
-if ((@$HTTP_POST_VARS["cat"] == "save_draft") || (@$HTTP_POST_VARS["cat"] == "update_draft")) {
-    if (!empty($HTTP_POST_VARS['time_spent'])) {
-        $HTTP_POST_VARS['issue_id'] = $issue_id;
-        $HTTP_POST_VARS['category'] = Time_Tracking::getCategoryID('Email Discussion');
-        $HTTP_POST_VARS['summary'] = 'Time entry inserted when saving an email draft.';
+if ((@$_POST["cat"] == "save_draft") || (@$_POST["cat"] == "update_draft")) {
+    if (!empty($_POST['time_spent'])) {
+        $_POST['issue_id'] = $issue_id;
+        $_POST['category'] = Time_Tracking::getCategoryID('Email Discussion');
+        $_POST['summary'] = 'Time entry inserted when saving an email draft.';
         Time_Tracking::insertEntry();
     }
 }
 
-if (@$HTTP_GET_VARS['cat'] == 'view_draft') {
-    $draft = Draft::getDetails($HTTP_GET_VARS['id']);
+if (@$_GET['cat'] == 'view_draft') {
+    $draft = Draft::getDetails($_GET['id']);
     $email = array(
         'sup_subject' => $draft['emd_subject'],
         'seb_body'    => $draft['emd_body'],
@@ -108,13 +108,13 @@
     );
     // try to guess the correct email account to be associated with this email
     if (!empty($draft['emd_sup_id'])) {
-        $HTTP_GET_VARS['ema_id'] = Email_Account::getAccountByEmail($draft['emd_sup_id']);
+        $_GET['ema_id'] = Email_Account::getAccountByEmail($draft['emd_sup_id']);
     } else {
         // if we are not replying to an existing message, just get the first email account you can find...
-        $HTTP_GET_VARS['ema_id'] = Email_Account::getEmailAccount();
+        $_GET['ema_id'] = Email_Account::getEmailAccount();
     }
     $tpl->bulkAssign(array(
-        "draft_id"        => $HTTP_GET_VARS['id'],
+        "draft_id"        => $_GET['id'],
         "email"           => $email,
         "parent_email_id" => $draft['emd_sup_id'],
         "draft_status"    => $draft['emd_status']
@@ -122,24 +122,24 @@
     if ($draft['emd_status'] != 'pending') {
         $tpl->assign("read_only", 1);
     }
-} elseif (@$HTTP_GET_VARS['cat'] == 'create_draft') {
+} elseif (@$_GET['cat'] == 'create_draft') {
     $tpl->assign("hide_email_buttons", "yes");
 } else {
-    if (!@empty($HTTP_GET_VARS["id"])) {
-        $email = Support::getEmailDetails($HTTP_GET_VARS["ema_id"], $HTTP_GET_VARS["id"]);
+    if (!@empty($_GET["id"])) {
+        $email = Support::getEmailDetails($_GET["ema_id"], $_GET["id"]);
         $date = Misc::formatReplyDate($email["timestamp"]);
         $header = "\n\n\nOn $date, " . $email["sup_from"] . " wrote:\n>\n";
         $email['seb_body'] = $header . Misc::formatReply($email['seb_body']);
         $tpl->bulkAssign(array(
             "email"           => $email,
-            "parent_email_id" => $HTTP_GET_VARS["id"]
+            "parent_email_id" => $_GET["id"]
         ));
     }
 }
 
 // special handling when someone tries to 'reply' to an issue
-if (@$HTTP_GET_VARS["cat"] == 'reply') {
-    $details = Issue::getReplyDetails($HTTP_GET_VARS['issue_id']);
+if (@$_GET["cat"] == 'reply') {
+    $details = Issue::getReplyDetails($_GET['issue_id']);
     if ($details != '') {
         $date = Misc::formatReplyDate($details['created_date_ts']);
         $header = "\n\n\nOn $date, " . $details['reporter'] . " wrote:\n>\n";
@@ -148,7 +148,7 @@
         $tpl->bulkAssign(array(
             "email"           => $details,
             "parent_email_id" => 0,
-            "extra_title"     => "Issue #" . $HTTP_GET_VARS['issue_id'] . ": Reply"
+            "extra_title"     => "Issue #" . $_GET['issue_id'] . ": Reply"
         ));
     }
 }
@@ -162,8 +162,8 @@
     $tpl->assign("can_send_email", Support::isAllowedToEmail($issue_id, $sender_details["usr_email"]));
     $tpl->assign('subscribers', Notification::getSubscribers($issue_id, 'emails'));
 }
-if ((!@empty($HTTP_GET_VARS["ema_id"])) || (!@empty($HTTP_POST_VARS["ema_id"]))) {
-    @$tpl->assign("ema_id", $HTTP_GET_VARS["ema_id"] ? $HTTP_GET_VARS["ema_id"] : $HTTP_POST_VARS["ema_id"]);
+if ((!@empty($_GET["ema_id"])) || (!@empty($_POST["ema_id"]))) {
+    @$tpl->assign("ema_id", $_GET["ema_id"] ? $_GET["ema_id"] : $_POST["ema_id"]);
 }
 $tpl->assign("from", User::getFromHeader($usr_id));
 
Index: benchmark.php
===================================================================
--- benchmark.php	(revision 3164)
+++ benchmark.php	(working copy)
@@ -36,7 +36,7 @@
 
 $font = FF_FONT1;
 
-$stats = unserialize(base64_decode($HTTP_POST_VARS["encoded_stats"]));
+$stats = unserialize(base64_decode($_POST["encoded_stats"]));
 $labels = array();
 $data = array();
 foreach ($stats as $point) {
Index: confirm.php
===================================================================
--- confirm.php	(revision 3164)
+++ confirm.php	(working copy)
@@ -36,20 +36,20 @@
 $tpl = new Template_API();
 $tpl->setTemplate("confirm.tpl.html");
 
-if (@$HTTP_GET_VARS['cat'] == 'newuser') {
-    $res = @User::checkHash($HTTP_GET_VARS["email"], $HTTP_GET_VARS["hash"]);
+if (@$_GET['cat'] == 'newuser') {
+    $res = @User::checkHash($_GET["email"], $_GET["hash"]);
     if ($res == 1) {
-        User::confirmVisitorAccount($HTTP_GET_VARS["email"]);
+        User::confirmVisitorAccount($_GET["email"]);
         // redirect user to login form with pretty message
-        Auth::redirect('index.php?err=8&email=' . $HTTP_GET_VARS["email"]);
+        Auth::redirect('index.php?err=8&email=' . $_GET["email"]);
         exit;
     }
     $tpl->assign("confirm_result", $res);
-} elseif (@$HTTP_GET_VARS['cat'] == 'password') {
-    $res = @User::checkHash($HTTP_GET_VARS["email"], $HTTP_GET_VARS["hash"]);
+} elseif (@$_GET['cat'] == 'password') {
+    $res = @User::checkHash($_GET["email"], $_GET["hash"]);
     if ($res == 1) {
-        User::confirmNewPassword($HTTP_GET_VARS["email"]);
-        $tpl->assign("email", $HTTP_GET_VARS["email"]);
+        User::confirmNewPassword($_GET["email"]);
+        $tpl->assign("email", $_GET["email"]);
     }
     $tpl->assign("confirm_result", $res);
 }
Index: view_note.php
===================================================================
--- view_note.php	(revision 3164)
+++ view_note.php	(working copy)
@@ -42,7 +42,7 @@
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 $usr_id = Auth::getUserID();
 
-$note = Note::getDetails($HTTP_GET_VARS["id"]);
+$note = Note::getDetails($_GET["id"]);
 
 if ($note == '') {
     $tpl->assign("note", '');
@@ -50,7 +50,7 @@
     exit;
 } else {
     $note["message"] = $note["not_note"];
-    $issue_id = Note::getIssueID($HTTP_GET_VARS["id"]);
+    $issue_id = Note::getIssueID($_GET["id"]);
     $usr_id = Auth::getUserID();
 }
 
@@ -60,18 +60,18 @@
     exit;
 }
 
-$note = Note::getDetails($HTTP_GET_VARS["id"]);
+$note = Note::getDetails($_GET["id"]);
 $note["message"] = $note["not_note"];
 
-$issue_id = Note::getIssueID($HTTP_GET_VARS["id"]);
+$issue_id = Note::getIssueID($_GET["id"]);
 $tpl->bulkAssign(array(
     "note"        => $note,
     "issue_id"    => $issue_id,
-    'extra_title' => "Note #" . $HTTP_GET_VARS['num'] . ": " . $note['not_title']
+    'extra_title' => "Note #" . $_GET['num'] . ": " . $note['not_title']
 ));
 
 if (!empty($issue_id)) {
-    $sides = Note::getSideLinks($issue_id, $HTTP_GET_VARS["id"]);
+    $sides = Note::getSideLinks($issue_id, $_GET["id"]);
     $tpl->assign(array(
         'previous' => $sides['previous'],
         'next'     => $sides['next']
Index: adv_search.php
===================================================================
--- adv_search.php	(revision 3164)
+++ adv_search.php	(working copy)
@@ -83,14 +83,14 @@
     "reporters"     => Project::getReporters($prj_id)
 ));
 
-if (!empty($HTTP_GET_VARS["custom_id"])) {
+if (!empty($_GET["custom_id"])) {
     $check_perm = true;
-    if (Filter::isGlobal($HTTP_GET_VARS["custom_id"])) {
+    if (Filter::isGlobal($_GET["custom_id"])) {
         if ($role_id >= User::getRoleID('Manager')) {
             $check_perm = false;
         }
     }
-    $tpl->assign("options", Filter::getDetails($HTTP_GET_VARS["custom_id"], $check_perm));
+    $tpl->assign("options", Filter::getDetails($_GET["custom_id"], $check_perm));
 }
 
 $tpl->displayTemplate();
Index: scm_ping.php
===================================================================
--- scm_ping.php	(revision 3164)
+++ scm_ping.php	(working copy)
@@ -40,21 +40,21 @@
 include_once(APP_INC_PATH . "class.workflow.php");
 include_once(APP_INC_PATH . "db_access.php");
 
-foreach ($HTTP_GET_VARS['issue'] as $issue_id) {
+foreach ($_GET['issue'] as $issue_id) {
     $files = array();
-    for ($y = 0; $y < count($HTTP_GET_VARS['files']); $y++) {
+    for ($y = 0; $y < count($_GET['files']); $y++) {
         SCM::logCheckin($issue_id, $y);
         $files[] = array(
-            'file' => $HTTP_GET_VARS['files'][$y],
-            'old_version' => $HTTP_GET_VARS['old_versions'][$y],
-            'new_version' => $HTTP_GET_VARS['new_versions'][$y],
+            'file' => $_GET['files'][$y],
+            'old_version' => $_GET['old_versions'][$y],
+            'new_version' => $_GET['new_versions'][$y],
         );
     }
 
     $prj_id = Issue::getProjectID($issue_id);
-    $module = $HTTP_GET_VARS['module'];
-    $username = $HTTP_GET_VARS['username'];
-    $commit_msg = $HTTP_GET_VARS['commit_msg'];
+    $module = $_GET['module'];
+    $username = $_GET['username'];
+    $commit_msg = $_GET['commit_msg'];
 
     Workflow::handleSCMCheckins($prj_id, $issue_id, $module, $files, $username, $commit_msg);
 }
Index: custom_fields.php
===================================================================
--- custom_fields.php	(revision 3164)
+++ custom_fields.php	(working copy)
@@ -39,7 +39,7 @@
 Auth::checkAuthentication(APP_COOKIE);
 
 $prj_id = Auth::getCurrentProject();
-$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["issue_id"];
+$issue_id = @$_POST["issue_id"] ? $_POST["issue_id"] : $_GET["issue_id"];
 
 if (!Issue::canAccess($issue_id, Auth::getUserID())) {
     $tpl = new Template_API();
@@ -48,7 +48,7 @@
     exit;
 }
 
-if (@$HTTP_POST_VARS["cat"] == "update_values") {
+if (@$_POST["cat"] == "update_values") {
     $res = Custom_Field::updateValues();
     $tpl->assign("update_result", $res);
     $tpl->assign("current_user_prefs", Prefs::get(Auth::getUserID()));
Index: view_headers.php
===================================================================
--- view_headers.php	(revision 3164)
+++ view_headers.php	(working copy)
@@ -38,10 +38,10 @@
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
-if (@$HTTP_GET_VARS['cat'] == 'note') {
-    $headers = Note::getBlockedMessage($HTTP_GET_VARS["id"]);
+if (@$_GET['cat'] == 'note') {
+    $headers = Note::getBlockedMessage($_GET["id"]);
 } else {
-    $headers = Support::getFullEmail($HTTP_GET_VARS["id"]);
+    $headers = Support::getFullEmail($_GET["id"]);
 }
 $tpl->assign("headers", $headers);
 
Index: faq.php
===================================================================
--- faq.php	(revision 3164)
+++ faq.php	(working copy)
@@ -61,8 +61,8 @@
 }
 $tpl->assign("faqs", FAQ::getListBySupportLevel($support_level_id));
 
-if (!empty($HTTP_GET_VARS["id"])) {
-    $t = FAQ::getDetails($HTTP_GET_VARS['id']);
+if (!empty($_GET["id"])) {
+    $t = FAQ::getDetails($_GET['id']);
     // check if this customer should have access to this FAQ entry or not
     if (($support_level_id != -1) && (!in_array($support_level_id, $t['support_levels']))) {
         $tpl->assign('faq', -1);
Index: download.php
===================================================================
--- download.php	(revision 3164)
+++ download.php	(working copy)
@@ -42,8 +42,8 @@
 // fix for IE6 (KB812935)
 header('Cache-Control: must-revalidate');
 
-if ($HTTP_GET_VARS['cat'] == 'attachment') {
-    $file = Attachment::getDetails($HTTP_GET_VARS["id"]);
+if ($_GET['cat'] == 'attachment') {
+    $file = Attachment::getDetails($_GET["id"]);
     if (!empty($file)) {
         if (!Issue::canAccess($file['iat_iss_id'], Auth::getUserID())) {
             $tpl = new Template_API();
Index: view.php
===================================================================
--- view.php	(revision 3164)
+++ view.php	(working copy)
@@ -54,7 +54,7 @@
 
 $associated_projects = @array_keys(Project::getAssocList($usr_id));
 
-@$issue_id = $HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["id"];
+@$issue_id = $_POST["issue_id"] ? $_POST["issue_id"] : $_GET["id"];
 $tpl->assign("extra_title", "Issue #$issue_id Details");
 
 // check if the requested issue is a part of the 'current' project. If it doesn't
Index: time_tracking.php
===================================================================
--- time_tracking.php	(revision 3164)
+++ time_tracking.php	(working copy)
@@ -38,7 +38,7 @@
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
-$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["iss_id"];
+$issue_id = @$_POST["issue_id"] ? $_POST["issue_id"] : $_GET["iss_id"];
 
 if (!Issue::canAccess($issue_id, Auth::getUserID())) {
     $tpl = new Template_API();
@@ -47,7 +47,7 @@
     exit;
 }
 
-if (@$HTTP_POST_VARS["cat"] == "add_time") {
+if (@$_POST["cat"] == "add_time") {
     $res = Time_Tracking::insertEntry();
     $tpl->assign("time_add_result", $res);
 }
Index: update.php
===================================================================
--- update.php	(revision 3164)
+++ update.php	(working copy)
@@ -52,7 +52,7 @@
 
 Auth::checkAuthentication(APP_COOKIE);
 
-$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : @$HTTP_GET_VARS["id"];
+$issue_id = @$_POST["issue_id"] ? $_POST["issue_id"] : @$_GET["id"];
 
 if (empty($issue_id)) {
     $tpl->displayTemplate();
@@ -80,10 +80,10 @@
     $tpl->assign("auth_customer", 'denied');
 } else {
     $new_prj_id = Issue::getProjectID($issue_id);
-    if (@$HTTP_POST_VARS["cat"] == "update") {
-        $res = Issue::update($HTTP_POST_VARS["issue_id"]);
+    if (@$_POST["cat"] == "update") {
+        $res = Issue::update($_POST["issue_id"]);
         $tpl->assign("update_result", $res);
-        if (Issue::hasDuplicates($HTTP_POST_VARS["issue_id"])) {
+        if (Issue::hasDuplicates($_POST["issue_id"])) {
             $tpl->assign("has_duplicates", "yes");
         }
     }
Index: forgot_password.php
===================================================================
--- forgot_password.php	(revision 3164)
+++ forgot_password.php	(working copy)
@@ -36,11 +36,11 @@
 $tpl = new Template_API();
 $tpl->setTemplate("forgot_password.tpl.html");
 
-if (@$HTTP_POST_VARS["cat"] == "reset_password") {
-    if (empty($HTTP_POST_VARS["email"])) {
+if (@$_POST["cat"] == "reset_password") {
+    if (empty($_POST["email"])) {
         $tpl->assign("result", 4);
     }
-    $usr_id = User::getUserIDByEmail($HTTP_POST_VARS["email"]);
+    $usr_id = User::getUserIDByEmail($_POST["email"]);
     if (empty($usr_id)) {
         $tpl->assign("result", 5);
     } else {
Index: post.php
===================================================================
--- post.php	(revision 3164)
+++ post.php	(working copy)
@@ -37,7 +37,7 @@
 $tpl = new Template_API();
 $tpl->setTemplate("post.tpl.html");
 
-if (@$HTTP_POST_VARS["cat"] == "report") {
+if (@$_POST["cat"] == "report") {
     $res = Issue::addAnonymousReport();
     if ($res != -1) {
         // show direct links to the issue page, issue listing page and email listing page
@@ -46,21 +46,21 @@
         // need to show everything again
         $tpl->assign("error_msg", "1");
     }
-} elseif (@$HTTP_GET_VARS["post_form"] == "yes") {
+} elseif (@$_GET["post_form"] == "yes") {
     // only list those projects that are allowing anonymous reporting of new issues
     $projects = Project::getAnonymousList();
     if (empty($projects)) {
         $tpl->assign("no_projects", "1");
     } else {
-        if (!in_array($HTTP_GET_VARS["project"], array_keys($projects))) {
+        if (!in_array($_GET["project"], array_keys($projects))) {
             $tpl->assign("no_projects", "1");
         } else {
             // get list of custom fields for the selected project
-            $options = Project::getAnonymousPostOptions($HTTP_GET_VARS["project"]);
+            $options = Project::getAnonymousPostOptions($_GET["project"]);
             if (@$options["show_custom_fields"] == "yes") {
-                $tpl->assign("custom_fields", Custom_Field::getListByProject($HTTP_GET_VARS["project"], 'anonymous_form'));
+                $tpl->assign("custom_fields", Custom_Field::getListByProject($_GET["project"], 'anonymous_form'));
             }
-            $tpl->assign("project_name", Project::getName($HTTP_GET_VARS["project"]));
+            $tpl->assign("project_name", Project::getName($_GET["project"]));
         }
     }
 } else {
Index: help.php
===================================================================
--- help.php	(revision 3164)
+++ help.php	(working copy)
@@ -38,10 +38,10 @@
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
-if ((empty($HTTP_GET_VARS["topic"])) || (!Help::topicExists($HTTP_GET_VARS["topic"]))) {
+if ((empty($_GET["topic"])) || (!Help::topicExists($_GET["topic"]))) {
     $topic = 'main';
 } else {
-    $topic = $HTTP_GET_VARS["topic"];
+    $topic = $_GET["topic"];
 }
 $tpl->assign("topic", $topic);
 $tpl->assign("links", Help::getNavigationLinks($topic));
Index: new.php
===================================================================
--- new.php	(revision 3164)
+++ new.php	(working copy)
@@ -55,7 +55,7 @@
     if (Auth::getCurrentRole() == User::getRoleID('Customer')) {
         $customer_id = User::getCustomerID($usr_id);
         // check if the current customer has already redeemed all available per-incident tickets
-        if ((empty($HTTP_POST_VARS['cat'])) && (Customer::hasPerIncidentContract($prj_id, $customer_id)) &&
+        if ((empty($_POST['cat'])) && (Customer::hasPerIncidentContract($prj_id, $customer_id)) &&
                 (!Customer::hasIncidentsLeft($prj_id, $customer_id))) {
             // show warning about per-incident limitation
             $tpl->setTemplate("customer/" . Customer::getBackendImplementationName($prj_id) . "/incident_limit_reached.tpl.html");
@@ -67,7 +67,7 @@
     }
 }
 
-if (@$HTTP_POST_VARS["cat"] == "report") {
+if (@$_POST["cat"] == "report") {
     $res = Issue::insert();
     if ($res != -1) {
         // show direct links to the issue page, issue listing page and
@@ -82,14 +82,14 @@
     }
 }
 
-if (@$HTTP_GET_VARS["cat"] == "associate") {
-    if (@count($HTTP_GET_VARS["item"]) > 0) {
-        $res = Support::getListDetails($HTTP_GET_VARS["item"]);
+if (@$_GET["cat"] == "associate") {
+    if (@count($_GET["item"]) > 0) {
+        $res = Support::getListDetails($_GET["item"]);
         $tpl->assign("emails", $res);
-        $tpl->assign("attached_emails", @implode(",", $HTTP_GET_VARS["item"]));
+        $tpl->assign("attached_emails", @implode(",", $_GET["item"]));
         if (Customer::hasCustomerIntegration($prj_id)) {
             // also need to guess the contact_id from any attached emails
-            $info = Customer::getCustomerInfoFromEmails($prj_id, $HTTP_GET_VARS["item"]);
+            $info = Customer::getCustomerInfoFromEmails($prj_id, $_GET["item"]);
             $tpl->assign(array(
                 "customer_id"   => $info['customer_id'],
                 'customer_name' => $info['customer_name'],
@@ -100,8 +100,8 @@
         }
         // if we are dealing with just one message, use the subject line as the
         // summary for the issue, and the body as the description
-        if (count($HTTP_GET_VARS["item"]) == 1) {
-            $email_details = Support::getEmailDetails(Email_Account::getAccountByEmail($HTTP_GET_VARS["item"][0]), $HTTP_GET_VARS["item"][0]);
+        if (count($_GET["item"]) == 1) {
+            $email_details = Support::getEmailDetails(Email_Account::getAccountByEmail($_GET["item"][0]), $_GET["item"][0]);
             $tpl->assign(array(
                 'issue_summary'     => $email_details['sup_subject'],
                 'issue_description' => $email_details['seb_body']
Index: csv.php
===================================================================
--- csv.php	(revision 3164)
+++ csv.php	(working copy)
@@ -33,7 +33,7 @@
 
 Auth::checkAuthentication(APP_COOKIE);
 
-$csv = base64_decode($HTTP_POST_VARS["csv_data"]);
+$csv = base64_decode($_POST["csv_data"]);
 
 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
 header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
Index: removed_emails.php
===================================================================
--- removed_emails.php	(revision 3164)
+++ removed_emails.php	(working copy)
@@ -38,11 +38,11 @@
 
 Auth::checkAuthentication(APP_COOKIE, NULL, true);
 
-if (@$HTTP_POST_VARS["cat"] == "restore") {
+if (@$_POST["cat"] == "restore") {
     $res = Support::restoreEmails();
     $tpl->assign("result_msg", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "remove") {
-    $res = Support::expungeEmails($HTTP_POST_VARS["item"]);
+} elseif (@$_POST["cat"] == "remove") {
+    $res = Support::expungeEmails($_POST["item"]);
     $tpl->assign("result_msg", $res);
 }
 
Index: include/class.issue.php
===================================================================
--- include/class.issue.php	(revision 3164)
+++ include/class.issue.php	(working copy)
@@ -819,8 +819,6 @@
      */
     function updateDuplicates($issue_id)
     {
-        global $HTTP_POST_VARS;
-
         $issue_id = Misc::escapeInteger($issue_id);
 
         $ids = Issue::getDuplicateList($issue_id);
@@ -834,14 +832,14 @@
                     iss_updated_date='" . Date_API::getCurrentDateGMT() . "',
                     iss_last_internal_action_date='" . Date_API::getCurrentDateGMT() . "',
                     iss_last_internal_action_type='updated',
-                    iss_prc_id=" . Misc::escapeInteger($HTTP_POST_VARS["category"]) . ",";
-        if (@$HTTP_POST_VARS["keep"] == "no") {
-            $stmt .= "iss_pre_id=" . Misc::escapeInteger($HTTP_POST_VARS["release"]) . ",";
+                    iss_prc_id=" . Misc::escapeInteger($_POST["category"]) . ",";
+        if (@$_POST["keep"] == "no") {
+            $stmt .= "iss_pre_id=" . Misc::escapeInteger($_POST["release"]) . ",";
         }
         $stmt .= "
-                    iss_pri_id=" . Misc::escapeInteger($HTTP_POST_VARS["priority"]) . ",
-                    iss_sta_id=" . Misc::escapeInteger($HTTP_POST_VARS["status"]) . ",
-                    iss_res_id=" . Misc::escapeInteger($HTTP_POST_VARS["resolution"]) . "
+                    iss_pri_id=" . Misc::escapeInteger($_POST["priority"]) . ",
+                    iss_sta_id=" . Misc::escapeInteger($_POST["status"]) . ",
+                    iss_res_id=" . Misc::escapeInteger($_POST["resolution"]) . "
                  WHERE
                     iss_id IN (" . implode(", ", $ids) . ")";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -960,8 +958,6 @@
      */
     function markAsDuplicate($issue_id)
     {
-        global $HTTP_POST_VARS;
-
         $issue_id = Misc::escapeInteger($issue_id);
 
         $stmt = "UPDATE
@@ -970,7 +966,7 @@
                     iss_updated_date='" . Date_API::getCurrentDateGMT() . "',
                     iss_last_internal_action_date='" . Date_API::getCurrentDateGMT() . "',
                     iss_last_internal_action_type='updated',
-                    iss_duplicated_iss_id=" . Misc::escapeInteger($HTTP_POST_VARS["duplicated_issue"]) . "
+                    iss_duplicated_iss_id=" . Misc::escapeInteger($_POST["duplicated_issue"]) . "
                  WHERE
                     iss_id=$issue_id";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -978,15 +974,15 @@
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
-            if (!empty($HTTP_POST_VARS["comments"])) {
+            if (!empty($_POST["comments"])) {
                 // add note with the comments of marking an issue as a duplicate of another one
-                $HTTP_POST_VARS['title'] = 'Issue duplication comments';
-                $HTTP_POST_VARS["note"] = $HTTP_POST_VARS["comments"];
+                $_POST['title'] = 'Issue duplication comments';
+                $_POST["note"] = $_POST["comments"];
                 Note::insert(Auth::getUserID(), $issue_id);
             }
             // record the change
             History::add($issue_id, Auth::getUserID(), History::getTypeID('duplicate_added'),
-                    "Issue marked as a duplicate of issue #" . $HTTP_POST_VARS["duplicated_issue"] . " by " . User::getFullName(Auth::getUserID()));
+                    "Issue marked as a duplicate of issue #" . $_POST["duplicated_issue"] . " by " . User::getFullName(Auth::getUserID()));
             return 1;
         }
     }
@@ -1083,10 +1079,8 @@
      */
     function addAnonymousReport()
     {
-        global $HTTP_POST_VARS, $HTTP_POST_FILES;
-
-        $options = Project::getAnonymousPostOptions($HTTP_POST_VARS["project"]);
-        $initial_status = Project::getInitialStatus($HTTP_POST_VARS["project"]);
+        $options = Project::getAnonymousPostOptions($_POST["project"]);
+        $initial_status = Project::getInitialStatus($_POST["project"]);
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue
                  (
@@ -1106,7 +1100,7 @@
                     iss_description,
                     iss_root_message_id
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS["project"]) . ",
+                    " . Misc::escapeInteger($_POST["project"]) . ",
                     " . $options["category"] . ",
                     0,
                     " . $options["priority"] . ",
@@ -1118,8 +1112,8 @@
                     '" . Date_API::getCurrentDateGMT() . "',
                     '" . Date_API::getCurrentDateGMT() . "',
                     'created',
-                    '" . Misc::escapeString($HTTP_POST_VARS["summary"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["description"]) . "',
+                    '" . Misc::escapeString($_POST["summary"]) . "',
+                    '" . Misc::escapeString($_POST["description"]) . "',
                     '" . Misc::escapeString(Mail_API::generateMessageID()) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -1133,28 +1127,28 @@
 
             // now process any files being uploaded
             $found = 0;
-            for ($i = 0; $i < count(@$HTTP_POST_FILES["file"]["name"]); $i++) {
-                if (!@empty($HTTP_POST_FILES["file"]["name"][$i])) {
+            for ($i = 0; $i < count(@$_FILES["file"]["name"]); $i++) {
+                if (!@empty($_FILES["file"]["name"][$i])) {
                     $found = 1;
                     break;
                 }
             }
             if ($found) {
                 $attachment_id = Attachment::add($new_issue_id, $options["reporter"], 'files uploaded anonymously');
-                for ($i = 0; $i < count(@$HTTP_POST_FILES["file"]["name"]); $i++) {
-                    $filename = @$HTTP_POST_FILES["file"]["name"][$i];
+                for ($i = 0; $i < count(@$_FILES["file"]["name"]); $i++) {
+                    $filename = @$_FILES["file"]["name"][$i];
                     if (empty($filename)) {
                         continue;
                     }
-                    $blob = Misc::getFileContents($HTTP_POST_FILES["file"]["tmp_name"][$i]);
+                    $blob = Misc::getFileContents($_FILES["file"]["tmp_name"][$i]);
                     if (!empty($blob)) {
-                        Attachment::addFile($attachment_id, $new_issue_id, $filename, $HTTP_POST_FILES["file"]["type"][$i], $blob);
+                        Attachment::addFile($attachment_id, $new_issue_id, $filename, $_FILES["file"]["type"][$i], $blob);
                     }
                 }
             }
             // need to process any custom fields ?
-            if (@count($HTTP_POST_VARS["custom_fields"]) > 0) {
-                foreach ($HTTP_POST_VARS["custom_fields"] as $fld_id => $value) {
+            if (@count($_POST["custom_fields"]) > 0) {
+                foreach ($_POST["custom_fields"] as $fld_id => $value) {
                     Custom_Field::associateIssue($new_issue_id, $fld_id, $value);
                 }
             }
@@ -1170,9 +1164,9 @@
             }
 
             // also notify any users that want to receive emails anytime a new issue is created
-            Notification::notifyNewIssue($HTTP_POST_VARS['project'], $new_issue_id);
+            Notification::notifyNewIssue($_POST['project'], $new_issue_id);
 
-            Workflow::handleNewIssue(Misc::escapeInteger($HTTP_POST_VARS["project"]),  $new_issue_id, false, false);
+            Workflow::handleNewIssue(Misc::escapeInteger($_POST["project"]),  $new_issue_id, false, false);
 
             return $new_issue_id;
         }
@@ -1241,8 +1235,6 @@
      */
     function close($usr_id, $issue_id, $send_notification, $resolution_id, $status_id, $reason, $send_notification_to = 'internal')
     {
-        global $HTTP_POST_VARS;
-
         $usr_id = Misc::escapeInteger($usr_id);
         $issue_id = Misc::escapeInteger($issue_id);
         $resolution_id = Misc::escapeInteger($resolution_id);
@@ -1296,8 +1288,8 @@
                 $ids = $sup_id;
             } else {
                 // add note with the reason to close the issue
-                $HTTP_POST_VARS['title'] = 'Issue closed comments';
-                $HTTP_POST_VARS["note"] = $reason;
+                $_POST['title'] = 'Issue closed comments';
+                $_POST["note"] = $reason;
                 Note::insert($usr_id, $issue_id, false, true, true);
                 $ids = false;
             }
@@ -1334,8 +1326,6 @@
      */
     function update($issue_id)
     {
-        global $HTTP_POST_VARS;
-
         $issue_id = Misc::escapeInteger($issue_id);
 
         $usr_id = Auth::getUserID();
@@ -1343,12 +1333,12 @@
         // get all of the 'current' information of this issue
         $current = Issue::getDetails($issue_id);
         // update the issue associations
-        $association_diff = Misc::arrayDiff($current['associated_issues'], @$HTTP_POST_VARS['associated_issues']);
+        $association_diff = Misc::arrayDiff($current['associated_issues'], @$_POST['associated_issues']);
         if (count($association_diff) > 0) {
             // go through the new assocations, if association already exists, skip it
             $associations_to_remove = $current['associated_issues'];
-            if (count(@$HTTP_POST_VARS['associated_issues']) > 0) {
-                foreach ($HTTP_POST_VARS['associated_issues'] as $index => $associated_id) {
+            if (count(@$_POST['associated_issues']) > 0) {
+                foreach ($_POST['associated_issues'] as $index => $associated_id) {
                     if (!in_array($associated_id, $current['associated_issues'])) {
                         Issue::addAssociation($issue_id, $associated_id, $usr_id);
                     } else {
@@ -1363,21 +1353,21 @@
                 }
             }
         }
-        if ((!empty($HTTP_POST_VARS['expected_resolution_date']['Year'])) &&
-             (!empty($HTTP_POST_VARS['expected_resolution_date']['Month'])) &&
-             (!empty($HTTP_POST_VARS['expected_resolution_date']['Day']))) {
-            $HTTP_POST_VARS['expected_resolution_date'] = sprintf('%s-%s-%s', $HTTP_POST_VARS['expected_resolution_date']['Year'],
-                                                $HTTP_POST_VARS['expected_resolution_date']['Month'],
-                                                $HTTP_POST_VARS['expected_resolution_date']['Day']);
+        if ((!empty($_POST['expected_resolution_date']['Year'])) &&
+             (!empty($_POST['expected_resolution_date']['Month'])) &&
+             (!empty($_POST['expected_resolution_date']['Day']))) {
+            $_POST['expected_resolution_date'] = sprintf('%s-%s-%s', $_POST['expected_resolution_date']['Year'],
+                                                $_POST['expected_resolution_date']['Month'],
+                                                $_POST['expected_resolution_date']['Day']);
         } else {
-            $HTTP_POST_VARS['expected_resolution_date'] = '';
+            $_POST['expected_resolution_date'] = '';
         }
         $assignments_changed = false;
-        if (@$HTTP_POST_VARS["keep_assignments"] == "no") {
+        if (@$_POST["keep_assignments"] == "no") {
             // only change the issue-user associations if there really were any changes
             $old_assignees = array_merge($current['assigned_users'], $current['assigned_inactive_users']);
-            if (!empty($HTTP_POST_VARS['assignments'])) {
-                $new_assignees = @$HTTP_POST_VARS['assignments'];
+            if (!empty($_POST['assignments'])) {
+                $new_assignees = @$_POST['assignments'];
             } else {
                 $new_assignees = array();
             }
@@ -1403,8 +1393,8 @@
                 Notification::notifyNewAssignment($assignment_notifications, $issue_id);
             }
         }
-        if (empty($HTTP_POST_VARS["estimated_dev_time"])) {
-            $HTTP_POST_VARS["estimated_dev_time"] = 0;
+        if (empty($_POST["estimated_dev_time"])) {
+            $_POST["estimated_dev_time"] = 0;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue
@@ -1412,31 +1402,31 @@
                     iss_updated_date='" . Date_API::getCurrentDateGMT() . "',
                     iss_last_public_action_date='" . Date_API::getCurrentDateGMT() . "',
                     iss_last_public_action_type='updated',";
-        if (!empty($HTTP_POST_VARS["category"])) {
-            $stmt .= "iss_prc_id=" . Misc::escapeInteger($HTTP_POST_VARS["category"]) . ",";
+        if (!empty($_POST["category"])) {
+            $stmt .= "iss_prc_id=" . Misc::escapeInteger($_POST["category"]) . ",";
         }
-        if (@$HTTP_POST_VARS["keep"] == "no") {
-            $stmt .= "iss_pre_id=" . Misc::escapeInteger($HTTP_POST_VARS["release"]) . ",";
+        if (@$_POST["keep"] == "no") {
+            $stmt .= "iss_pre_id=" . Misc::escapeInteger($_POST["release"]) . ",";
         }
-        if (!empty($HTTP_POST_VARS['expected_resolution_date'])) {
-            $stmt .= "iss_expected_resolution_date='" . Misc::escapeString($HTTP_POST_VARS['expected_resolution_date']) . "',";
+        if (!empty($_POST['expected_resolution_date'])) {
+            $stmt .= "iss_expected_resolution_date='" . Misc::escapeString($_POST['expected_resolution_date']) . "',";
         } else {
             $stmt .= "iss_expected_resolution_date=null,";
         }
         $stmt .= "
-                    iss_pre_id=" . Misc::escapeInteger($HTTP_POST_VARS["release"]) . ",
-                    iss_pri_id=" . Misc::escapeInteger($HTTP_POST_VARS["priority"]) . ",
-                    iss_sta_id=" . Misc::escapeInteger($HTTP_POST_VARS["status"]) . ",
-                    iss_res_id=" . Misc::escapeInteger($HTTP_POST_VARS["resolution"]) . ",
-                    iss_summary='" . Misc::escapeString($HTTP_POST_VARS["summary"]) . "',
-                    iss_description='" . Misc::escapeString($HTTP_POST_VARS["description"]) . "',
-                    iss_dev_time='" . Misc::escapeString($HTTP_POST_VARS["estimated_dev_time"]) . "',
-                    iss_percent_complete= '" . Misc::escapeString($HTTP_POST_VARS["percent_complete"]) . "',
-                    iss_trigger_reminders=" . Misc::escapeInteger($HTTP_POST_VARS["trigger_reminders"]) . ",
-                    iss_grp_id ='" . Misc::escapeInteger($HTTP_POST_VARS["group"]) . "'";
-        if (isset($HTTP_POST_VARS['private'])) {
+                    iss_pre_id=" . Misc::escapeInteger($_POST["release"]) . ",
+                    iss_pri_id=" . Misc::escapeInteger($_POST["priority"]) . ",
+                    iss_sta_id=" . Misc::escapeInteger($_POST["status"]) . ",
+                    iss_res_id=" . Misc::escapeInteger($_POST["resolution"]) . ",
+                    iss_summary='" . Misc::escapeString($_POST["summary"]) . "',
+                    iss_description='" . Misc::escapeString($_POST["description"]) . "',
+                    iss_dev_time='" . Misc::escapeString($_POST["estimated_dev_time"]) . "',
+                    iss_percent_complete= '" . Misc::escapeString($_POST["percent_complete"]) . "',
+                    iss_trigger_reminders=" . Misc::escapeInteger($_POST["trigger_reminders"]) . ",
+                    iss_grp_id ='" . Misc::escapeInteger($_POST["group"]) . "'";
+        if (isset($_POST['private'])) {
             $stmt .= ",
-                    iss_private = " . Misc::escapeInteger($HTTP_POST_VARS['private']);
+                    iss_private = " . Misc::escapeInteger($_POST['private']);
         }
         $stmt .= "
                  WHERE
@@ -1448,47 +1438,47 @@
         } else {
             // add change to the history (only for changes on specific fields?)
             $updated_fields = array();
-            if ($current["iss_expected_resolution_date"] != $HTTP_POST_VARS['expected_resolution_date']) {
-                $updated_fields["Expected Resolution Date"] = History::formatChanges($current["iss_expected_resolution_date"], $HTTP_POST_VARS['expected_resolution_date']);
+            if ($current["iss_expected_resolution_date"] != $_POST['expected_resolution_date']) {
+                $updated_fields["Expected Resolution Date"] = History::formatChanges($current["iss_expected_resolution_date"], $_POST['expected_resolution_date']);
             }
-            if ($current["iss_prc_id"] != $HTTP_POST_VARS["category"]) {
-                $updated_fields["Category"] = History::formatChanges(Category::getTitle($current["iss_prc_id"]), Category::getTitle($HTTP_POST_VARS["category"]));
+            if ($current["iss_prc_id"] != $_POST["category"]) {
+                $updated_fields["Category"] = History::formatChanges(Category::getTitle($current["iss_prc_id"]), Category::getTitle($_POST["category"]));
             }
-            if ($current["iss_pre_id"] != $HTTP_POST_VARS["release"]) {
-                $updated_fields["Release"] = History::formatChanges(Release::getTitle($current["iss_pre_id"]), Release::getTitle($HTTP_POST_VARS["release"]));
+            if ($current["iss_pre_id"] != $_POST["release"]) {
+                $updated_fields["Release"] = History::formatChanges(Release::getTitle($current["iss_pre_id"]), Release::getTitle($_POST["release"]));
             }
-            if ($current["iss_pri_id"] != $HTTP_POST_VARS["priority"]) {
-                $updated_fields["Priority"] = History::formatChanges(Priority::getTitle($current["iss_pri_id"]), Priority::getTitle($HTTP_POST_VARS["priority"]));
-                Workflow::handlePriorityChange($prj_id, $issue_id, $usr_id, $current, $HTTP_POST_VARS);
+            if ($current["iss_pri_id"] != $_POST["priority"]) {
+                $updated_fields["Priority"] = History::formatChanges(Priority::getTitle($current["iss_pri_id"]), Priority::getTitle($_POST["priority"]));
+                Workflow::handlePriorityChange($prj_id, $issue_id, $usr_id, $current, $_POST);
             }
-            if ($current["iss_sta_id"] != $HTTP_POST_VARS["status"]) {
+            if ($current["iss_sta_id"] != $_POST["status"]) {
                 // clear out the last-triggered-reminder flag when changing the status of an issue
                 Reminder_Action::clearLastTriggered($issue_id);
 
                 // if old status was closed and new status is not, clear closed data from issue.
                 $old_status_details = Status::getDetails($current['iss_sta_id']);
                 if ($old_status_details['sta_is_closed'] == 1) {
-                    $new_status_details = Status::getDetails($HTTP_POST_VARS["status"]);
+                    $new_status_details = Status::getDetails($_POST["status"]);
                     if ($new_status_details['sta_is_closed'] != 1) {
                         Issue::clearClosed($issue_id);
                     }
                 }
-                $updated_fields["Status"] = History::formatChanges(Status::getStatusTitle($current["iss_sta_id"]), Status::getStatusTitle($HTTP_POST_VARS["status"]));
+                $updated_fields["Status"] = History::formatChanges(Status::getStatusTitle($current["iss_sta_id"]), Status::getStatusTitle($_POST["status"]));
             }
-            if ($current["iss_res_id"] != $HTTP_POST_VARS["resolution"]) {
-                $updated_fields["Resolution"] = History::formatChanges(Resolution::getTitle($current["iss_res_id"]), Resolution::getTitle($HTTP_POST_VARS["resolution"]));
+            if ($current["iss_res_id"] != $_POST["resolution"]) {
+                $updated_fields["Resolution"] = History::formatChanges(Resolution::getTitle($current["iss_res_id"]), Resolution::getTitle($_POST["resolution"]));
             }
-            if ($current["iss_dev_time"] != $HTTP_POST_VARS["estimated_dev_time"]) {
-                $updated_fields["Estimated Dev. Time"] = History::formatChanges(Misc::getFormattedTime(($current["iss_dev_time"]*60)), Misc::getFormattedTime(($HTTP_POST_VARS["estimated_dev_time"]*60)));
+            if ($current["iss_dev_time"] != $_POST["estimated_dev_time"]) {
+                $updated_fields["Estimated Dev. Time"] = History::formatChanges(Misc::getFormattedTime(($current["iss_dev_time"]*60)), Misc::getFormattedTime(($_POST["estimated_dev_time"]*60)));
             }
-            if ($current["iss_summary"] != $HTTP_POST_VARS["summary"]) {
+            if ($current["iss_summary"] != $_POST["summary"]) {
                 $updated_fields["Summary"] = '';
             }
-            if ($current["iss_description"] != $HTTP_POST_VARS["description"]) {
+            if ($current["iss_description"] != $_POST["description"]) {
                 $updated_fields["Description"] = '';
             }
-            if ((isset($HTTP_POST_VARS['private'])) && ($HTTP_POST_VARS['private'] != $current['iss_private'])) {
-                $updated_fields["Private"] = History::formatChanges(Misc::getBooleanDisplayValue($current['iss_private']), Misc::getBooleanDisplayValue($HTTP_POST_VARS['private']));
+            if ((isset($_POST['private'])) && ($_POST['private'] != $current['iss_private'])) {
+                $updated_fields["Private"] = History::formatChanges(Misc::getBooleanDisplayValue($current['iss_private']), Misc::getBooleanDisplayValue($_POST['private']));
             }
             if (count($updated_fields) > 0) {
                 // log the changes
@@ -1507,13 +1497,13 @@
                 }
                 History::add($issue_id, $usr_id, History::getTypeID('issue_updated'), "Issue updated ($changes) by " . User::getFullName($usr_id));
                 // send notifications for the issue being updated
-                Notification::notifyIssueUpdated($issue_id, $current, $HTTP_POST_VARS);
+                Notification::notifyIssueUpdated($issue_id, $current, $_POST);
             }
 
             // record group change as a seperate change
-            if ($current["iss_grp_id"] != (int)$HTTP_POST_VARS["group"]) {
+            if ($current["iss_grp_id"] != (int)$_POST["group"]) {
                 History::add($issue_id, $usr_id, History::getTypeID('group_changed'),
-                    "Group changed (" . History::formatChanges(Group::getName($current["iss_grp_id"]), Group::getName($HTTP_POST_VARS["group"])) . ") by " . User::getFullName($usr_id));
+                    "Group changed (" . History::formatChanges(Group::getName($current["iss_grp_id"]), Group::getName($_POST["group"])) . ") by " . User::getFullName($usr_id));
             }
 
             // now update any duplicates, if any
@@ -1537,10 +1527,10 @@
 
             if ($assignments_changed) {
                 // XXX: we may want to also send the email notification for those "new" assignees
-                Workflow::handleAssignmentChange(Issue::getProjectID($issue_id), $issue_id, $usr_id, Issue::getDetails($issue_id), @$HTTP_POST_VARS['assignments'], false);
+                Workflow::handleAssignmentChange(Issue::getProjectID($issue_id), $issue_id, $usr_id, Issue::getDetails($issue_id), @$_POST['assignments'], false);
             }
 
-            Workflow::handleIssueUpdated($prj_id, $issue_id, $usr_id, $current, $HTTP_POST_VARS);
+            Workflow::handleIssueUpdated($prj_id, $issue_id, $usr_id, $current, $_POST);
             return 1;
         }
     }
@@ -1918,7 +1908,7 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS, $HTTP_POST_FILES, $insert_errors;
+        global $insert_errors;
 
         $usr_id = Auth::getUserID();
         $prj_id = Auth::getCurrentProject();
@@ -1927,15 +1917,15 @@
         $insert_errors = array();
 
         $missing_fields = array();
-        if ($HTTP_POST_VARS["category"] == '-1') {
+        if ($_POST["category"] == '-1') {
             $missing_fields[] = "Category";
         }
-        if ($HTTP_POST_VARS["priority"] == '-1') {
+        if ($_POST["priority"] == '-1') {
             $missing_fields[] = "Priority";
         }
 
-        if ($HTTP_POST_VARS["estimated_dev_time"] == '') {
-            $HTTP_POST_VARS["estimated_dev_time"] = 0;
+        if ($_POST["estimated_dev_time"] == '') {
+            $_POST["estimated_dev_time"] = 0;
         }
 
         // add new issue
@@ -1943,16 +1933,16 @@
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue
                  (
                     iss_prj_id,\n";
-        if (!empty($HTTP_POST_VARS["group"])) {
+        if (!empty($_POST["group"])) {
             $stmt .= "iss_grp_id,\n";
         }
-        if (!empty($HTTP_POST_VARS["category"])) {
+        if (!empty($_POST["category"])) {
             $stmt .= "iss_prc_id,\n";
         }
-        if (!empty($HTTP_POST_VARS["release"])) {
+        if (!empty($_POST["release"])) {
             $stmt .= "iss_pre_id,\n";
         }
-        if (!empty($HTTP_POST_VARS["priority"])) {
+        if (!empty($_POST["priority"])) {
             $stmt .= "iss_pri_id,\n";
         }
         $stmt .= "iss_usr_id,";
@@ -1980,22 +1970,22 @@
                     iss_root_message_id
                  ) VALUES (
                     " . $prj_id . ",\n";
-        if (!empty($HTTP_POST_VARS["group"])) {
-            $stmt .= Misc::escapeInteger($HTTP_POST_VARS["group"]) . ",\n";
+        if (!empty($_POST["group"])) {
+            $stmt .= Misc::escapeInteger($_POST["group"]) . ",\n";
         }
-        if (!empty($HTTP_POST_VARS["category"])) {
-            $stmt .= Misc::escapeInteger($HTTP_POST_VARS["category"]) . ",\n";
+        if (!empty($_POST["category"])) {
+            $stmt .= Misc::escapeInteger($_POST["category"]) . ",\n";
         }
-        if (!empty($HTTP_POST_VARS["release"])) {
-            $stmt .= Misc::escapeInteger($HTTP_POST_VARS["release"]) . ",\n";
+        if (!empty($_POST["release"])) {
+            $stmt .= Misc::escapeInteger($_POST["release"]) . ",\n";
         }
-        if (!empty($HTTP_POST_VARS["priority"])) {
-            $stmt .= Misc::escapeInteger($HTTP_POST_VARS["priority"]) . ",";
+        if (!empty($_POST["priority"])) {
+            $stmt .= Misc::escapeInteger($_POST["priority"]) . ",";
         }
         // if we are creating an issue for a customer, put the
         // main customer contact as the reporter for it
         if (Customer::hasCustomerIntegration($prj_id)) {
-            $contact_usr_id = User::getUserIDByContactID($HTTP_POST_VARS['contact']);
+            $contact_usr_id = User::getUserIDByContactID($_POST['contact']);
             if (empty($contact_usr_id)) {
                 $contact_usr_id = $usr_id;
             }
@@ -2008,22 +1998,22 @@
         }
         if (Customer::hasCustomerIntegration($prj_id)) {
             $stmt .= "
-                    " . Misc::escapeInteger($HTTP_POST_VARS['customer']) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS['contact']) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS["contact_person_lname"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["contact_person_fname"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["contact_email"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["contact_phone"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["contact_timezone"]) . "',";
+                    " . Misc::escapeInteger($_POST['customer']) . ",
+                    " . Misc::escapeInteger($_POST['contact']) . ",
+                    '" . Misc::escapeString($_POST["contact_person_lname"]) . "',
+                    '" . Misc::escapeString($_POST["contact_person_fname"]) . "',
+                    '" . Misc::escapeString($_POST["contact_email"]) . "',
+                    '" . Misc::escapeString($_POST["contact_phone"]) . "',
+                    '" . Misc::escapeString($_POST["contact_timezone"]) . "',";
         }
         $stmt .= "
                     '" . Date_API::getCurrentDateGMT() . "',
                     '" . Date_API::getCurrentDateGMT() . "',
                     'created',
-                    '" . Misc::escapeString($HTTP_POST_VARS["summary"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["description"]) . "',
-                    " . Misc::escapeString($HTTP_POST_VARS["estimated_dev_time"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS["private"]) . " ,
+                    '" . Misc::escapeString($_POST["summary"]) . "',
+                    '" . Misc::escapeString($_POST["description"]) . "',
+                    " . Misc::escapeString($_POST["estimated_dev_time"]) . ",
+                    " . Misc::escapeInteger($_POST["private"]) . " ,
                     '" . Misc::escapeString(Mail_API::generateMessageID()) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -2040,18 +2030,18 @@
 
             $emails = array();
             if (Customer::hasCustomerIntegration($prj_id)) {
-                if (@count($HTTP_POST_VARS['contact_extra_emails']) > 0) {
-                    $emails = $HTTP_POST_VARS['contact_extra_emails'];
+                if (@count($_POST['contact_extra_emails']) > 0) {
+                    $emails = $_POST['contact_extra_emails'];
                 }
                 // add the primary contact to the notification list
-                if ($HTTP_POST_VARS['add_primary_contact'] == 'yes') {
-                    $contact_email = User::getEmailByContactID($HTTP_POST_VARS['contact']);
+                if ($_POST['add_primary_contact'] == 'yes') {
+                    $contact_email = User::getEmailByContactID($_POST['contact']);
                     if (!empty($contact_email)) {
                         $emails[] = $contact_email;
                     }
                 }
                 // if there are any technical account managers associated with this customer, add these users to the notification list
-                $managers = Customer::getAccountManagers($prj_id, $HTTP_POST_VARS['customer']);
+                $managers = Customer::getAccountManagers($prj_id, $_POST['customer']);
                 $manager_usr_ids = array_keys($managers);
                 $manager_emails = array_values($managers);
                 $emails = array_merge($emails, $manager_emails);
@@ -2076,12 +2066,12 @@
                 $has_TAM = true;
             }
             // now add the user/issue association (aka assignments)
-            if (@count($HTTP_POST_VARS["users"]) > 0) {
-                for ($i = 0; $i < count($HTTP_POST_VARS["users"]); $i++) {
-                    Notification::subscribeUser($usr_id, $new_issue_id, $HTTP_POST_VARS["users"][$i], $actions);
-                    Issue::addUserAssociation($usr_id, $new_issue_id, $HTTP_POST_VARS["users"][$i]);
-                    if ($HTTP_POST_VARS["users"][$i] != $usr_id) {
-                        $users[] = $HTTP_POST_VARS["users"][$i];
+            if (@count($_POST["users"]) > 0) {
+                for ($i = 0; $i < count($_POST["users"]); $i++) {
+                    Notification::subscribeUser($usr_id, $new_issue_id, $_POST["users"][$i], $actions);
+                    Issue::addUserAssociation($usr_id, $new_issue_id, $_POST["users"][$i]);
+                    if ($_POST["users"][$i] != $usr_id) {
+                        $users[] = $_POST["users"][$i];
                     }
                 }
             } else {
@@ -2101,20 +2091,20 @@
 
             // now process any files being uploaded
             $found = 0;
-            for ($i = 0; $i < count(@$HTTP_POST_FILES["file"]["name"]); $i++) {
-                if (!@empty($HTTP_POST_FILES["file"]["name"][$i])) {
+            for ($i = 0; $i < count(@$_FILES["file"]["name"]); $i++) {
+                if (!@empty($_FILES["file"]["name"][$i])) {
                     $found = 1;
                     break;
                 }
             }
             if ($found) {
                 $files = array();
-                for ($i = 0; $i < count($HTTP_POST_FILES["file"]["name"]); $i++) {
-                    $filename = @$HTTP_POST_FILES["file"]["name"][$i];
+                for ($i = 0; $i < count($_FILES["file"]["name"]); $i++) {
+                    $filename = @$_FILES["file"]["name"][$i];
                     if (empty($filename)) {
                         continue;
                     }
-                    $blob = Misc::getFileContents($HTTP_POST_FILES["file"]["tmp_name"][$i]);
+                    $blob = Misc::getFileContents($_FILES["file"]["tmp_name"][$i]);
                     if (empty($blob)) {
                         // error reading a file
                         $insert_errors["file[$i]"] = "There was an error uploading the file '$filename'.";
@@ -2122,7 +2112,7 @@
                     }
                     $files[] = array(
                         "filename" => $filename,
-                        "type"     => $HTTP_POST_FILES['file']['type'][$i],
+                        "type"     => $_FILES['file']['type'][$i],
                         "blob"     => $blob
                     );
                 }
@@ -2134,29 +2124,29 @@
                 }
             }
             // need to associate any emails ?
-            if (!empty($HTTP_POST_VARS["attached_emails"])) {
-                $items = explode(",", $HTTP_POST_VARS["attached_emails"]);
+            if (!empty($_POST["attached_emails"])) {
+                $items = explode(",", $_POST["attached_emails"]);
                 Support::associate($usr_id, $new_issue_id, $items);
             }
             // need to notify any emails being converted into issues ?
-            if (@count($HTTP_POST_VARS["notify_senders"]) > 0) {
-                $recipients = Notification::notifyEmailConvertedIntoIssue($prj_id, $new_issue_id, $HTTP_POST_VARS["notify_senders"], @$HTTP_POST_VARS['customer']);
+            if (@count($_POST["notify_senders"]) > 0) {
+                $recipients = Notification::notifyEmailConvertedIntoIssue($prj_id, $new_issue_id, $_POST["notify_senders"], @$_POST['customer']);
             } else {
                 $recipients = array();
             }
             // need to process any custom fields ?
-            if (@count($HTTP_POST_VARS["custom_fields"]) > 0) {
-                foreach ($HTTP_POST_VARS["custom_fields"] as $fld_id => $value) {
+            if (@count($_POST["custom_fields"]) > 0) {
+                foreach ($_POST["custom_fields"] as $fld_id => $value) {
                     Custom_Field::associateIssue($new_issue_id, $fld_id, $value);
                 }
             }
             // also send a special confirmation email to the customer contact
-            if ((@$HTTP_POST_VARS['notify_customer'] == 'yes') && (!empty($HTTP_POST_VARS['contact']))) {
+            if ((@$_POST['notify_customer'] == 'yes') && (!empty($_POST['contact']))) {
                 // also need to pass the list of sender emails already notified,
                 // so we can avoid notifying the same person again
-                $contact_email = User::getEmailByContactID($HTTP_POST_VARS['contact']);
+                $contact_email = User::getEmailByContactID($_POST['contact']);
                 if (@!in_array($contact_email, $recipients)) {
-                    Customer::notifyCustomerIssue($prj_id, $new_issue_id, $HTTP_POST_VARS['contact']);
+                    Customer::notifyCustomerIssue($prj_id, $new_issue_id, $_POST['contact']);
                 }
             }
 
@@ -2179,13 +2169,12 @@
      */
     function getParam($name)
     {
-        global $HTTP_POST_VARS, $HTTP_GET_VARS;
         $profile = Search_Profile::getProfile(Auth::getUserID(), Auth::getCurrentProject(), 'issue');
 
-        if (isset($HTTP_GET_VARS[$name])) {
-            return $HTTP_GET_VARS[$name];
-        } elseif (isset($HTTP_POST_VARS[$name])) {
-            return $HTTP_POST_VARS[$name];
+        if (isset($_GET[$name])) {
+            return $_GET[$name];
+        } elseif (isset($_POST[$name])) {
+            return $_POST[$name];
         } elseif (isset($profile[$name])) {
             return $profile[$name];
         } else {
@@ -2292,7 +2281,6 @@
      */
     function getSortingInfo($options)
     {
-        global $HTTP_SERVER_VARS;
 
         $custom_fields = Custom_Field::getFieldsToBeListed(Auth::getCurrentProject());
 
@@ -2327,7 +2315,7 @@
                     $sort_order = "asc";
                 }
             }
-            $items["links"][$field] = $HTTP_SERVER_VARS["PHP_SELF"] . "?sort_by=" . $field . "&sort_order=" . $sort_order;
+            $items["links"][$field] = $_SERVER["PHP_SELF"] . "?sort_by=" . $field . "&sort_order=" . $sort_order;
         }
         return $items;
     }
@@ -3174,7 +3162,6 @@
      */
     function getDetails($issue_id, $force_refresh = false)
     {
-        global $HTTP_SERVER_VARS;
         static $returns;
 
         $issue_id = Misc::escapeInteger($issue_id);
@@ -3248,7 +3235,7 @@
                     }
                 }
                 $res['iss_original_description'] = $res["iss_description"];
-                if (!strstr($HTTP_SERVER_VARS["PHP_SELF"], 'update.php')) {
+                if (!strstr($_SERVER["PHP_SELF"], 'update.php')) {
                     $res["iss_description"] = nl2br(htmlspecialchars($res["iss_description"]));
                     $res["iss_resolution"] = Resolution::getTitle($res["iss_res_id"]);
                 }
@@ -3348,14 +3335,12 @@
      */
     function bulkUpdate()
     {
-        global $HTTP_POST_VARS;
-
         // check if user performing this chance has the proper role
         if (Auth::getCurrentRole() < User::getRoleID('Manager')) {
             return -1;
         }
 
-        $items = Misc::escapeInteger($HTTP_POST_VARS['item']);
+        $items = Misc::escapeInteger($_POST['item']);
         $new_status_id = Misc::escapeInteger($_POST['status']);
         $new_release_id = Misc::escapeInteger($_POST['release']);
         $new_priority_id = Misc::escapeInteger($_POST['priority']);
@@ -3364,7 +3349,7 @@
         for ($i = 0; $i < count($items); $i++) {
             if (!Issue::canAccess($items[$i], Auth::getUserID())) {
                 continue;
-            } elseif (Issue::getProjectID($HTTP_POST_VARS['item'][$i]) != Auth::getCurrentProject()) {
+            } elseif (Issue::getProjectID($_POST['item'][$i]) != Auth::getCurrentProject()) {
                 // make sure issue is not in another project
                 continue;
             }
@@ -3372,8 +3357,8 @@
             $updated_fields = array();
 
             // update assignment
-            if (count(@$HTTP_POST_VARS['users']) > 0) {
-                $users = Misc::escapeInteger($HTTP_POST_VARS['users']);
+            if (count(@$_POST['users']) > 0) {
+                $users = Misc::escapeInteger($_POST['users']);
                 // get who this issue is currently assigned too
                 $stmt = "SELECT
                             isu_usr_id,
@@ -3485,16 +3470,14 @@
      */
     function setImpactAnalysis($issue_id)
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue
                  SET
                     iss_updated_date='" . Date_API::getCurrentDateGMT() . "',
                     iss_last_internal_action_date='" . Date_API::getCurrentDateGMT() . "',
                     iss_last_internal_action_type='update',
-                    iss_developer_est_time=" . Misc::escapeInteger($HTTP_POST_VARS["dev_time"]) . ",
-                    iss_impact_analysis='" . Misc::escapeString($HTTP_POST_VARS["impact_analysis"]) . "'
+                    iss_developer_est_time=" . Misc::escapeInteger($_POST["dev_time"]) . ",
+                    iss_impact_analysis='" . Misc::escapeString($_POST["impact_analysis"]) . "'
                  WHERE
                     iss_id=" . Misc::escapeInteger($issue_id);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
Index: include/class.customer.php
===================================================================
--- include/class.customer.php	(revision 3164)
+++ include/class.customer.php	(working copy)
@@ -972,8 +972,6 @@
      */
     function insertAccountManager()
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "customer_account_manager
                  (
@@ -982,10 +980,10 @@
                     cam_usr_id,
                     cam_type
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS['project']) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS['customer']) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS['manager']) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS['type']) . "'
+                    " . Misc::escapeInteger($_POST['project']) . ",
+                    " . Misc::escapeInteger($_POST['customer']) . ",
+                    " . Misc::escapeInteger($_POST['manager']) . ",
+                    '" . Misc::escapeString($_POST['type']) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -1030,17 +1028,15 @@
      */
     function updateAccountManager()
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "customer_account_manager
                  SET
-                    cam_prj_id=" . Misc::escapeInteger($HTTP_POST_VARS['project']) . ",
-                    cam_customer_id=" . Misc::escapeInteger($HTTP_POST_VARS['customer']) . ",
-                    cam_usr_id=" . Misc::escapeInteger($HTTP_POST_VARS['manager']) . ",
-                    cam_type='" . Misc::escapeString($HTTP_POST_VARS['type']) . "'
+                    cam_prj_id=" . Misc::escapeInteger($_POST['project']) . ",
+                    cam_customer_id=" . Misc::escapeInteger($_POST['customer']) . ",
+                    cam_usr_id=" . Misc::escapeInteger($_POST['manager']) . ",
+                    cam_type='" . Misc::escapeString($_POST['type']) . "'
                  WHERE
-                    cam_id=" . $HTTP_POST_VARS['id'];
+                    cam_id=" . $_POST['id'];
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -1060,9 +1056,7 @@
      */
     function removeAccountManager()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "customer_account_manager
                  WHERE
Index: include/class.note.php
===================================================================
--- include/class.note.php	(revision 3164)
+++ include/class.note.php	(working copy)
@@ -280,14 +280,12 @@
      */
     function insert($usr_id, $issue_id, $unknown_user = FALSE, $log = true, $closing = false, $send_notification = true)
     {
-        global $HTTP_POST_VARS;
-
         $issue_id = Misc::escapeInteger($issue_id);
 
-        if (@$HTTP_POST_VARS['add_extra_recipients'] != 'yes') {
+        if (@$_POST['add_extra_recipients'] != 'yes') {
             $note_cc = array();
         } else {
-            $note_cc = $HTTP_POST_VARS['note_cc'];
+            $note_cc = $_POST['note_cc'];
         }
         // add the poster to the list of people to be subscribed to the notification list
         // only if there is no 'unknown user'.
@@ -297,11 +295,11 @@
                 Notification::subscribeUser($usr_id, $issue_id, $note_cc[$i], Notification::getDefaultActions());
             }
         }
-        if (Validation::isWhitespace($HTTP_POST_VARS["note"])) {
+        if (Validation::isWhitespace($_POST["note"])) {
             return -2;
         }
-        if (empty($HTTP_POST_VARS['message_id'])) {
-            $HTTP_POST_VARS['message_id'] = Mail_API::generateMessageID();
+        if (empty($_POST['message_id'])) {
+            $_POST['message_id'] = Mail_API::generateMessageID();
         }
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "note
@@ -311,11 +309,11 @@
                     not_created_date,
                     not_note,
                     not_title";
-        if (!@empty($HTTP_POST_VARS['blocked_msg'])) {
+        if (!@empty($_POST['blocked_msg'])) {
             $stmt .= ", not_blocked_message";
         }
         $stmt .= ", not_message_id";
-        if (!@empty($HTTP_POST_VARS['parent_id'])) {
+        if (!@empty($_POST['parent_id'])) {
             $stmt .= ", not_parent_id";
         }
         if ($unknown_user != false) {
@@ -326,14 +324,14 @@
                     $issue_id,
                     $usr_id,
                     '" . Date_API::getCurrentDateGMT() . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["note"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "'";
-        if (!@empty($HTTP_POST_VARS['blocked_msg'])) {
-            $stmt .= ", '" . Misc::escapeString($HTTP_POST_VARS['blocked_msg']) . "'";
+                    '" . Misc::escapeString($_POST["note"]) . "',
+                    '" . Misc::escapeString($_POST["title"]) . "'";
+        if (!@empty($_POST['blocked_msg'])) {
+            $stmt .= ", '" . Misc::escapeString($_POST['blocked_msg']) . "'";
         }
-        $stmt .= ", '" . Misc::escapeString($HTTP_POST_VARS['message_id']) . "'";
-        if (!@empty($HTTP_POST_VARS['parent_id'])) {
-            $stmt .= ", " . Misc::escapeInteger($HTTP_POST_VARS['parent_id']) . "";
+        $stmt .= ", '" . Misc::escapeString($_POST['message_id']) . "'";
+        if (!@empty($_POST['parent_id'])) {
+            $stmt .= ", " . Misc::escapeInteger($_POST['parent_id']) . "";
         }
         if ($unknown_user != false) {
             $stmt .= ", '" . Misc::escapeString($unknown_user) . "'";
@@ -354,8 +352,8 @@
             // send notifications for the issue being updated
             if ($send_notification) {
                 $internal_only = true;
-                if ((@$HTTP_POST_VARS['add_extra_recipients'] != 'yes') && (@count($HTTP_POST_VARS['note_cc']) > 0)) {
-                    Notification::notify($issue_id, 'notes', $new_note_id, $internal_only, $HTTP_POST_VARS['note_cc']);
+                if ((@$_POST['add_extra_recipients'] != 'yes') && (@count($_POST['note_cc']) > 0)) {
+                    Notification::notify($issue_id, 'notes', $new_note_id, $internal_only, $_POST['note_cc']);
                 } else {
                     Notification::notify($issue_id, 'notes', $new_note_id, $internal_only);
                 }
@@ -833,4 +831,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Note Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.workflow.php
===================================================================
--- include/class.workflow.php	(revision 3164)
+++ include/class.workflow.php	(working copy)
@@ -139,7 +139,7 @@
      * @param   integer $issue_id The ID of the issue.
      * @param   integer $usr_id The ID of the user.
      * @param   array $old_details The old details of the issues.
-     * @param   array $changes The changes that were applied to this issue (the $HTTP_POST_VARS)
+     * @param   array $changes The changes that were applied to this issue (the $_POST)
      */
     function handleIssueUpdated($prj_id, $issue_id, $usr_id, $old_details, $changes)
     {
@@ -192,7 +192,7 @@
      * @param   integer $issue_id The ID of the issue.
      * @param   integer $usr_id The id of the user who locked the issue.
      * @param   array $old_details The old details of the issue.
-     * @param   array $changes The changes that were applied to this issue (the $HTTP_POST_VARS)
+     * @param   array $changes The changes that were applied to this issue (the $_POST)
      */
     function handlePriorityChange($prj_id, $issue_id, $usr_id, $old_details, $changes)
     {
Index: include/class.language.php
===================================================================
--- include/class.language.php	(revision 3164)
+++ include/class.language.php	(working copy)
@@ -41,7 +41,7 @@
 
     function setup()
     {
-        global $HTTP_GET_VARS, $HTTP_SESSION_VARS, $avail_langs;
+        global $avail_langs;
 
         // please add the following line to config.inc.php, changing to whatever language you prefer
         // define('APP_DEFAULT_LOCALE', 'en_US');
@@ -60,7 +60,7 @@
      */
     function setPreference()
     {
-        global $HTTP_GET_VARS, $HTTP_SESSION_VARS, $avail_langs;
+        global $avail_langs;
 
         $usr_id = Auth::getUserID();
         if (empty($usr_id)) {
Index: include/class.attachment.php
===================================================================
--- include/class.attachment.php	(revision 3164)
+++ include/class.attachment.php	(working copy)
@@ -440,21 +440,19 @@
      */
     function attach($usr_id, $status = 'public')
     {
-        global $HTTP_POST_VARS, $HTTP_POST_FILES;
-
         $files = array();
-        for ($i = 0; $i < count($HTTP_POST_FILES["attachment"]["name"]); $i++) {
-            $filename = @$HTTP_POST_FILES["attachment"]["name"][$i];
+        for ($i = 0; $i < count($_FILES["attachment"]["name"]); $i++) {
+            $filename = @$_FILES["attachment"]["name"][$i];
             if (empty($filename)) {
                 continue;
             }
-            $blob = Misc::getFileContents($HTTP_POST_FILES["attachment"]["tmp_name"][$i]);
+            $blob = Misc::getFileContents($_FILES["attachment"]["tmp_name"][$i]);
             if (empty($blob)) {
                 return -1;
             }
             $files[] = array(
                 "filename"  =>  $filename,
-                "type"      =>  $HTTP_POST_FILES['attachment']['type'][$i],
+                "type"      =>  $_FILES['attachment']['type'][$i],
                 "blob"      =>  $blob
             );
         }
@@ -466,26 +464,26 @@
         } else {
             $internal_only = false;
         }
-        $attachment_id = Attachment::add($HTTP_POST_VARS["issue_id"], $usr_id, @$HTTP_POST_VARS["file_description"], $internal_only);
+        $attachment_id = Attachment::add($_POST["issue_id"], $usr_id, @$_POST["file_description"], $internal_only);
         foreach ($files as $file) {
-            Attachment::addFile($attachment_id, $HTTP_POST_VARS["issue_id"], $file["filename"], $file["type"], $file["blob"]);
+            Attachment::addFile($attachment_id, $_POST["issue_id"], $file["filename"], $file["type"], $file["blob"]);
         }
 
-        Issue::markAsUpdated($HTTP_POST_VARS["issue_id"], "file uploaded");
+        Issue::markAsUpdated($_POST["issue_id"], "file uploaded");
         // need to save a history entry for this
-        History::add($HTTP_POST_VARS["issue_id"], $usr_id, History::getTypeID('attachment_added'), 'Attachment uploaded by ' . User::getFullName($usr_id));
+        History::add($_POST["issue_id"], $usr_id, History::getTypeID('attachment_added'), 'Attachment uploaded by ' . User::getFullName($usr_id));
 
         // if there is customer integration, mark last customer action
-        if ((Customer::hasCustomerIntegration(Issue::getProjectID($HTTP_POST_VARS["issue_id"]))) && (User::getRoleByUser($usr_id, Issue::getProjectID($HTTP_POST_VARS["issue_id"])) == User::getRoleID('Customer'))) {
-            Issue::recordLastCustomerAction($HTTP_POST_VARS["issue_id"]);
+        if ((Customer::hasCustomerIntegration(Issue::getProjectID($_POST["issue_id"]))) && (User::getRoleByUser($usr_id, Issue::getProjectID($_POST["issue_id"])) == User::getRoleID('Customer'))) {
+            Issue::recordLastCustomerAction($_POST["issue_id"]);
         }
 
-        Workflow::handleAttachment(Issue::getProjectID($HTTP_POST_VARS["issue_id"]), $HTTP_POST_VARS["issue_id"], $usr_id);
+        Workflow::handleAttachment(Issue::getProjectID($_POST["issue_id"]), $_POST["issue_id"], $usr_id);
 
         // send notifications for the issue being updated
         // XXX: eventually need to restrict the list of people who receive a notification about this in a better fashion
         if ($status == 'public') {
-            Notification::notify($HTTP_POST_VARS["issue_id"], 'files', $attachment_id);
+            Notification::notify($_POST["issue_id"], 'files', $attachment_id);
         }
         return 1;
     }
@@ -542,8 +540,6 @@
      */
     function add($issue_id, $usr_id, $description, $internal_only = FALSE, $unknown_user = FALSE, $associated_note_id = FALSE)
     {
-        global $HTTP_POST_VARS;
-
         if ($internal_only) {
             $attachment_status = 'internal';
         } else {
@@ -633,4 +629,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Attachment Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.group.php
===================================================================
--- include/class.group.php	(revision 3164)
+++ include/class.group.php	(working copy)
@@ -55,8 +55,6 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . ".`" . APP_TABLE_PREFIX . "group`
                  (
@@ -64,9 +62,9 @@
                     grp_description,
                     grp_manager_usr_id
                  ) VALUES (
-                    '" . Misc::escapeString($HTTP_POST_VARS["group_name"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["description"]) . "',
-                    '" . Misc::escapeInteger($HTTP_POST_VARS["manager"]) . "'
+                    '" . Misc::escapeString($_POST["group_name"]) . "',
+                    '" . Misc::escapeString($_POST["description"]) . "',
+                    '" . Misc::escapeInteger($_POST["manager"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -75,9 +73,9 @@
         } else {
             $grp_id = $GLOBALS["db_api"]->get_last_insert_id();
             
-            Group::setProjects($grp_id, $HTTP_POST_VARS["projects"]);
+            Group::setProjects($grp_id, $_POST["projects"]);
             
-            foreach ($HTTP_POST_VARS["users"] as $usr_id) {
+            foreach ($_POST["users"] as $usr_id) {
                 User::setGroupID($usr_id, $grp_id);
             }
             return 1;
@@ -93,34 +91,32 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        $HTTP_POST_VARS['id'] = Misc::escapeInteger($HTTP_POST_VARS['id']);
+        $_POST['id'] = Misc::escapeInteger($_POST['id']);
         
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . ".`" . APP_TABLE_PREFIX . "group`
                  SET
-                    grp_name = '" . Misc::escapeString($HTTP_POST_VARS["group_name"]) . "',
-                    grp_description = '" . Misc::escapeString($HTTP_POST_VARS["description"]) . "',
-                    grp_manager_usr_id = '" . Misc::escapeInteger($HTTP_POST_VARS["manager"]) . "'
+                    grp_name = '" . Misc::escapeString($_POST["group_name"]) . "',
+                    grp_description = '" . Misc::escapeString($_POST["description"]) . "',
+                    grp_manager_usr_id = '" . Misc::escapeInteger($_POST["manager"]) . "'
                  WHERE
-                    grp_id = " . $HTTP_POST_VARS["id"];
+                    grp_id = " . $_POST["id"];
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
-            Group::setProjects($HTTP_POST_VARS["id"], $HTTP_POST_VARS["projects"]);
+            Group::setProjects($_POST["id"], $_POST["projects"]);
             // get old users so we can remove any ones that have been removed
-            $existing_users = Group::getUsers($HTTP_POST_VARS["id"]);
-            $diff = array_diff($existing_users, Misc::escapeInteger($HTTP_POST_VARS["users"]));
+            $existing_users = Group::getUsers($_POST["id"]);
+            $diff = array_diff($existing_users, Misc::escapeInteger($_POST["users"]));
             if (count($diff) > 0) {
                 foreach ($diff as $usr_id) {
                     User::setGroupID($usr_id, false);
                 }
             }
-            foreach ($HTTP_POST_VARS["users"] as $usr_id) {
-                User::setGroupID($usr_id, $HTTP_POST_VARS["id"]);
+            foreach ($_POST["users"] as $usr_id) {
+                User::setGroupID($usr_id, $_POST["id"]);
             }
             return 1;
         }
@@ -134,9 +130,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        foreach (Misc::escapeInteger(@$HTTP_POST_VARS["items"]) as $grp_id) {
+        foreach (Misc::escapeInteger(@$_POST["items"]) as $grp_id) {
             $users = Group::getUsers($grp_id);
             
             $stmt = "DELETE FROM
@@ -457,4 +451,4 @@
     }
 }
 
-?>
\ No newline at end of file
+?>
Index: include/class.pager.php
===================================================================
--- include/class.pager.php	(revision 3164)
+++ include/class.pager.php	(working copy)
@@ -87,11 +87,9 @@
      */
     function _buildQueryString()
     {
-        global $HTTP_GET_VARS;
-
         $query_str = "";
         // gotta check manually here
-        $params = $HTTP_GET_VARS;
+        $params = $_GET;
         while (list($key, $value) = each($params)) {
             if ($key != "pagerRow") {
                 $query_str .= "&" . $key . "=" . urlencode($value);
@@ -116,8 +114,6 @@
      */
     function getLinks($row, $total_rows, $per_page, $show_links = "all", $show_blank = "off", $link_str = -1)
     {
-        global $HTTP_SERVER_VARS;
-
         // check for emptyness
         if ((empty($total_rows)) || (empty($per_page))) {
             return array();
@@ -129,7 +125,7 @@
             );
         }
         $extra_vars = Pager::_buildQueryString();
-        $file = $HTTP_SERVER_VARS["SCRIPT_NAME"];
+        $file = $_SERVER["SCRIPT_NAME"];
         $number_of_pages = ceil($total_rows / $per_page);
         $subscript = 0;
         for ($current = 0; $current < $number_of_pages; $current++) {
Index: include/class.draft.php
===================================================================
--- include/class.draft.php	(revision 3164)
+++ include/class.draft.php	(working copy)
@@ -421,17 +421,15 @@
      */
     function send($draft_id)
     {
-        global $HTTP_POST_VARS;
-
         $draft_id = Misc::escapeInteger($draft_id);
         $draft = Draft::getDetails($draft_id);
-        $HTTP_POST_VARS["issue_id"] = $draft["emd_iss_id"];
-        $HTTP_POST_VARS["subject"] = $draft["emd_subject"];
-        $HTTP_POST_VARS["from"] = User::getFromHeader(Auth::getUserID());
-        $HTTP_POST_VARS["to"] = $draft["to"];
-        $HTTP_POST_VARS["cc"] = @join(";", $draft["cc"]);
-        $HTTP_POST_VARS["message"] = $draft["emd_body"];
-        $HTTP_POST_VARS["ema_id"] = Email_Account::getEmailAccount();
+        $_POST["issue_id"] = $draft["emd_iss_id"];
+        $_POST["subject"] = $draft["emd_subject"];
+        $_POST["from"] = User::getFromHeader(Auth::getUserID());
+        $_POST["to"] = $draft["to"];
+        $_POST["cc"] = @join(";", $draft["cc"]);
+        $_POST["message"] = $draft["emd_body"];
+        $_POST["ema_id"] = Email_Account::getEmailAccount();
         $res = Support::sendEmail();
         if ($res == 1) {
            Draft::remove($draft_id);
Index: include/class.auth.php
===================================================================
--- include/class.auth.php	(revision 3164)
+++ include/class.auth.php	(working copy)
@@ -77,8 +77,7 @@
      */
     function getRequestedURL()
     {
-        global $HTTP_SERVER_VARS;
-        return urlencode($HTTP_SERVER_VARS["REQUEST_URI"]);
+        return urlencode($_SERVER["REQUEST_URI"]);
     }
 
 
@@ -95,16 +94,14 @@
      */
     function checkAuthentication($cookie_name, $failed_url = NULL, $is_popup = false)
     {
-        global $HTTP_COOKIE_VARS;
-
         if ($failed_url == NULL) {
             $failed_url = APP_RELATIVE_URL . "index.php?err=5";
         }
         $failed_url .= "&url=" . Auth::getRequestedURL();
-        if (!isset($HTTP_COOKIE_VARS[$cookie_name])) {
+        if (!isset($_COOKIE[$cookie_name])) {
             Auth::redirect($failed_url, $is_popup);
         }
-        $cookie = $HTTP_COOKIE_VARS[$cookie_name];
+        $cookie = $_COOKIE[$cookie_name];
         $cookie = unserialize(base64_decode($cookie));
         if (!Auth::isValidCookie($cookie)) {
             Auth::removeCookie($cookie_name);
@@ -204,9 +201,7 @@
      */
     function hasCookieSupport($cookie_name)
     {
-        global $HTTP_COOKIE_VARS;
-
-        if (@!in_array($cookie_name, array_keys($HTTP_COOKIE_VARS))) {
+        if (@!in_array($cookie_name, array_keys($_COOKIE))) {
             return false;
         } else {
             return true;
@@ -223,9 +218,7 @@
      */
     function hasValidCookie($cookie_name)
     {
-        global $HTTP_COOKIE_VARS;
-
-        $cookie = @$HTTP_COOKIE_VARS[$cookie_name];
+        $cookie = @$_COOKIE[$cookie_name];
         $cookie = unserialize(base64_decode($cookie));
         if (!Auth::isValidCookie($cookie)) {
             return false;
@@ -245,9 +238,7 @@
      */
     function getCookieInfo($cookie_name)
     {
-        global $HTTP_COOKIE_VARS;
-
-        $cookie = @$HTTP_COOKIE_VARS[$cookie_name];
+        $cookie = @$_COOKIE[$cookie_name];
         return unserialize(base64_decode($cookie));
     }
 
@@ -510,7 +501,6 @@
      */
     function createFakeCookie($usr_id, $project = false)
     {
-        global $HTTP_COOKIE_VARS;
         include_once(APP_INC_PATH . "private_key.php");
 
         $user_details = User::getDetails($usr_id);
@@ -521,14 +511,14 @@
             "login_time"    =>  $time,
             "hash"       => md5($GLOBALS["private_key"] . md5($time) . $user_details['usr_email']),
         );
-        $HTTP_COOKIE_VARS[APP_COOKIE] = base64_encode(serialize($cookie));
+        $_COOKIE[APP_COOKIE] = base64_encode(serialize($cookie));
         if ($project) {
             $cookie = array(
                 "prj_id"   => $project,
                 "remember" => false
             );
         }
-        $HTTP_COOKIE_VARS[APP_PROJECT_COOKIE] = base64_encode(serialize($cookie));
+        $_COOKIE[APP_PROJECT_COOKIE] = base64_encode(serialize($cookie));
     }
 
 
@@ -554,4 +544,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Auth Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.reminder.php
===================================================================
--- include/class.reminder.php	(revision 3164)
+++ include/class.reminder.php	(working copy)
@@ -448,8 +448,6 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "reminder_level
                  (
@@ -460,10 +458,10 @@
                     rem_skip_weekend
                  ) VALUES (
                     '" . Date_API::getCurrentDateGMT() . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS['rank']) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS['title']) . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS['project']) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS['skip_weekend']) . "
+                    " . Misc::escapeInteger($_POST['rank']) . ",
+                    '" . Misc::escapeString($_POST['title']) . "',
+                    " . Misc::escapeInteger($_POST['project']) . ",
+                    " . Misc::escapeInteger($_POST['skip_weekend']) . "
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -472,24 +470,24 @@
         } else {
             $new_rem_id = $GLOBALS["db_api"]->get_last_insert_id();
             // map the reminder requirements now
-            if ((@$HTTP_POST_VARS['reminder_type'] == 'support_level') && (count($HTTP_POST_VARS['support_levels']) > 0)) {
-                for ($i = 0; $i < count($HTTP_POST_VARS['support_levels']); $i++) {
-                    Reminder::addSupportLevelAssociation($new_rem_id, $HTTP_POST_VARS['support_levels'][$i]);
+            if ((@$_POST['reminder_type'] == 'support_level') && (count($_POST['support_levels']) > 0)) {
+                for ($i = 0; $i < count($_POST['support_levels']); $i++) {
+                    Reminder::addSupportLevelAssociation($new_rem_id, $_POST['support_levels'][$i]);
                 }
-            } elseif ((@$HTTP_POST_VARS['reminder_type'] == 'issue') && (count($HTTP_POST_VARS['issues']) > 0)) {
-                for ($i = 0; $i < count($HTTP_POST_VARS['issues']); $i++) {
-                    Reminder::addIssueAssociation($new_rem_id, $HTTP_POST_VARS['issues'][$i]);
+            } elseif ((@$_POST['reminder_type'] == 'issue') && (count($_POST['issues']) > 0)) {
+                for ($i = 0; $i < count($_POST['issues']); $i++) {
+                    Reminder::addIssueAssociation($new_rem_id, $_POST['issues'][$i]);
                 }
-            } elseif ((@$HTTP_POST_VARS['reminder_type'] == 'customer') && (count($HTTP_POST_VARS['customers']) > 0)) {
-                for ($i = 0; $i < count($HTTP_POST_VARS['customers']); $i++) {
-                    Reminder::addCustomerAssociation($new_rem_id, $HTTP_POST_VARS['customers'][$i]);
+            } elseif ((@$_POST['reminder_type'] == 'customer') && (count($_POST['customers']) > 0)) {
+                for ($i = 0; $i < count($_POST['customers']); $i++) {
+                    Reminder::addCustomerAssociation($new_rem_id, $_POST['customers'][$i]);
                 }
-            } elseif (@$HTTP_POST_VARS['reminder_type'] == 'all_issues') {
+            } elseif (@$_POST['reminder_type'] == 'all_issues') {
                  Reminder::associateAllIssues($new_rem_id);
             }
-            if ((@$HTTP_POST_VARS['check_priority'] == 'yes') && (count($HTTP_POST_VARS['priorities']) > 0)) {
-                for ($i = 0; $i < count($HTTP_POST_VARS['priorities']); $i++) {
-                    Reminder::addPriorityAssociation($new_rem_id, $HTTP_POST_VARS['priorities'][$i]);
+            if ((@$_POST['check_priority'] == 'yes') && (count($_POST['priorities']) > 0)) {
+                for ($i = 0; $i < count($_POST['priorities']); $i++) {
+                    Reminder::addPriorityAssociation($new_rem_id, $_POST['priorities'][$i]);
                 }
             }
             return 1;
@@ -505,43 +503,41 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "reminder_level
                  SET
                     rem_last_updated_date='" . Date_API::getCurrentDateGMT() . "',
-                    rem_rank=" . Misc::escapeInteger($HTTP_POST_VARS['rank']) . ",
-                    rem_title='" . Misc::escapeString($HTTP_POST_VARS['title']) . "',
-                    rem_prj_id=" . Misc::escapeInteger($HTTP_POST_VARS['project']) . ",
-                    rem_skip_weekend=" . Misc::escapeInteger($HTTP_POST_VARS['skip_weekend']) . "
+                    rem_rank=" . Misc::escapeInteger($_POST['rank']) . ",
+                    rem_title='" . Misc::escapeString($_POST['title']) . "',
+                    rem_prj_id=" . Misc::escapeInteger($_POST['project']) . ",
+                    rem_skip_weekend=" . Misc::escapeInteger($_POST['skip_weekend']) . "
                  WHERE
-                    rem_id=" . Misc::escapeInteger($HTTP_POST_VARS['id']);
+                    rem_id=" . Misc::escapeInteger($_POST['id']);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
-            Reminder::removeAllAssociations($HTTP_POST_VARS['id']);
+            Reminder::removeAllAssociations($_POST['id']);
             // map the reminder requirements now
-            if ((@$HTTP_POST_VARS['reminder_type'] == 'support_level') && (count($HTTP_POST_VARS['support_levels']) > 0)) {
-                for ($i = 0; $i < count($HTTP_POST_VARS['support_levels']); $i++) {
-                    Reminder::addSupportLevelAssociation($HTTP_POST_VARS['id'], $HTTP_POST_VARS['support_levels'][$i]);
+            if ((@$_POST['reminder_type'] == 'support_level') && (count($_POST['support_levels']) > 0)) {
+                for ($i = 0; $i < count($_POST['support_levels']); $i++) {
+                    Reminder::addSupportLevelAssociation($_POST['id'], $_POST['support_levels'][$i]);
                 }
-            } elseif ((@$HTTP_POST_VARS['reminder_type'] == 'issue') && (count($HTTP_POST_VARS['issues']) > 0)) {
-                for ($i = 0; $i < count($HTTP_POST_VARS['issues']); $i++) {
-                    Reminder::addIssueAssociation($HTTP_POST_VARS['id'], $HTTP_POST_VARS['issues'][$i]);
+            } elseif ((@$_POST['reminder_type'] == 'issue') && (count($_POST['issues']) > 0)) {
+                for ($i = 0; $i < count($_POST['issues']); $i++) {
+                    Reminder::addIssueAssociation($_POST['id'], $_POST['issues'][$i]);
                 }
-            } elseif ((@$HTTP_POST_VARS['reminder_type'] == 'customer') && (count($HTTP_POST_VARS['customers']) > 0)) {
-                for ($i = 0; $i < count($HTTP_POST_VARS['customers']); $i++) {
-                    Reminder::addCustomerAssociation($HTTP_POST_VARS['id'], $HTTP_POST_VARS['customers'][$i]);
+            } elseif ((@$_POST['reminder_type'] == 'customer') && (count($_POST['customers']) > 0)) {
+                for ($i = 0; $i < count($_POST['customers']); $i++) {
+                    Reminder::addCustomerAssociation($_POST['id'], $_POST['customers'][$i]);
                 }
-            } elseif (@$HTTP_POST_VARS['reminder_type'] == 'all_issues') {
-                 Reminder::associateAllIssues($HTTP_POST_VARS['id']);
+            } elseif (@$_POST['reminder_type'] == 'all_issues') {
+                 Reminder::associateAllIssues($_POST['id']);
             }
-            if ((@$HTTP_POST_VARS['check_priority'] == 'yes') && (count($HTTP_POST_VARS['priorities']) > 0)) {
-                for ($i = 0; $i < count($HTTP_POST_VARS['priorities']); $i++) {
-                    Reminder::addPriorityAssociation($HTTP_POST_VARS['id'], $HTTP_POST_VARS['priorities'][$i]);
+            if ((@$_POST['check_priority'] == 'yes') && (count($_POST['priorities']) > 0)) {
+                for ($i = 0; $i < count($_POST['priorities']); $i++) {
+                    Reminder::addPriorityAssociation($_POST['id'], $_POST['priorities'][$i]);
                 }
             }
             return 1;
@@ -558,9 +554,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "reminder_level
                  WHERE
@@ -570,7 +564,7 @@
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return false;
         } else {
-            Reminder::removeAllAssociations($HTTP_POST_VARS["items"]);
+            Reminder::removeAllAssociations($_POST["items"]);
             $stmt = "SELECT
                         rma_id
                      FROM
@@ -903,4 +897,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Reminder Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.faq.php
===================================================================
--- include/class.faq.php	(revision 3164)
+++ include/class.faq.php	(working copy)
@@ -89,9 +89,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "faq
                  WHERE
@@ -101,7 +99,7 @@
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return false;
         } else {
-            FAQ::removeSupportLevelAssociations($HTTP_POST_VARS['items']);
+            FAQ::removeSupportLevelAssociations($_POST['items']);
             return true;
         }
     }
@@ -144,36 +142,34 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        $HTTP_POST_VARS['id'] = Misc::escapeInteger($HTTP_POST_VARS['id']);
+        $_POST['id'] = Misc::escapeInteger($_POST['id']);
         
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
-        if (Validation::isWhitespace($HTTP_POST_VARS["message"])) {
+        if (Validation::isWhitespace($_POST["message"])) {
             return -3;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "faq
                  SET
-                    faq_prj_id=" . $HTTP_POST_VARS['project'] . ",
+                    faq_prj_id=" . $_POST['project'] . ",
                     faq_updated_date='" . Date_API::getCurrentDateGMT() . "',
-                    faq_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    faq_message='" . Misc::escapeString($HTTP_POST_VARS["message"]) . "',
-                    faq_rank=" . $HTTP_POST_VARS['rank'] . "
+                    faq_title='" . Misc::escapeString($_POST["title"]) . "',
+                    faq_message='" . Misc::escapeString($_POST["message"]) . "',
+                    faq_rank=" . $_POST['rank'] . "
                  WHERE
-                    faq_id=" . $HTTP_POST_VARS["id"];
+                    faq_id=" . $_POST["id"];
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
             // remove all of the associations with support levels, then add them all again
-            FAQ::removeSupportLevelAssociations($HTTP_POST_VARS['id']);
-            if (Customer::doesBackendUseSupportLevels($HTTP_POST_VARS['project'])) {
-                foreach ($HTTP_POST_VARS['support_levels'] as $support_level_id) {
-                    FAQ::addSupportLevelAssociation($HTTP_POST_VARS['id'], $support_level_id);
+            FAQ::removeSupportLevelAssociations($_POST['id']);
+            if (Customer::doesBackendUseSupportLevels($_POST['project'])) {
+                foreach ($_POST['support_levels'] as $support_level_id) {
+                    FAQ::addSupportLevelAssociation($_POST['id'], $support_level_id);
                 }
             }
             return 1;
@@ -189,12 +185,10 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
-        if (Validation::isWhitespace($HTTP_POST_VARS["message"])) {
+        if (Validation::isWhitespace($_POST["message"])) {
             return -3;
         }
         $stmt = "INSERT INTO
@@ -207,12 +201,12 @@
                     faq_message,
                     faq_rank
                  ) VALUES (
-                    " . $HTTP_POST_VARS['project'] . ",
+                    " . $_POST['project'] . ",
                     " . Auth::getUserID() . ",
                     '" . Date_API::getCurrentDateGMT() . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["message"]) . "',
-                    " . $HTTP_POST_VARS['rank'] . "
+                    '" . Misc::escapeString($_POST["title"]) . "',
+                    '" . Misc::escapeString($_POST["message"]) . "',
+                    " . $_POST['rank'] . "
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -220,9 +214,9 @@
             return -1;
         } else {
             $new_faq_id = $GLOBALS["db_api"]->get_last_insert_id();
-            if (Customer::doesBackendUseSupportLevels(Misc::escapeInteger($HTTP_POST_VARS['project']))) {
+            if (Customer::doesBackendUseSupportLevels(Misc::escapeInteger($_POST['project']))) {
                 // now populate the faq-support level mapping table
-                foreach ($HTTP_POST_VARS['support_levels'] as $support_level_id) {
+                foreach ($_POST['support_levels'] as $support_level_id) {
                     FAQ::addSupportLevelAssociation($new_faq_id, $support_level_id);
                 }
             }
@@ -432,4 +426,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included FAQ Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.category.php
===================================================================
--- include/class.category.php	(revision 3164)
+++ include/class.category.php	(working copy)
@@ -100,9 +100,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_category
                  WHERE
@@ -127,18 +125,16 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_category
                  SET
-                    prc_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "'
+                    prc_title='" . Misc::escapeString($_POST["title"]) . "'
                  WHERE
-                    prc_prj_id=" . Misc::escapeInteger($HTTP_POST_VARS["prj_id"]) . " AND
-                    prc_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    prc_prj_id=" . Misc::escapeInteger($_POST["prj_id"]) . " AND
+                    prc_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -157,9 +153,7 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "INSERT INTO
@@ -168,8 +162,8 @@
                     prc_prj_id,
                     prc_title
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS["prj_id"]) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "'
+                    " . Misc::escapeInteger($_POST["prj_id"]) . ",
+                    '" . Misc::escapeString($_POST["title"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -275,4 +269,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Category Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.prefs.php
===================================================================
--- include/class.prefs.php	(revision 3164)
+++ include/class.prefs.php	(working copy)
@@ -120,23 +120,21 @@
      */
     function set($usr_id)
     {
-        global $HTTP_POST_VARS, $HTTP_POST_FILES;
-
         // if the user is trying to upload a new signature, override any changes to the textarea
-        if (!empty($HTTP_POST_FILES["file_signature"]["name"])) {
-            $HTTP_POST_VARS['signature'] = Misc::getFileContents($HTTP_POST_FILES["file_signature"]["tmp_name"]);
+        if (!empty($_FILES["file_signature"]["name"])) {
+            $_POST['signature'] = Misc::getFileContents($_FILES["file_signature"]["tmp_name"]);
         }
 
         $data = serialize(array(
-            'close_popup_windows'     => $HTTP_POST_VARS['close_popup_windows'],
-            'receive_assigned_emails' => $HTTP_POST_VARS['receive_assigned_emails'],
-            'receive_new_emails'      => @$HTTP_POST_VARS['receive_new_emails'],
-            'timezone'                => $HTTP_POST_VARS['timezone'],
-            'list_refresh_rate'       => $HTTP_POST_VARS['list_refresh_rate'],
-            'emails_refresh_rate'     => $HTTP_POST_VARS['emails_refresh_rate'],
-            'email_signature'         => @$HTTP_POST_VARS['signature'],
-            'auto_append_sig'         => @$HTTP_POST_VARS['auto_append_sig'],
-            'auto_append_note_sig'    => @$HTTP_POST_VARS['auto_append_note_sig']
+            'close_popup_windows'     => $_POST['close_popup_windows'],
+            'receive_assigned_emails' => $_POST['receive_assigned_emails'],
+            'receive_new_emails'      => @$_POST['receive_new_emails'],
+            'timezone'                => $_POST['timezone'],
+            'list_refresh_rate'       => $_POST['list_refresh_rate'],
+            'emails_refresh_rate'     => $_POST['emails_refresh_rate'],
+            'email_signature'         => @$_POST['signature'],
+            'auto_append_sig'         => @$_POST['auto_append_sig'],
+            'auto_append_note_sig'    => @$_POST['auto_append_note_sig']
         ));
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "user
@@ -158,4 +156,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Prefs Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/workflow/class.example.php
===================================================================
--- include/workflow/class.example.php	(revision 3164)
+++ include/workflow/class.example.php	(working copy)
@@ -43,7 +43,7 @@
      * @param integer $issue_id The ID of the issue.
      * @param integer $usr_id The ID of the user.
      * @param array $old_details The old details of the issues.
-     * @param array $changes The changes that were applied to this issue (the $HTTP_POST_VARS)
+     * @param array $changes The changes that were applied to this issue (the $_POST)
      */
     function handleIssueUpdated($prj_id, $issue_id, $usr_id, $old_details, $changes)
     {
@@ -84,7 +84,7 @@
      * @param   integer $issue_id The ID of the issue.
      * @param   integer $usr_id The id of the user who locked the issue.
      * @param   array $old_details The old details of the issue.
-     * @param   array $changes The changes that were applied to this issue (the $HTTP_POST_VARS)
+     * @param   array $changes The changes that were applied to this issue (the $_POST)
      */
     function handlePriorityChange($prj_id, $issue_id, $usr_id, $old_details, $changes)
     {
Index: include/workflow/class.abstract_workflow_backend.php
===================================================================
--- include/workflow/class.abstract_workflow_backend.php	(revision 3164)
+++ include/workflow/class.abstract_workflow_backend.php	(working copy)
@@ -41,7 +41,7 @@
      * @param integer $issue_id The ID of the issue.
      * @param integer $usr_id The ID of the user.
      * @param array $old_details The old details of the issues.
-     * @param array $changes The changes that were applied to this issue (the $HTTP_POST_VARS)
+     * @param array $changes The changes that were applied to this issue (the $_POST)
      */
     function handleIssueUpdated($prj_id, $issue_id, $usr_id, $old_details, $changes)
     {
@@ -79,7 +79,7 @@
      * @param   integer $issue_id The ID of the issue.
      * @param   integer $usr_id The id of the user who locked the issue.
      * @param   array $old_details The old details of the issue.
-     * @param   array $changes The changes that were applied to this issue (the $HTTP_POST_VARS)
+     * @param   array $changes The changes that were applied to this issue (the $_POST)
      */
     function handlePriorityChange($prj_id, $issue_id, $usr_id, $old_details, $changes)
     {
Index: include/class.time_tracking.php
===================================================================
--- include/class.time_tracking.php	(revision 3164)
+++ include/class.time_tracking.php	(working copy)
@@ -105,9 +105,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "time_tracking_category
                  WHERE
@@ -130,17 +128,15 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "time_tracking_category
                  SET
-                    ttc_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "'
+                    ttc_title='" . Misc::escapeString($_POST["title"]) . "'
                  WHERE
-                    ttc_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    ttc_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -159,9 +155,7 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "INSERT INTO
@@ -170,7 +164,7 @@
                     ttc_title,
                     ttc_created_date
                  ) VALUES (
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
+                    '" . Misc::escapeString($_POST["title"]) . "',
                     '" . Date_API::getCurrentDateGMT() . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -422,14 +416,12 @@
      */
     function insertEntry()
     {
-        global $HTTP_POST_VARS;
-
-        if (!empty($HTTP_POST_VARS["date"])) {
+        if (!empty($_POST["date"])) {
             // format the date from the form
             $created_date = sprintf('%04d-%02d-%02d %02d:%02d:%02d',
-                $HTTP_POST_VARS["date"]["Year"], $HTTP_POST_VARS["date"]["Month"],
-                $HTTP_POST_VARS["date"]["Day"], $HTTP_POST_VARS["date"]["Hour"],
-                $HTTP_POST_VARS["date"]["Minute"], 0);
+                $_POST["date"]["Year"], $_POST["date"]["Month"],
+                $_POST["date"]["Day"], $_POST["date"]["Hour"],
+                $_POST["date"]["Minute"], 0);
             // convert the date to GMT timezone
             $created_date = Date_API::getDateGMT($created_date);
         } else {
@@ -446,21 +438,21 @@
                     ttr_time_spent,
                     ttr_summary
                  ) VALUES (
-                    " . $HTTP_POST_VARS["category"] . ",
-                    " . $HTTP_POST_VARS["issue_id"] . ",
+                    " . $_POST["category"] . ",
+                    " . $_POST["issue_id"] . ",
                     $usr_id,
                     '$created_date',
-                    " . Misc::escapeInteger($HTTP_POST_VARS["time_spent"]) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS["summary"]) . "'
+                    " . Misc::escapeInteger($_POST["time_spent"]) . ",
+                    '" . Misc::escapeString($_POST["summary"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
-            Issue::markAsUpdated($HTTP_POST_VARS["issue_id"], 'time added');
+            Issue::markAsUpdated($_POST["issue_id"], 'time added');
             // need to save a history entry for this
-            History::add($HTTP_POST_VARS["issue_id"], $usr_id, History::getTypeID('time_added'), ev_gettext('Time tracking entry submitted by %1$s', User::getFullName($usr_id)));
+            History::add($_POST["issue_id"], $usr_id, History::getTypeID('time_added'), ev_gettext('Time tracking entry submitted by %1$s', User::getFullName($usr_id)));
             return 1;
         }
     }
Index: include/class.round_robin.php
===================================================================
--- include/class.round_robin.php	(revision 3164)
+++ include/class.round_robin.php	(working copy)
@@ -307,10 +307,8 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        $blackout_start = $HTTP_POST_VARS['blackout_start']['Hour'] . ':' . $HTTP_POST_VARS['blackout_start']['Minute'] . ':00';
-        $blackout_end = $HTTP_POST_VARS['blackout_end']['Hour'] . ':' . $HTTP_POST_VARS['blackout_end']['Minute'] . ':00';
+        $blackout_start = $_POST['blackout_start']['Hour'] . ':' . $_POST['blackout_start']['Minute'] . ':00';
+        $blackout_end = $_POST['blackout_end']['Hour'] . ':' . $_POST['blackout_end']['Minute'] . ':00';
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_round_robin
                  (
@@ -318,7 +316,7 @@
                     prr_blackout_start,
                     prr_blackout_end
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS["project"]) . ",
+                    " . Misc::escapeInteger($_POST["project"]) . ",
                     '" . Misc::escapeString($blackout_start) . "',
                     '" . Misc::escapeString($blackout_end) . "'
                  )";
@@ -329,7 +327,7 @@
         } else {
             $new_id = $GLOBALS["db_api"]->get_last_insert_id();
             // add all of the user associated with this round robin entry
-            foreach ($HTTP_POST_VARS['users'] as $usr_id) {
+            foreach ($_POST['users'] as $usr_id) {
                 Round_Robin::addUserAssociation($new_id, $usr_id);
             }
             return 1;
@@ -467,27 +465,25 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        $blackout_start = $HTTP_POST_VARS['blackout_start']['Hour'] . ':' . $HTTP_POST_VARS['blackout_start']['Minute'] . ':00';
-        $blackout_end = $HTTP_POST_VARS['blackout_end']['Hour'] . ':' . $HTTP_POST_VARS['blackout_end']['Minute'] . ':00';
+        $blackout_start = $_POST['blackout_start']['Hour'] . ':' . $_POST['blackout_start']['Minute'] . ':00';
+        $blackout_end = $_POST['blackout_end']['Hour'] . ':' . $_POST['blackout_end']['Minute'] . ':00';
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_round_robin
                  SET
-                    prr_prj_id=" . Misc::escapeInteger($HTTP_POST_VARS["project"]) . ",
+                    prr_prj_id=" . Misc::escapeInteger($_POST["project"]) . ",
                     prr_blackout_start='" . Misc::escapeString($blackout_start) . "',
                     prr_blackout_end='" . Misc::escapeString($blackout_end) . "'
                  WHERE
-                    prr_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    prr_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
             // remove all of the associations with users, then add them all again
-            Round_Robin::removeUserAssociations($HTTP_POST_VARS['id']);
-            foreach ($HTTP_POST_VARS['users'] as $usr_id) {
-                Round_Robin::addUserAssociation($HTTP_POST_VARS['id'], $usr_id);
+            Round_Robin::removeUserAssociations($_POST['id']);
+            foreach ($_POST['users'] as $usr_id) {
+                Round_Robin::addUserAssociation($_POST['id'], $usr_id);
             }
             return 1;
         }
@@ -530,9 +526,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_round_robin
                  WHERE
@@ -542,7 +536,7 @@
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return false;
         } else {
-            Round_Robin::removeUserAssociations($HTTP_POST_VARS['items']);
+            Round_Robin::removeUserAssociations($_POST['items']);
             return true;
         }
     }
@@ -552,4 +546,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Round_Robin Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.scm.php
===================================================================
--- include/class.scm.php	(revision 3164)
+++ include/class.scm.php	(working copy)
@@ -79,9 +79,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = implode(", ", Misc::escapeInteger($HTTP_POST_VARS["item"]));
+        $items = implode(", ", Misc::escapeInteger($_POST["item"]));
         $stmt = "SELECT
                     isc_iss_id
                  FROM
@@ -174,8 +172,6 @@
      */
     function logCheckin($issue_id, $i)
     {
-        global $HTTP_GET_VARS;
-
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_checkin
                  (
@@ -189,13 +185,13 @@
                     isc_commit_msg
                  ) VALUES (
                     $issue_id,
-                    '" . Misc::escapeString($HTTP_GET_VARS["module"]) . "',
-                    '" . Misc::escapeString($HTTP_GET_VARS["files"][$i]) . "',
-                    '" . Misc::escapeString($HTTP_GET_VARS["old_versions"][$i]) . "',
-                    '" . Misc::escapeString($HTTP_GET_VARS["new_versions"][$i]) . "',
+                    '" . Misc::escapeString($_GET["module"]) . "',
+                    '" . Misc::escapeString($_GET["files"][$i]) . "',
+                    '" . Misc::escapeString($_GET["old_versions"][$i]) . "',
+                    '" . Misc::escapeString($_GET["new_versions"][$i]) . "',
                     '" . Date_API::getCurrentDateGMT() . "',
-                    '" . Misc::escapeString($HTTP_GET_VARS["username"]) . "',
-                    '" . Misc::escapeString($HTTP_GET_VARS["commit_msg"]) . "'
+                    '" . Misc::escapeString($_GET["username"]) . "',
+                    '" . Misc::escapeString($_GET["commit_msg"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -206,7 +202,7 @@
             Issue::markAsUpdated($issue_id, 'scm checkin');
             // need to save a history entry for this
             History::add($issue_id, APP_SYSTEM_USER_ID, History::getTypeID('scm_checkin_associated'),
-                            ev_gettext("SCM Checkins associated by SCM user '") . $HTTP_GET_VARS["username"] . '\'.');
+                            ev_gettext("SCM Checkins associated by SCM user '") . $_GET["username"] . '\'.');
             return 1;
         }
     }
Index: include/class.filter.php
===================================================================
--- include/class.filter.php	(revision 3164)
+++ include/class.filter.php	(working copy)
@@ -114,9 +114,7 @@
      */
     function save()
     {
-        global $HTTP_POST_VARS;
-
-        $cst_id = Filter::getFilterID($HTTP_POST_VARS["title"]);
+        $cst_id = Filter::getFilterID($_POST["title"]);
         // loop through all available date fields and prepare the values for the sql query
         $date_fields = array(
             'created_date',
@@ -129,11 +127,11 @@
             $date_var = $field_name;
             $filter_type_var = $field_name . '_filter_type';
             $date_end_var = $field_name . '_end';
-            if (@$HTTP_POST_VARS['filter'][$field_name] == 'yes') {
-                $$date_var = "'" . Misc::escapeString($HTTP_POST_VARS[$field_name]["Year"] . "-" . $HTTP_POST_VARS[$field_name]["Month"] . "-" . $HTTP_POST_VARS[$field_name]["Day"]) . "'";
-                $$filter_type_var = "'" . $HTTP_POST_VARS[$field_name]['filter_type'] . "'";
+            if (@$_POST['filter'][$field_name] == 'yes') {
+                $$date_var = "'" . Misc::escapeString($_POST[$field_name]["Year"] . "-" . $_POST[$field_name]["Month"] . "-" . $_POST[$field_name]["Day"]) . "'";
+                $$filter_type_var = "'" . $_POST[$field_name]['filter_type'] . "'";
                 if ($$filter_type_var == "'between'") {
-                    $$date_end_var = "'" . Misc::escapeString($HTTP_POST_VARS[$date_end_var]["Year"] . "-" . $HTTP_POST_VARS[$date_end_var]["Month"] . "-" . $HTTP_POST_VARS[$date_end_var]["Day"]) . "'";
+                    $$date_end_var = "'" . Misc::escapeString($_POST[$date_end_var]["Year"] . "-" . $_POST[$date_end_var]["Month"] . "-" . $_POST[$date_end_var]["Day"]) . "'";
                 } elseif (($$filter_type_var == "'null'") || ($$filter_type_var == "'in_past'")) {
                     $$date_var = "NULL";
                     $$date_end_var = "NULL";
@@ -148,39 +146,39 @@
         }
 
         // save custom fields to search
-        if ((is_array($HTTP_POST_VARS['custom_field'])) && (count($HTTP_POST_VARS['custom_field']) > 0)) {
-            foreach ($HTTP_POST_VARS['custom_field'] as $fld_id => $search_value) {
+        if ((is_array($_POST['custom_field'])) && (count($_POST['custom_field']) > 0)) {
+            foreach ($_POST['custom_field'] as $fld_id => $search_value) {
                 if (empty($search_value)) {
-                    unset($HTTP_POST_VARS[$fld_id]);
+                    unset($_POST[$fld_id]);
                 }
             }
-            $custom_field_string = serialize($HTTP_POST_VARS['custom_field']);
+            $custom_field_string = serialize($_POST['custom_field']);
         } else {
             $custom_field_string = '';
         }
 
-        if (empty($HTTP_POST_VARS['is_global'])) {
+        if (empty($_POST['is_global'])) {
             $is_global_filter = 0;
         } else {
-            $is_global_filter = $HTTP_POST_VARS['is_global'];
+            $is_global_filter = $_POST['is_global'];
         }
         if ($cst_id != 0) {
             $stmt = "UPDATE
                         " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "custom_filter
                      SET
-                        cst_iss_pri_id='" . Misc::escapeInteger($HTTP_POST_VARS["priority"]) . "',
-                        cst_keywords='" . Misc::escapeString($HTTP_POST_VARS["keywords"]) . "',
-                        cst_users='" . Misc::escapeString($HTTP_POST_VARS["users"]) . "',
-                        cst_reporter=" . Misc::escapeInteger($HTTP_POST_VARS["reporter"]) . ",
-                        cst_iss_sta_id='" . Misc::escapeInteger($HTTP_POST_VARS["status"]) . "',
-                        cst_iss_pre_id='" . Misc::escapeInteger(@$HTTP_POST_VARS["release"]) . "',
-                        cst_iss_prc_id='" . Misc::escapeInteger(@$HTTP_POST_VARS["category"]) . "',
-                        cst_rows='" . Misc::escapeString($HTTP_POST_VARS["rows"]) . "',
-                        cst_sort_by='" . Misc::escapeString($HTTP_POST_VARS["sort_by"]) . "',
-                        cst_sort_order='" . Misc::escapeString($HTTP_POST_VARS["sort_order"]) . "',
-                        cst_hide_closed='" . Misc::escapeInteger(@$HTTP_POST_VARS["hide_closed"]) . "',
-                        cst_show_authorized='" . Misc::escapeString(@$HTTP_POST_VARS["show_authorized_issues"]) . "',
-                        cst_show_notification_list='" . Misc::escapeString(@$HTTP_POST_VARS["show_notification_list_issues"]) . "',
+                        cst_iss_pri_id='" . Misc::escapeInteger($_POST["priority"]) . "',
+                        cst_keywords='" . Misc::escapeString($_POST["keywords"]) . "',
+                        cst_users='" . Misc::escapeString($_POST["users"]) . "',
+                        cst_reporter=" . Misc::escapeInteger($_POST["reporter"]) . ",
+                        cst_iss_sta_id='" . Misc::escapeInteger($_POST["status"]) . "',
+                        cst_iss_pre_id='" . Misc::escapeInteger(@$_POST["release"]) . "',
+                        cst_iss_prc_id='" . Misc::escapeInteger(@$_POST["category"]) . "',
+                        cst_rows='" . Misc::escapeString($_POST["rows"]) . "',
+                        cst_sort_by='" . Misc::escapeString($_POST["sort_by"]) . "',
+                        cst_sort_order='" . Misc::escapeString($_POST["sort_order"]) . "',
+                        cst_hide_closed='" . Misc::escapeInteger(@$_POST["hide_closed"]) . "',
+                        cst_show_authorized='" . Misc::escapeString(@$_POST["show_authorized_issues"]) . "',
+                        cst_show_notification_list='" . Misc::escapeString(@$_POST["show_notification_list_issues"]) . "',
                         cst_created_date=$created_date,
                         cst_created_date_filter_type=$created_date_filter_type,
                         cst_created_date_time_period='" . @Misc::escapeInteger(@$_REQUEST['created_date']['time_period']) . "',
@@ -202,7 +200,7 @@
                         cst_closed_date_time_period='" . @Misc::escapeInteger(@$_REQUEST['closed_date']['time_period']) . "',
                         cst_closed_date_end=" . Misc::escapeString($closed_date_end) . ",
                         cst_is_global=" . Misc::escapeInteger($is_global_filter) . ",
-                        cst_search_type='" . Misc::escapeString($HTTP_POST_VARS['search_type']) . "',
+                        cst_search_type='" . Misc::escapeString($_POST['search_type']) . "',
                         cst_custom_field='" . Misc::escapeString($custom_field_string) . "'
                      WHERE
                         cst_id=$cst_id";
@@ -252,20 +250,20 @@
                      ) VALUES (
                         " . Auth::getUserID() . ",
                         " . Auth::getCurrentProject() . ",
-                        '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                        '" . Misc::escapeInteger($HTTP_POST_VARS["priority"]) . "',
-                        '" . Misc::escapeString($HTTP_POST_VARS["keywords"]) . "',
-                        '" . Misc::escapeString($HTTP_POST_VARS["users"]) . "',
-                        '" . Misc::escapeInteger($HTTP_POST_VARS["reporter"]) . "',
-                        '" . Misc::escapeInteger($HTTP_POST_VARS["status"]) . "',
-                        '" . Misc::escapeInteger(@$HTTP_POST_VARS["release"]) . "',
-                        '" . Misc::escapeInteger(@$HTTP_POST_VARS["category"]) . "',
-                        '" . Misc::escapeString($HTTP_POST_VARS["rows"]) . "',
-                        '" . Misc::escapeString($HTTP_POST_VARS["sort_by"]) . "',
-                        '" . Misc::escapeString($HTTP_POST_VARS["sort_order"]) . "',
-                        '" . Misc::escapeInteger(@$HTTP_POST_VARS["hide_closed"]) . "',
-                        '" . Misc::escapeString(@$HTTP_POST_VARS["show_authorized_issues"]) . "',
-                        '" . Misc::escapeString(@$HTTP_POST_VARS["show_notification_list_issues"]) . "',
+                        '" . Misc::escapeString($_POST["title"]) . "',
+                        '" . Misc::escapeInteger($_POST["priority"]) . "',
+                        '" . Misc::escapeString($_POST["keywords"]) . "',
+                        '" . Misc::escapeString($_POST["users"]) . "',
+                        '" . Misc::escapeInteger($_POST["reporter"]) . "',
+                        '" . Misc::escapeInteger($_POST["status"]) . "',
+                        '" . Misc::escapeInteger(@$_POST["release"]) . "',
+                        '" . Misc::escapeInteger(@$_POST["category"]) . "',
+                        '" . Misc::escapeString($_POST["rows"]) . "',
+                        '" . Misc::escapeString($_POST["sort_by"]) . "',
+                        '" . Misc::escapeString($_POST["sort_order"]) . "',
+                        '" . Misc::escapeInteger(@$_POST["hide_closed"]) . "',
+                        '" . Misc::escapeString(@$_POST["show_authorized_issues"]) . "',
+                        '" . Misc::escapeString(@$_POST["show_notification_list_issues"]) . "',
                         $created_date,
                         $created_date_filter_type,
                         '" . @Misc::escapeInteger(@$_REQUEST['created_date']['time_period']) . "',
@@ -287,7 +285,7 @@
                         '" . @Misc::escapeInteger(@$_REQUEST['closed_date']['time_period']) . "',
                         $closed_date_end,
                         " . Misc::escapeInteger($is_global_filter) . ",
-                        '" . Misc::escapeString($HTTP_POST_VARS['search_type']) . "',
+                        '" . Misc::escapeString($_POST['search_type']) . "',
                         '" . Misc::escapeString($custom_field_string) . "'
                      )";
         }
@@ -518,10 +516,8 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = implode(", ", Misc::escapeInteger($HTTP_POST_VARS["item"]));
-        foreach ($HTTP_POST_VARS["item"] as $cst_id) {
+        $items = implode(", ", Misc::escapeInteger($_POST["item"]));
+        foreach ($_POST["item"] as $cst_id) {
             $stmt = "DELETE FROM
                         " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "custom_filter
                      WHERE";
Index: include/class.error_handler.php
===================================================================
--- include/class.error_handler.php	(revision 3164)
+++ include/class.error_handler.php	(working copy)
@@ -78,8 +78,6 @@
      */
     function _notify($error_msg = "unknown", $script = "unknown", $line = "unknown")
     {
-        global $HTTP_SERVER_VARS;
-
         $setup = Setup::load();
         $notify_list = trim($setup['email_error']['addresses']);
         if (empty($notify_list)) {
@@ -99,8 +97,8 @@
         } else {
             $msg .= "'$error_msg'\n\n";
         }
-        @$msg .= "That happened on page '" . $HTTP_SERVER_VARS["PHP_SELF"] . "' from IP Address '" . getenv("REMOTE_ADDR") . "' coming from the page (referrer) '" . getenv("HTTP_REFERER") . "'.\n\n";
-        @$msg .= "The user agent given was '" . $HTTP_SERVER_VARS['HTTP_USER_AGENT'] . "'.\n\n";
+        @$msg .= "That happened on page '" . $_SERVER["PHP_SELF"] . "' from IP Address '" . getenv("REMOTE_ADDR") . "' coming from the page (referrer) '" . getenv("HTTP_REFERER") . "'.\n\n";
+        @$msg .= "The user agent given was '" . $_SERVER['HTTP_USER_AGENT'] . "'.\n\n";
         $msg .= "-- \nSincerely yours,\nAutomated Error_Handler Class";
         // only try to include the backtrace if we are on PHP 4.3.0 or later
         if (version_compare(phpversion(), "4.3.0", ">=")) {
@@ -140,8 +138,6 @@
      */
     function logToFile($error_msg = "unknown", $script = "unknown", $line = "unknown")
     {
-        global $HTTP_SERVER_VARS;
-
         $msg = "[" . date("D M d H:i:s Y") . "] ";
         $msg .= "An error was found on line '" . $line . "' of script " . "'$script'.\n\n";
         $msg .= "The error message passed to us was:\n\n";
@@ -176,4 +172,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Error_Handler Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.routing.php
===================================================================
--- include/class.routing.php	(revision 3164)
+++ include/class.routing.php	(working copy)
@@ -55,7 +55,7 @@
      */
     function route_emails($full_message)
     {
-        GLOBAL $HTTP_POST_VARS;
+        GLOBAL $_POST;
 
         // need some validation here
         if (empty($full_message)) {
@@ -244,7 +244,7 @@
      */
     function route_notes($full_message)
     {
-        GLOBAL $HTTP_POST_VARS;
+        GLOBAL $_POST;
 
         // save the full message for logging purposes
         Note::saveRoutedNote($full_message);
@@ -338,7 +338,7 @@
         }
 
         // insert the new note and send notification about it
-        $HTTP_POST_VARS = array(
+        $_POST = array(
             'title'                => @$structure->headers['subject'],
             'note'                 => $body,
             'note_cc'              => $cc_users,
@@ -350,7 +350,7 @@
         // add the full email to the note if there are any attachments
         // this is needed because the front end code will display attachment links
         if (Mime_Helper::hasAttachments($structure)) {
-            $HTTP_POST_VARS['blocked_msg'] = $full_message;
+            $_POST['blocked_msg'] = $full_message;
         }
         $res = Note::insert(Auth::getUserID(), $issue_id, false, false);
         // need to handle attachments coming from notes as well
@@ -371,7 +371,7 @@
      */
     function route_drafts($full_message)
     {
-        GLOBAL $HTTP_POST_VARS;
+        GLOBAL $_POST;
 
         // save the full message for logging purposes
         Draft::saveRoutedMessage($full_message);
Index: include/class.reminder_action.php
===================================================================
--- include/class.reminder_action.php	(revision 3164)
+++ include/class.reminder_action.php	(working copy)
@@ -190,8 +190,6 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "reminder_action
                  (
@@ -204,14 +202,14 @@
                     rma_alert_group_leader,
                     rma_boilerplate
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS['rem_id']) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS['type']) . ",
+                    " . Misc::escapeInteger($_POST['rem_id']) . ",
+                    " . Misc::escapeInteger($_POST['type']) . ",
                     '" . Date_API::getCurrentDateGMT() . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS['title']) . "',
-                    '" . Misc::escapeInteger($HTTP_POST_VARS['rank']) . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS['alert_irc']) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS['alert_group_leader']) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS['boilerplate']) . "'
+                    '" . Misc::escapeString($_POST['title']) . "',
+                    '" . Misc::escapeInteger($_POST['rank']) . "',
+                    " . Misc::escapeInteger($_POST['alert_irc']) . ",
+                    " . Misc::escapeInteger($_POST['alert_group_leader']) . ",
+                    '" . Misc::escapeString($_POST['boilerplate']) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -220,8 +218,8 @@
         } else {
             $new_rma_id = $GLOBALS["db_api"]->get_last_insert_id();
             // add the user list, if appropriate
-            if (Reminder_Action::isUserList($HTTP_POST_VARS['type'])) {
-                Reminder_Action::associateUserList($new_rma_id, $HTTP_POST_VARS['user_list']);
+            if (Reminder_Action::isUserList($_POST['type'])) {
+                Reminder_Action::associateUserList($new_rma_id, $_POST['user_list']);
             }
             return 1;
         }
@@ -306,30 +304,28 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "reminder_action
                  SET
                     rma_last_updated_date='" . Date_API::getCurrentDateGMT() . "',
-                    rma_rank='" . Misc::escapeInteger($HTTP_POST_VARS['rank']) . "',
-                    rma_title='" . Misc::escapeString($HTTP_POST_VARS['title']) . "',
-                    rma_rmt_id=" . Misc::escapeInteger($HTTP_POST_VARS['type']) . ",
-                    rma_alert_irc=" . Misc::escapeInteger($HTTP_POST_VARS['alert_irc']) . ",
-                    rma_alert_group_leader=" . Misc::escapeInteger($HTTP_POST_VARS['alert_group_leader']) . ",
-                    rma_boilerplate='" . Misc::escapeString($HTTP_POST_VARS['boilerplate']) . "'
+                    rma_rank='" . Misc::escapeInteger($_POST['rank']) . "',
+                    rma_title='" . Misc::escapeString($_POST['title']) . "',
+                    rma_rmt_id=" . Misc::escapeInteger($_POST['type']) . ",
+                    rma_alert_irc=" . Misc::escapeInteger($_POST['alert_irc']) . ",
+                    rma_alert_group_leader=" . Misc::escapeInteger($_POST['alert_group_leader']) . ",
+                    rma_boilerplate='" . Misc::escapeString($_POST['boilerplate']) . "'
                  WHERE
-                    rma_id=" . Misc::escapeInteger($HTTP_POST_VARS['id']);
+                    rma_id=" . Misc::escapeInteger($_POST['id']);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
             // remove any user list associated with this reminder action
-            Reminder_Action::clearActionUserList($HTTP_POST_VARS['id']);
+            Reminder_Action::clearActionUserList($_POST['id']);
             // add the user list back in, if appropriate
-            if (Reminder_Action::isUserList($HTTP_POST_VARS['type'])) {
-                Reminder_Action::associateUserList($HTTP_POST_VARS['id'], $HTTP_POST_VARS['user_list']);
+            if (Reminder_Action::isUserList($_POST['type'])) {
+                Reminder_Action::associateUserList($_POST['id'], $_POST['user_list']);
             }
             return 1;
         }
Index: include/class.email_account.php
===================================================================
--- include/class.email_account.php	(revision 3164)
+++ include/class.email_account.php	(working copy)
@@ -235,9 +235,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "email_account
                  WHERE
@@ -247,7 +245,7 @@
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return false;
         } else {
-            Support::removeEmailByAccounts($HTTP_POST_VARS["items"]);
+            Support::removeEmailByAccounts($_POST["items"]);
             return true;
         }
     }
@@ -261,19 +259,17 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (empty($HTTP_POST_VARS["get_only_new"])) {
-            $HTTP_POST_VARS["get_only_new"] = 0;
+        if (empty($_POST["get_only_new"])) {
+            $_POST["get_only_new"] = 0;
         }
-        if (empty($HTTP_POST_VARS["leave_copy"])) {
-            $HTTP_POST_VARS["leave_copy"] = 0;
+        if (empty($_POST["leave_copy"])) {
+            $_POST["leave_copy"] = 0;
         }
-        if (empty($HTTP_POST_VARS["use_routing"])) {
-            $HTTP_POST_VARS["use_routing"] = 0;
-        } elseif ($HTTP_POST_VARS['use_routing'] == 1) {
+        if (empty($_POST["use_routing"])) {
+            $_POST["use_routing"] = 0;
+        } elseif ($_POST['use_routing'] == 1) {
             // if an account will be used for routing, you can't leave the message on the server
-            $HTTP_POST_VARS['leave_copy'] = 0;
+            $_POST['leave_copy'] = 0;
         }
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "email_account
@@ -289,16 +285,16 @@
                     ema_leave_copy,
                     ema_use_routing
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS["project"]) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS["type"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["hostname"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["port"]) . "',
-                    '" . Misc::escapeString(@$HTTP_POST_VARS["folder"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["username"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["password"]) . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS["get_only_new"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS["leave_copy"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS["use_routing"]) . "
+                    " . Misc::escapeInteger($_POST["project"]) . ",
+                    '" . Misc::escapeString($_POST["type"]) . "',
+                    '" . Misc::escapeString($_POST["hostname"]) . "',
+                    '" . Misc::escapeString($_POST["port"]) . "',
+                    '" . Misc::escapeString(@$_POST["folder"]) . "',
+                    '" . Misc::escapeString($_POST["username"]) . "',
+                    '" . Misc::escapeString($_POST["password"]) . "',
+                    " . Misc::escapeInteger($_POST["get_only_new"]) . ",
+                    " . Misc::escapeInteger($_POST["leave_copy"]) . ",
+                    " . Misc::escapeInteger($_POST["use_routing"]) . "
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -318,35 +314,33 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (empty($HTTP_POST_VARS["get_only_new"])) {
-            $HTTP_POST_VARS["get_only_new"] = 0;
+        if (empty($_POST["get_only_new"])) {
+            $_POST["get_only_new"] = 0;
         }
-        if (empty($HTTP_POST_VARS["leave_copy"])) {
-            $HTTP_POST_VARS["leave_copy"] = 0;
+        if (empty($_POST["leave_copy"])) {
+            $_POST["leave_copy"] = 0;
         }
-        if (empty($HTTP_POST_VARS["use_routing"])) {
-            $HTTP_POST_VARS["use_routing"] = 0;
-        } elseif ($HTTP_POST_VARS['use_routing'] == 1) {
+        if (empty($_POST["use_routing"])) {
+            $_POST["use_routing"] = 0;
+        } elseif ($_POST['use_routing'] == 1) {
             // if an account will be used for routing, you can't leave the message on the server
-            $HTTP_POST_VARS['leave_copy'] = 0;
+            $_POST['leave_copy'] = 0;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "email_account
                  SET
-                    ema_prj_id=" . Misc::escapeInteger($HTTP_POST_VARS["project"]) . ",
-                    ema_type='" . Misc::escapeString($HTTP_POST_VARS["type"]) . "',
-                    ema_hostname='" . Misc::escapeString($HTTP_POST_VARS["hostname"]) . "',
-                    ema_port='" . Misc::escapeString($HTTP_POST_VARS["port"]) . "',
-                    ema_folder='" . Misc::escapeString(@$HTTP_POST_VARS["folder"]) . "',
-                    ema_username='" . Misc::escapeString($HTTP_POST_VARS["username"]) . "',
-                    ema_password='" . Misc::escapeString($HTTP_POST_VARS["password"]) . "',
-                    ema_get_only_new=" . Misc::escapeInteger($HTTP_POST_VARS["get_only_new"]) . ",
-                    ema_leave_copy=" . Misc::escapeInteger($HTTP_POST_VARS["leave_copy"]) . ",
-                    ema_use_routing=" . Misc::escapeInteger($HTTP_POST_VARS["use_routing"]) . "
+                    ema_prj_id=" . Misc::escapeInteger($_POST["project"]) . ",
+                    ema_type='" . Misc::escapeString($_POST["type"]) . "',
+                    ema_hostname='" . Misc::escapeString($_POST["hostname"]) . "',
+                    ema_port='" . Misc::escapeString($_POST["port"]) . "',
+                    ema_folder='" . Misc::escapeString(@$_POST["folder"]) . "',
+                    ema_username='" . Misc::escapeString($_POST["username"]) . "',
+                    ema_password='" . Misc::escapeString($_POST["password"]) . "',
+                    ema_get_only_new=" . Misc::escapeInteger($_POST["get_only_new"]) . ",
+                    ema_leave_copy=" . Misc::escapeInteger($_POST["leave_copy"]) . ",
+                    ema_use_routing=" . Misc::escapeInteger($_POST["use_routing"]) . "
                  WHERE
-                    ema_id=" . $HTTP_POST_VARS["id"];
+                    ema_id=" . $_POST["id"];
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -488,4 +482,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Email_Account Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.email_response.php
===================================================================
--- include/class.email_response.php	(revision 3164)
+++ include/class.email_response.php	(working copy)
@@ -73,9 +73,7 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "INSERT INTO
@@ -84,8 +82,8 @@
                     ere_title,
                     ere_response_body
                  ) VALUES (
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["response_body"]) . "'
+                    '" . Misc::escapeString($_POST["title"]) . "',
+                    '" . Misc::escapeString($_POST["response_body"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -94,7 +92,7 @@
         } else {
             $new_response_id = $GLOBALS["db_api"]->get_last_insert_id();
             // now populate the project-news mapping table
-            foreach ($HTTP_POST_VARS['projects'] as $prj_id) {
+            foreach ($_POST['projects'] as $prj_id) {
                 Email_Response::addProjectAssociation($new_response_id, $prj_id);
             }
             return 1;
@@ -110,9 +108,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "email_response
                  WHERE
@@ -122,7 +118,7 @@
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return false;
         } else {
-            Email_Response::removeProjectAssociations($HTTP_POST_VARS['items']);
+            Email_Response::removeProjectAssociations($_POST['items']);
             return true;
         }
     }
@@ -169,29 +165,27 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-        
-        $HTTP_POST_VARS['id'] = Misc::escapeInteger($HTTP_POST_VARS['id']);
+        $_POST['id'] = Misc::escapeInteger($_POST['id']);
 
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "email_response
                  SET
-                    ere_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    ere_response_body='" . Misc::escapeString($HTTP_POST_VARS["response_body"]) . "'
+                    ere_title='" . Misc::escapeString($_POST["title"]) . "',
+                    ere_response_body='" . Misc::escapeString($_POST["response_body"]) . "'
                  WHERE
-                    ere_id=" . $HTTP_POST_VARS["id"];
+                    ere_id=" . $_POST["id"];
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
             // remove all of the associations with projects, then add them all again
-            Email_Response::removeProjectAssociations($HTTP_POST_VARS['id']);
-            foreach ($HTTP_POST_VARS['projects'] as $prj_id) {
-                Email_Response::addProjectAssociation($HTTP_POST_VARS['id'], $prj_id);
+            Email_Response::removeProjectAssociations($_POST['id']);
+            foreach ($_POST['projects'] as $prj_id) {
+                Email_Response::addProjectAssociation($_POST['id'], $prj_id);
             }
             return 1;
         }
@@ -356,4 +350,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Email_Response Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.template.php
===================================================================
--- include/class.template.php	(revision 3164)
+++ include/class.template.php	(working copy)
@@ -151,10 +151,8 @@
      */
     function processTemplate()
     {
-        global $HTTP_SERVER_VARS;
-
         // determine the correct CSS file to use
-        if (ereg('MSIE ([0-9].[0-9]{1,2})', @$HTTP_SERVER_VARS["HTTP_USER_AGENT"], $log_version)) {
+        if (ereg('MSIE ([0-9].[0-9]{1,2})', @$_SERVER["HTTP_USER_AGENT"], $log_version)) {
             $user_agent = 'ie';
         } else {
             $user_agent = 'other';
@@ -205,7 +203,7 @@
         $this->assign("os", Net_UserAgent_Detect::_getStaticProperty('os'));
 
         // this is only used by the textarea resize script
-        $js_script_name = str_replace('/', '_', str_replace('.php', '', $HTTP_SERVER_VARS['PHP_SELF']));
+        $js_script_name = str_replace('/', '_', str_replace('.php', '', $_SERVER['PHP_SELF']));
         $this->assign("js_script_name", $js_script_name);
 
         $this->assign("total_queries", $GLOBALS['TOTAL_QUERIES']);
Index: include/class.support.php
===================================================================
--- include/class.support.php	(revision 3164)
+++ include/class.support.php	(working copy)
@@ -319,9 +319,7 @@
      */
     function restoreEmails()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["item"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["item"]));
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "support_email
                  SET
@@ -634,7 +632,9 @@
                                     $cc_users[] = $users[$email];
                                 }
                             }
-                            $GLOBALS['HTTP_POST_VARS'] = array(
+
+                            // XXX FIXME, this is not nice thing to do
+                            $_POST = array(
                                 'title'                => Mail_API::removeExcessRe($t['subject']),
                                 'note'                 => $t['body'],
                                 'note_cc'              => $cc_users,
@@ -1064,12 +1064,10 @@
      */
     function getParam($name)
     {
-        global $HTTP_POST_VARS, $HTTP_GET_VARS;
-
-        if (isset($HTTP_GET_VARS[$name])) {
-            return $HTTP_GET_VARS[$name];
-        } elseif (isset($HTTP_POST_VARS[$name])) {
-            return $HTTP_POST_VARS[$name];
+        if (isset($_GET[$name])) {
+            return $_GET[$name];
+        } elseif (isset($_POST[$name])) {
+            return $_POST[$name];
         } elseif ($profile = Search_Profile::getProfile(Auth::getUserID(), Auth::getCurrentProject(), 'email') && isset($profile[$name])) {
             return $profile[$name];
         } else {
@@ -1142,8 +1140,6 @@
      */
     function getSortingInfo($options)
     {
-        global $HTTP_SERVER_VARS;
-
         $fields = array(
             "sup_from",
             "sup_customer_id",
@@ -1164,9 +1160,9 @@
                 } else {
                     $sort_order = "asc";
                 }
-                $items["links"][$fields[$i]] = $HTTP_SERVER_VARS["PHP_SELF"] . "?sort_by=" . $fields[$i] . "&sort_order=" . $sort_order;
+                $items["links"][$fields[$i]] = $_SERVER["PHP_SELF"] . "?sort_by=" . $fields[$i] . "&sort_order=" . $sort_order;
             } else {
-                $items["links"][$fields[$i]] = $HTTP_SERVER_VARS["PHP_SELF"] . "?sort_by=" . $fields[$i] . "&sort_order=asc";
+                $items["links"][$fields[$i]] = $_SERVER["PHP_SELF"] . "?sort_by=" . $fields[$i] . "&sort_order=asc";
             }
         }
         return $items;
@@ -1717,9 +1713,7 @@
      */
     function removeEmails()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["item"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["item"]));
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "support_email
                  SET
@@ -1745,9 +1739,7 @@
      */
     function removeAssociation()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["item"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["item"]));
         $stmt = "SELECT
                     sup_iss_id
                  FROM
@@ -1777,9 +1769,9 @@
                      WHERE
                         sup_id IN ($items)";
             $subjects = $GLOBALS["db_api"]->dbh->getAssoc($stmt);
-            for ($i = 0; $i < count($HTTP_POST_VARS["item"]); $i++) {
+            for ($i = 0; $i < count($_POST["item"]); $i++) {
                 History::add($issue_id, Auth::getUserID(), History::getTypeID('email_disassociated'),
-                                ev_gettext('Email (subject: \'%1$s\') disassociated by %2$s', $subjects[$HTTP_POST_VARS["item"][$i]], User::getFullName(Auth::getUserID())));
+                                ev_gettext('Email (subject: \'%1$s\') disassociated by %2$s', $subjects[$_POST["item"][$i]], User::getFullName(Auth::getUserID())));
             }
             return 1;
         }
@@ -1967,8 +1959,6 @@
      */
     function sendEmail($parent_sup_id = FALSE)
     {
-        global $HTTP_POST_VARS, $HTTP_SERVER_VARS;
-
         // if we are replying to an existing email, set the In-Reply-To: header accordingly
         if ($parent_sup_id) {
             $in_reply_to = Support::getMessageIDByID($parent_sup_id);
@@ -1977,51 +1967,51 @@
         }
 
         // get ID of whoever is sending this.
-        $sender_usr_id = User::getUserIDByEmail(Mail_API::getEmailAddress($HTTP_POST_VARS["from"]));
+        $sender_usr_id = User::getUserIDByEmail(Mail_API::getEmailAddress($_POST["from"]));
         if (empty($sender_usr_id)) {
             $sender_usr_id = false;
         }
 
         // get type of email this is
-        if (!empty($HTTP_POST_VARS['type'])) {
-            $type = $HTTP_POST_VARS['type'];
+        if (!empty($_POST['type'])) {
+            $type = $_POST['type'];
         } else {
             $type = '';
         }
 
 
         // remove extra 'Re: ' from subject
-        $HTTP_POST_VARS['subject'] = Mail_API::removeExcessRe($HTTP_POST_VARS['subject'], true);
+        $_POST['subject'] = Mail_API::removeExcessRe($_POST['subject'], true);
         $internal_only = false;
         $message_id = Mail_API::generateMessageID();
         // hack needed to get the full headers of this web-based email
-        $full_email = Support::buildFullHeaders($HTTP_POST_VARS["issue_id"], $message_id, $HTTP_POST_VARS["from"],
-                $HTTP_POST_VARS["to"], $HTTP_POST_VARS["cc"], $HTTP_POST_VARS["subject"], $HTTP_POST_VARS["message"], $in_reply_to);
+        $full_email = Support::buildFullHeaders($_POST["issue_id"], $message_id, $_POST["from"],
+                $_POST["to"], $_POST["cc"], $_POST["subject"], $_POST["message"], $in_reply_to);
 
         // email blocking should only be done if this is an email about an associated issue
-        if (!empty($HTTP_POST_VARS['issue_id'])) {
+        if (!empty($_POST['issue_id'])) {
             $user_info = User::getNameEmail(Auth::getUserID());
             // check whether the current user is allowed to send this email to customers or not
-            if (!Support::isAllowedToEmail($HTTP_POST_VARS["issue_id"], $user_info['usr_email'])) {
+            if (!Support::isAllowedToEmail($_POST["issue_id"], $user_info['usr_email'])) {
                 // add the message body as a note
-                $HTTP_POST_VARS['blocked_msg'] = $full_email;
-                $HTTP_POST_VARS['title'] = $HTTP_POST_VARS["subject"];
-                $HTTP_POST_VARS['note'] = Mail_API::getCannedBlockedMsgExplanation() . $HTTP_POST_VARS["message"];
-                Note::insert(Auth::getUserID(), $HTTP_POST_VARS["issue_id"]);
-                Workflow::handleBlockedEmail(Issue::getProjectID($HTTP_POST_VARS['issue_id']), $HTTP_POST_VARS['issue_id'], $HTTP_POST_VARS, 'web');
+                $_POST['blocked_msg'] = $full_email;
+                $_POST['title'] = $_POST["subject"];
+                $_POST['note'] = Mail_API::getCannedBlockedMsgExplanation() . $_POST["message"];
+                Note::insert(Auth::getUserID(), $_POST["issue_id"]);
+                Workflow::handleBlockedEmail(Issue::getProjectID($_POST['issue_id']), $_POST['issue_id'], $_POST, 'web');
                 return 1;
             }
         }
 
         // only send a direct email if the user doesn't want to add the Cc'ed people to the notification list
-        if (@$HTTP_POST_VARS['add_unknown'] == 'yes') {
-            if (!empty($HTTP_POST_VARS['issue_id'])) {
+        if (@$_POST['add_unknown'] == 'yes') {
+            if (!empty($_POST['issue_id'])) {
                 // add the recipients to the notification list of the associated issue
-                $recipients = array($HTTP_POST_VARS['to']);
-                $recipients = array_merge($recipients, Support::getRecipientsCC($HTTP_POST_VARS['cc']));
+                $recipients = array($_POST['to']);
+                $recipients = array_merge($recipients, Support::getRecipientsCC($_POST['cc']));
                 for ($i = 0; $i < count($recipients); $i++) {
-                    if ((!empty($recipients[$i])) && (!Notification::isIssueRoutingSender($HTTP_POST_VARS["issue_id"], $recipients[$i]))) {
-                        Notification::subscribeEmail(Auth::getUserID(), $HTTP_POST_VARS["issue_id"], Mail_API::getEmailAddress($recipients[$i]), Notification::getDefaultActions());
+                    if ((!empty($recipients[$i])) && (!Notification::isIssueRoutingSender($_POST["issue_id"], $recipients[$i]))) {
+                        Notification::subscribeEmail(Auth::getUserID(), $_POST["issue_id"], Mail_API::getEmailAddress($recipients[$i]), Notification::getDefaultActions());
                     }
                 }
             }
@@ -2033,20 +2023,20 @@
             // In the case of replying to an email that is not yet associated with an issue, then
             // we are always directly sending the email, without using any notification list
             // functionality.
-            if (!empty($HTTP_POST_VARS['issue_id'])) {
+            if (!empty($_POST['issue_id'])) {
                 // send direct emails only to the unknown addresses, and leave the rest to be
                 // catched by the notification list
-                $from = Notification::getFixedFromHeader($HTTP_POST_VARS['issue_id'], $HTTP_POST_VARS['from'], 'issue');
+                $from = Notification::getFixedFromHeader($_POST['issue_id'], $_POST['from'], 'issue');
                 // build the list of unknown recipients
-                if (!empty($HTTP_POST_VARS['to'])) {
-                    $recipients = array($HTTP_POST_VARS['to']);
-                    $recipients = array_merge($recipients, Support::getRecipientsCC($HTTP_POST_VARS['cc']));
+                if (!empty($_POST['to'])) {
+                    $recipients = array($_POST['to']);
+                    $recipients = array_merge($recipients, Support::getRecipientsCC($_POST['cc']));
                 } else {
-                    $recipients = Support::getRecipientsCC($HTTP_POST_VARS['cc']);
+                    $recipients = Support::getRecipientsCC($_POST['cc']);
                 }
                 $unknowns = array();
                 for ($i = 0; $i < count($recipients); $i++) {
-                    if (!Notification::isSubscribedToEmails($HTTP_POST_VARS['issue_id'], $recipients[$i])) {
+                    if (!Notification::isSubscribedToEmails($_POST['issue_id'], $recipients[$i])) {
                         $unknowns[] = $recipients[$i];
                     }
                 }
@@ -2054,8 +2044,8 @@
                     $to = array_shift($unknowns);
                     $cc = implode('; ', $unknowns);
                     // send direct emails
-                    Support::sendDirectEmail($HTTP_POST_VARS['issue_id'], $from, $to, $cc,
-                            $HTTP_POST_VARS['subject'], $HTTP_POST_VARS['message'], $message_id, $sender_usr_id);
+                    Support::sendDirectEmail($_POST['issue_id'], $from, $to, $cc,
+                            $_POST['subject'], $_POST['message'], $message_id, $sender_usr_id);
                 }
             } else {
                 // send direct emails to all recipients, since we don't have an associated issue
@@ -2068,22 +2058,22 @@
                     $from = User::getFromHeader(Auth::getUserID());
                 }
                 // send direct emails
-                Support::sendDirectEmail($HTTP_POST_VARS['issue_id'], $from, $HTTP_POST_VARS['to'], $HTTP_POST_VARS['cc'],
-                        $HTTP_POST_VARS['subject'], $HTTP_POST_VARS['message'], $message_id);
+                Support::sendDirectEmail($_POST['issue_id'], $from, $_POST['to'], $_POST['cc'],
+                        $_POST['subject'], $_POST['message'], $message_id);
             }
         }
 
         $t = array(
             'customer_id'    => 'NULL',
-            'issue_id'       => $HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : 0,
-            'ema_id'         => $HTTP_POST_VARS['ema_id'],
+            'issue_id'       => $_POST["issue_id"] ? $_POST["issue_id"] : 0,
+            'ema_id'         => $_POST['ema_id'],
             'message_id'     => $message_id,
             'date'           => Date_API::getCurrentDateGMT(),
-            'from'           => $HTTP_POST_VARS['from'],
-            'to'             => $HTTP_POST_VARS['to'],
-            'cc'             => @$HTTP_POST_VARS['cc'],
-            'subject'        => @$HTTP_POST_VARS['subject'],
-            'body'           => $HTTP_POST_VARS['message'],
+            'from'           => $_POST['from'],
+            'to'             => $_POST['to'],
+            'cc'             => @$_POST['cc'],
+            'subject'        => @$_POST['subject'],
+            'body'           => $_POST['message'],
             'full_email'     => $full_email,
             'has_attachment' => 0
         );
@@ -2097,21 +2087,21 @@
         $structure = Mime_Helper::decode($full_email, true, false);
         $t['headers'] = $structure->headers;
         $res = Support::insertEmail($t, $structure, $sup_id);
-        if (!empty($HTTP_POST_VARS["issue_id"])) {
+        if (!empty($_POST["issue_id"])) {
             // need to send a notification
-            Notification::notifyNewEmail(Auth::getUserID(), $HTTP_POST_VARS["issue_id"], $t, $internal_only, false, $type, $sup_id);
+            Notification::notifyNewEmail(Auth::getUserID(), $_POST["issue_id"], $t, $internal_only, false, $type, $sup_id);
             // mark this issue as updated
             if ((!empty($t['customer_id'])) && ($t['customer_id'] != 'NULL')) {
-                Issue::markAsUpdated($HTTP_POST_VARS["issue_id"], 'customer action');
+                Issue::markAsUpdated($_POST["issue_id"], 'customer action');
             } else {
-                if ((!empty($sender_usr_id)) && (User::getRoleByUser($sender_usr_id, Issue::getProjectID($HTTP_POST_VARS['issue_id'])) > User::getRoleID('Customer'))) {
-                    Issue::markAsUpdated($HTTP_POST_VARS["issue_id"], 'staff response');
+                if ((!empty($sender_usr_id)) && (User::getRoleByUser($sender_usr_id, Issue::getProjectID($_POST['issue_id'])) > User::getRoleID('Customer'))) {
+                    Issue::markAsUpdated($_POST["issue_id"], 'staff response');
                 } else {
-                    Issue::markAsUpdated($HTTP_POST_VARS["issue_id"], 'user response');
+                    Issue::markAsUpdated($_POST["issue_id"], 'user response');
                 }
             }
             // save a history entry for this
-            History::add($HTTP_POST_VARS["issue_id"], Auth::getUserID(), History::getTypeID('email_sent'),
+            History::add($_POST["issue_id"], Auth::getUserID(), History::getTypeID('email_sent'),
                             ev_gettext('Outgoing email sent by %1$s', User::getFullName(Auth::getUserID())));
         }
 
@@ -2430,8 +2420,6 @@
      */
     function blockEmailIfNeeded($email)
     {
-        global $HTTP_POST_VARS;
-
         if (empty($email['issue_id'])) {
             return false;
         }
@@ -2443,7 +2431,7 @@
         if ((Mail_API::isVacationAutoResponder($email['headers'])) || (Notification::isBounceMessage($sender_email)) ||
                 (!Support::isAllowedToEmail($issue_id, $sender_email))) {
             // add the message body as a note
-            $HTTP_POST_VARS = array(
+            $_POST = array(
                 'blocked_msg' => $email['full_email'],
                 'title'       => @$email['headers']['subject'],
                 'note'        => Mail_API::getCannedBlockedMsgExplanation($issue_id) . $email['body'],
@@ -2461,8 +2449,8 @@
                 Support::extractAttachments($issue_id, $email['full_email'], true, $res);
             }
 
-            $HTTP_POST_VARS['issue_id'] = $issue_id;
-            $HTTP_POST_VARS['from'] = $sender_email;
+            $_POST['issue_id'] = $issue_id;
+            $_POST['from'] = $sender_email;
 
             // avoid having this type of message re-open the issue
             if (Mail_API::isVacationAutoResponder($email['headers'])) {
@@ -2470,7 +2458,7 @@
             } else {
                 $email_type = 'routed';
             }
-            Workflow::handleBlockedEmail($prj_id, $issue_id, $HTTP_POST_VARS, $email_type);
+            Workflow::handleBlockedEmail($prj_id, $issue_id, $_POST, $email_type);
 
             // try to get usr_id of sender, if not, use system account
             $usr_id = User::getUserIDByEmail(Mail_API::getEmailAddress($email['from']));
Index: include/class.user.php
===================================================================
--- include/class.user.php	(revision 3164)
+++ include/class.user.php	(working copy)
@@ -308,10 +308,8 @@
      */
     function createVisitorAccount($role, $projects)
     {
-        global $HTTP_POST_VARS;
-
         // check for double submits
-        if (Auth::userExists($HTTP_POST_VARS["email"])) {
+        if (Auth::userExists($_POST["email"])) {
             return -2;
         }
         $prefs = Prefs::getDefaults($projects);
@@ -326,9 +324,9 @@
                     usr_status
                  ) VALUES (
                     '" . Date_API::getCurrentDateGMT() . "',
-                    '" . Auth::hashPassword(Misc::escapeString($HTTP_POST_VARS["passwd"])) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["full_name"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["email"]) . "',
+                    '" . Auth::hashPassword(Misc::escapeString($_POST["passwd"])) . "',
+                    '" . Misc::escapeString($_POST["full_name"]) . "',
+                    '" . Misc::escapeString($_POST["email"]) . "',
                     '" . Misc::escapeString($prefs) . "',
                     'pending'
                  )";
@@ -343,13 +341,13 @@
                 Project::associateUser($projects[$i], $new_usr_id, $role);
             }
             // send confirmation email to user
-            $hash = md5($HTTP_POST_VARS["full_name"] . md5($HTTP_POST_VARS["email"]) . $GLOBALS["private_key"]);
+            $hash = md5($_POST["full_name"] . md5($_POST["email"]) . $GLOBALS["private_key"]);
 
             $tpl = new Template_API;
             $tpl->setTemplate('notifications/visitor_account.tpl.text');
             $tpl->bulkAssign(array(
                 "app_title"   => Misc::getToolCaption(),
-                "email"     =>  $HTTP_POST_VARS['email'],
+                "email"     =>  $_POST['email'],
                 'hash'      =>  $hash
             ));
             $text_message = $tpl->getTemplateContents();
@@ -358,7 +356,7 @@
             $mail = new Mail_API;
             // need to make this message MIME based
             $mail->setTextBody($text_message);
-            $mail->send($setup["smtp"]["from"], $HTTP_POST_VARS["email"], APP_SHORT_NAME . ": New Account - Confirmation Required");
+            $mail->send($setup["smtp"]["from"], $_POST["email"], APP_SHORT_NAME . ": New Account - Confirmation Required");
             return 1;
         }
     }
@@ -405,12 +403,10 @@
      */
     function confirmNewPassword($email)
     {
-        global $HTTP_POST_VARS;
-
         $usr_id = User::getUserIDByEmail($email);
         // create the new password
-        $HTTP_POST_VARS["new_password"] = substr(md5(microtime() . uniqid("")), 0, 12);
-        $HTTP_POST_VARS["confirm_password"] = $HTTP_POST_VARS["new_password"];
+        $_POST["new_password"] = substr(md5(microtime() . uniqid("")), 0, 12);
+        $_POST["confirm_password"] = $_POST["new_password"];
         User::updatePassword($usr_id, true);
     }
 
@@ -866,8 +862,6 @@
      */
     function changeStatus()
     {
-        global $HTTP_POST_VARS;
-
         // check if the user being inactivated is the last one
         $stmt = "SELECT
                     COUNT(*)
@@ -876,15 +870,15 @@
                  WHERE
                     usr_status='active'";
         $total_active = $GLOBALS["db_api"]->dbh->getOne($stmt);
-        if (($total_active < 2) && ($HTTP_POST_VARS["status"] == "inactive")) {
+        if (($total_active < 2) && ($_POST["status"] == "inactive")) {
             return false;
         }
 
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "user
                  SET
-                    usr_status='" . $HTTP_POST_VARS["status"] . "'
+                    usr_status='" . $_POST["status"] . "'
                  WHERE
                     usr_id IN ($items)";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -907,15 +901,13 @@
      */
     function updatePassword($usr_id, $send_notification = FALSE)
     {
-        global $HTTP_POST_VARS;
-
-        if ($HTTP_POST_VARS['new_password'] != $HTTP_POST_VARS['confirm_password']) {
+        if ($_POST['new_password'] != $_POST['confirm_password']) {
             return -2;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "user
                  SET
-                    usr_password='" . Auth::hashPassword($HTTP_POST_VARS["new_password"]) . "'
+                    usr_password='" . Auth::hashPassword($_POST["new_password"]) . "'
                  WHERE
                     usr_id=" . Misc::escapeInteger($usr_id);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -924,7 +916,7 @@
             return -1;
         } else {
             if ($send_notification) {
-                Notification::notifyUserPassword($usr_id, $HTTP_POST_VARS["new_password"]);
+                Notification::notifyUserPassword($usr_id, $_POST["new_password"]);
             }
             return 1;
         }
@@ -940,12 +932,10 @@
      */
     function updateFullName($usr_id)
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "user
                  SET
-                    usr_full_name='" . Misc::escapeString($HTTP_POST_VARS["full_name"]) . "'
+                    usr_full_name='" . Misc::escapeString($_POST["full_name"]) . "'
                  WHERE
                     usr_id=" . Misc::escapeInteger($usr_id);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -968,12 +958,10 @@
      */
     function updateEmail($usr_id)
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "user
                  SET
-                    usr_email='" . Misc::escapeString($HTTP_POST_VARS["email"]) . "'
+                    usr_email='" . Misc::escapeString($_POST["email"]) . "'
                  WHERE
                     usr_id=" . Misc::escapeInteger($usr_id);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -995,25 +983,23 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
         // system account should not be updateable
-        if ($HTTP_POST_VARS["id"] == APP_SYSTEM_USER_ID) {
+        if ($_POST["id"] == APP_SYSTEM_USER_ID) {
             return 1;
         }
 
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "user
                  SET
-                    usr_full_name='" . Misc::escapeString($HTTP_POST_VARS["full_name"]) . "',
-                    usr_email='" . Misc::escapeString($HTTP_POST_VARS["email"]) . "'";
-        if (!empty($HTTP_POST_VARS["password"])) {
+                    usr_full_name='" . Misc::escapeString($_POST["full_name"]) . "',
+                    usr_email='" . Misc::escapeString($_POST["email"]) . "'";
+        if (!empty($_POST["password"])) {
             $stmt .= ",
-                    usr_password='" . Auth::hashPassword($HTTP_POST_VARS["password"]) . "'";
+                    usr_password='" . Auth::hashPassword($_POST["password"]) . "'";
         }
         $stmt .= "
                  WHERE
-                    usr_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    usr_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -1023,13 +1009,13 @@
             $stmt = "DELETE FROM
                         " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_user
                      WHERE
-                        pru_usr_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                        pru_usr_id=" . Misc::escapeInteger($_POST["id"]);
             $res = $GLOBALS["db_api"]->dbh->query($stmt);
             if (PEAR::isError($res)) {
                 Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
                 return -1;
             } else {
-                foreach ($HTTP_POST_VARS["role"] as $prj_id => $role) {
+                foreach ($_POST["role"] as $prj_id => $role) {
                     if ($role < 1) {
                         continue;
                     }
@@ -1041,7 +1027,7 @@
                                 pru_role
                              ) VALUES (
                                 " . $prj_id . ",
-                                " . Misc::escapeInteger($HTTP_POST_VARS["id"]) . ",
+                                " . Misc::escapeInteger($_POST["id"]) . ",
                                 " . $role . "
                              )";
                     $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -1051,10 +1037,10 @@
                     }
                 }
             }
-            if (!empty($HTTP_POST_VARS["password"])) {
-                Notification::notifyUserPassword($HTTP_POST_VARS["id"], $HTTP_POST_VARS["password"]);
+            if (!empty($_POST["password"])) {
+                Notification::notifyUserPassword($_POST["id"], $_POST["password"]);
             } else {
-                Notification::notifyUserAccount($HTTP_POST_VARS["id"]);
+                Notification::notifyUserAccount($_POST["id"]);
             }
             return 1;
         }
@@ -1069,10 +1055,8 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
         $projects = array();
-        foreach ($HTTP_POST_VARS["role"] as $prj_id => $role) {
+        foreach ($_POST["role"] as $prj_id => $role) {
             if ($role < 1) {
                 continue;
             }
@@ -1093,9 +1077,9 @@
                     NULL,
                     NULL,
                     '" . Date_API::getCurrentDateGMT() . "',
-                    '" . Auth::hashPassword(Misc::escapeString($HTTP_POST_VARS["password"])) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["full_name"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["email"]) . "',
+                    '" . Auth::hashPassword(Misc::escapeString($_POST["password"])) . "',
+                    '" . Misc::escapeString($_POST["full_name"]) . "',
+                    '" . Misc::escapeString($_POST["email"]) . "',
                     '" . Misc::escapeString($prefs) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -1105,14 +1089,14 @@
         } else {
             $new_usr_id = $GLOBALS["db_api"]->get_last_insert_id();
             // add the project associations!
-            foreach ($HTTP_POST_VARS["role"] as $prj_id => $role) {
+            foreach ($_POST["role"] as $prj_id => $role) {
                 if ($role < 1) {
                     continue;
                 }
                 Project::associateUser($prj_id, $new_usr_id, $role);
             }
             // send email to user
-            Notification::notifyNewUser($new_usr_id, $HTTP_POST_VARS["password"]);
+            Notification::notifyNewUser($new_usr_id, $_POST["password"]);
             return 1;
         }
     }
@@ -1448,4 +1432,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included User Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.release.php
===================================================================
--- include/class.release.php	(revision 3164)
+++ include/class.release.php	(working copy)
@@ -158,9 +158,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         // gotta fix the issues that are using this release
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue
@@ -197,21 +195,19 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
-        $scheduled_date = $HTTP_POST_VARS["scheduled_date"]["Year"] . "-" . $HTTP_POST_VARS["scheduled_date"]["Month"] . "-" . $HTTP_POST_VARS["scheduled_date"]["Day"];
+        $scheduled_date = $_POST["scheduled_date"]["Year"] . "-" . $_POST["scheduled_date"]["Month"] . "-" . $_POST["scheduled_date"]["Day"];
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_release
                  SET
-                    pre_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
+                    pre_title='" . Misc::escapeString($_POST["title"]) . "',
                     pre_scheduled_date='" . Misc::escapeString($scheduled_date) . "',
-                    pre_status='" . Misc::escapeString($HTTP_POST_VARS["status"]) . "'
+                    pre_status='" . Misc::escapeString($_POST["status"]) . "'
                  WHERE
-                    pre_prj_id=" . Misc::escapeInteger($HTTP_POST_VARS["prj_id"]) . " AND
-                    pre_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    pre_prj_id=" . Misc::escapeInteger($_POST["prj_id"]) . " AND
+                    pre_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -231,12 +227,10 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
-        $scheduled_date = $HTTP_POST_VARS["scheduled_date"]["Year"] . "-" . $HTTP_POST_VARS["scheduled_date"]["Month"] . "-" . $HTTP_POST_VARS["scheduled_date"]["Day"];
+        $scheduled_date = $_POST["scheduled_date"]["Year"] . "-" . $_POST["scheduled_date"]["Month"] . "-" . $_POST["scheduled_date"]["Day"];
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_release
                  (
@@ -245,10 +239,10 @@
                     pre_scheduled_date,
                     pre_status
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS["prj_id"]) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
+                    " . Misc::escapeInteger($_POST["prj_id"]) . ",
+                    '" . Misc::escapeString($_POST["title"]) . "',
                     '" . Misc::escapeString($scheduled_date) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["status"]) . "'
+                    '" . Misc::escapeString($_POST["status"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -333,4 +327,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Release Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.impact_analysis.php
===================================================================
--- include/class.impact_analysis.php	(revision 3164)
+++ include/class.impact_analysis.php	(working copy)
@@ -55,8 +55,6 @@
      */
     function insert($issue_id)
     {
-        global $HTTP_POST_VARS;
-
         $usr_id = Auth::getUserID();
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_requirement
@@ -69,7 +67,7 @@
                     " . Misc::escapeInteger($issue_id) . ",
                     $usr_id,
                     '" . Date_API::getCurrentDateGMT() . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["new_requirement"]) . "'
+                    '" . Misc::escapeString($_POST["new_requirement"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -142,8 +140,6 @@
      */
     function update($isr_id)
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "SELECT
                     isr_iss_id
                  FROM
@@ -153,7 +149,7 @@
         $issue_id = $GLOBALS["db_api"]->dbh->getOne($stmt);
 
         // we are storing minutes, not hours
-        $dev_time = $HTTP_POST_VARS["dev_time"] * 60;
+        $dev_time = $_POST["dev_time"] * 60;
         $usr_id = Auth::getUserID();
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue_requirement
@@ -161,7 +157,7 @@
                     isr_updated_usr_id=$usr_id,
                     isr_updated_date='" . Date_API::getCurrentDateGMT() . "',
                     isr_dev_time=$dev_time,
-                    isr_impact_analysis='" . Misc::escapeString($HTTP_POST_VARS["impact_analysis"]) . "'
+                    isr_impact_analysis='" . Misc::escapeString($_POST["impact_analysis"]) . "'
                  WHERE
                     isr_id=" . Misc::escapeInteger($isr_id);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -185,9 +181,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = implode(", ", Misc::escapeInteger($HTTP_POST_VARS["item"]));
+        $items = implode(", ", Misc::escapeInteger($_POST["item"]));
         $stmt = "SELECT
                     isr_iss_id
                  FROM
Index: include/class.status.php
===================================================================
--- include/class.status.php	(revision 3164)
+++ include/class.status.php	(working copy)
@@ -263,9 +263,7 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS['title'])) {
+        if (Validation::isWhitespace($_POST['title'])) {
             return -2;
         }
         $stmt = "INSERT INTO
@@ -277,11 +275,11 @@
                     sta_color,
                     sta_is_closed
                  ) VALUES (
-                    '" . Misc::escapeString($HTTP_POST_VARS['title']) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS['abbreviation']) . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS['rank']) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS['color']) . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS['is_closed']) . "
+                    '" . Misc::escapeString($_POST['title']) . "',
+                    '" . Misc::escapeString($_POST['abbreviation']) . "',
+                    " . Misc::escapeInteger($_POST['rank']) . ",
+                    '" . Misc::escapeString($_POST['color']) . "',
+                    " . Misc::escapeInteger($_POST['is_closed']) . "
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -290,7 +288,7 @@
         } else {
             $new_status_id = $GLOBALS["db_api"]->get_last_insert_id();
             // now populate the project-status mapping table
-            foreach ($HTTP_POST_VARS['projects'] as $prj_id) {
+            foreach ($_POST['projects'] as $prj_id) {
                 Status::addProjectAssociation($new_status_id, $prj_id);
             }
             return 1;
@@ -306,37 +304,35 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "status
                  SET
-                    sta_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    sta_abbreviation='" . Misc::escapeString($HTTP_POST_VARS["abbreviation"]) . "',
-                    sta_rank=" . Misc::escapeInteger($HTTP_POST_VARS['rank']) . ",
-                    sta_color='" . Misc::escapeString($HTTP_POST_VARS["color"]) . "',
-                    sta_is_closed=" . Misc::escapeInteger($HTTP_POST_VARS['is_closed']) . "
+                    sta_title='" . Misc::escapeString($_POST["title"]) . "',
+                    sta_abbreviation='" . Misc::escapeString($_POST["abbreviation"]) . "',
+                    sta_rank=" . Misc::escapeInteger($_POST['rank']) . ",
+                    sta_color='" . Misc::escapeString($_POST["color"]) . "',
+                    sta_is_closed=" . Misc::escapeInteger($_POST['is_closed']) . "
                  WHERE
-                    sta_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    sta_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
-            $projects = Status::getAssociatedProjects($HTTP_POST_VARS['id']);
+            $projects = Status::getAssociatedProjects($_POST['id']);
             $current_projects = array_keys($projects);
             // remove all of the associations with projects, then add them all again
-            Status::removeProjectAssociations($HTTP_POST_VARS['id']);
-            foreach ($HTTP_POST_VARS['projects'] as $prj_id) {
-                Status::addProjectAssociation($HTTP_POST_VARS['id'], $prj_id);
+            Status::removeProjectAssociations($_POST['id']);
+            foreach ($_POST['projects'] as $prj_id) {
+                Status::addProjectAssociation($_POST['id'], $prj_id);
             }
             // need to update all issues that are not supposed to have the changed sta_id to '0'
             $removed_projects = array();
             foreach ($current_projects as $project_id) {
-                if (!in_array($project_id, $HTTP_POST_VARS['projects'])) {
+                if (!in_array($project_id, $_POST['projects'])) {
                     $removed_projects[] = $project_id;
                 }
             }
@@ -346,7 +342,7 @@
                          SET
                             iss_sta_id=0
                          WHERE
-                            iss_sta_id=" . Misc::escapeInteger($HTTP_POST_VARS['id']) . " AND
+                            iss_sta_id=" . Misc::escapeInteger($_POST['id']) . " AND
                             iss_prj_id IN (" . implode(', ', $removed_projects) . ")";
                 $res = $GLOBALS["db_api"]->dbh->query($stmt);
                 if (PEAR::isError($res)) {
@@ -366,9 +362,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "status
                  WHERE
@@ -378,7 +372,7 @@
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return false;
         } else {
-            Status::removeProjectAssociations($HTTP_POST_VARS['items']);
+            Status::removeProjectAssociations($_POST['items']);
             // also set all issues currently set to these statuses to status '0'
             $stmt = "UPDATE
                         " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue
@@ -793,4 +787,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Status Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.notification.php
===================================================================
--- include/class.notification.php	(revision 3164)
+++ include/class.notification.php	(working copy)
@@ -2120,8 +2120,6 @@
      */
     function update($sub_id)
     {
-        global $HTTP_POST_VARS;
-
         $sub_id = Misc::escapeInteger($sub_id);
 
         $stmt = "SELECT
@@ -2133,13 +2131,13 @@
                     sub_id=$sub_id";
         list($issue_id, $usr_id) = $GLOBALS["db_api"]->dbh->getRow($stmt);
 
-        $email = strtolower(Mail_API::getEmailAddress($HTTP_POST_VARS["email"]));
+        $email = strtolower(Mail_API::getEmailAddress($_POST["email"]));
         $usr_id = User::getUserIDByEmail($email);
         if (!empty($usr_id)) {
             $email = '';
         } else {
             $usr_id = 0;
-            $email = Misc::escapeString($HTTP_POST_VARS["email"]);
+            $email = Misc::escapeString($_POST["email"]);
         }
         $prj_id = Issue::getProjectID($issue_id);
 
@@ -2172,8 +2170,8 @@
                         sbt_sub_id=$sub_id";
             $GLOBALS["db_api"]->dbh->query($stmt);
             // now add them all again
-            for ($i = 0; $i < count($HTTP_POST_VARS["actions"]); $i++) {
-                Notification::addType($sub_id, $HTTP_POST_VARS["actions"][$i]);
+            for ($i = 0; $i < count($_POST["actions"]); $i++) {
+                Notification::addType($sub_id, $_POST["actions"][$i]);
             }
             // need to mark the issue as updated
             Issue::markAsUpdated($issue_id);
Index: include/class.resolution.php
===================================================================
--- include/class.resolution.php	(revision 3164)
+++ include/class.resolution.php	(working copy)
@@ -75,9 +75,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         // gotta fix the issues before removing the resolution
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "issue
@@ -114,17 +112,15 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "resolution
                  SET
-                    res_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "'
+                    res_title='" . Misc::escapeString($_POST["title"]) . "'
                  WHERE
-                    res_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    res_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -220,9 +216,7 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "INSERT INTO
@@ -231,7 +225,7 @@
                     res_title,
                     res_created_date
                  ) VALUES (
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
+                    '" . Misc::escapeString($_POST["title"]) . "',
                     '" . Date_API::getCurrentDateGMT() . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -248,4 +242,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Resolution Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.phone_support.php
===================================================================
--- include/class.phone_support.php	(revision 3164)
+++ include/class.phone_support.php	(working copy)
@@ -54,9 +54,7 @@
      */
     function insertCategory()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "INSERT INTO
@@ -65,8 +63,8 @@
                     phc_prj_id,
                     phc_title
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS["prj_id"]) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "'
+                    " . Misc::escapeInteger($_POST["prj_id"]) . ",
+                    '" . Misc::escapeString($_POST["title"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -88,18 +86,16 @@
      */
     function updateCategory()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_phone_category
                  SET
-                    phc_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "'
+                    phc_title='" . Misc::escapeString($_POST["title"]) . "'
                  WHERE
-                    phc_prj_id=" . Misc::escapeInteger($HTTP_POST_VARS["prj_id"]) . " AND
-                    phc_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    phc_prj_id=" . Misc::escapeInteger($_POST["prj_id"]) . " AND
+                    phc_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -119,9 +115,7 @@
      */
     function removeCategory()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_phone_category
                  WHERE
@@ -296,14 +290,12 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
         $usr_id = Auth::getUserID();
         // format the date from the form
         $created_date = sprintf('%04d-%02d-%02d %02d:%02d:%02d',
-            $HTTP_POST_VARS["date"]["Year"], $HTTP_POST_VARS["date"]["Month"],
-            $HTTP_POST_VARS["date"]["Day"], $HTTP_POST_VARS["date"]["Hour"],
-            $HTTP_POST_VARS["date"]["Minute"], 0);
+            $_POST["date"]["Year"], $_POST["date"]["Month"],
+            $_POST["date"]["Day"], $_POST["date"]["Hour"],
+            $_POST["date"]["Minute"], 0);
         // convert the date to GMT timezone
         $created_date = Date_API::getDateGMT($created_date);
         $stmt = "INSERT INTO
@@ -322,18 +314,18 @@
                     phs_call_to_lname,
                     phs_call_to_fname
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS["issue_id"]) . ",
+                    " . Misc::escapeInteger($_POST["issue_id"]) . ",
                     $usr_id,
-                    " . Misc::escapeInteger($HTTP_POST_VARS["phone_category"]) . ",
+                    " . Misc::escapeInteger($_POST["phone_category"]) . ",
                     '" . Misc::escapeString($created_date) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["type"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["phone_number"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["description"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["phone_type"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["from_lname"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["from_fname"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["to_lname"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["to_fname"]) . "'
+                    '" . Misc::escapeString($_POST["type"]) . "',
+                    '" . Misc::escapeString($_POST["phone_number"]) . "',
+                    '" . Misc::escapeString($_POST["description"]) . "',
+                    '" . Misc::escapeString($_POST["phone_type"]) . "',
+                    '" . Misc::escapeString($_POST["from_lname"]) . "',
+                    '" . Misc::escapeString($_POST["from_fname"]) . "',
+                    '" . Misc::escapeString($_POST["to_lname"]) . "',
+                    '" . Misc::escapeString($_POST["to_fname"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -342,22 +334,22 @@
         } else {
             // enter the time tracking entry about this phone support entry
             $phs_id = $GLOBALS["db_api"]->get_last_insert_id();
-            $HTTP_POST_VARS['category'] = Time_Tracking::getCategoryID('Telephone Discussion');
-            $HTTP_POST_VARS['time_spent'] = $HTTP_POST_VARS['call_length'];
-            $HTTP_POST_VARS['summary'] = ev_gettext("Time entry inserted from phone call.");
+            $_POST['category'] = Time_Tracking::getCategoryID('Telephone Discussion');
+            $_POST['time_spent'] = $_POST['call_length'];
+            $_POST['summary'] = ev_gettext("Time entry inserted from phone call.");
             Time_Tracking::insertEntry();
             $stmt = "SELECT
                         max(ttr_id)
                      FROM
                         " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "time_tracking
                      WHERE
-                        ttr_iss_id = " . Misc::escapeInteger($HTTP_POST_VARS["issue_id"]) . " AND
+                        ttr_iss_id = " . Misc::escapeInteger($_POST["issue_id"]) . " AND
                         ttr_usr_id = $usr_id";
             $ttr_id = $GLOBALS["db_api"]->dbh->getOne($stmt);
 
-            Issue::markAsUpdated($HTTP_POST_VARS['issue_id'], 'phone call');
+            Issue::markAsUpdated($_POST['issue_id'], 'phone call');
             // need to save a history entry for this
-            History::add($HTTP_POST_VARS['issue_id'], $usr_id, History::getTypeID('phone_entry_added'),
+            History::add($_POST['issue_id'], $usr_id, History::getTypeID('phone_entry_added'),
                             ev_gettext('Phone Support entry submitted by %1$s', User::getFullName($usr_id)));
             // XXX: send notifications for the issue being updated (new notification type phone_support?)
 
Index: include/class.project.php
===================================================================
--- include/class.project.php	(revision 3164)
+++ include/class.project.php	(working copy)
@@ -155,13 +155,11 @@
      */
     function updateAnonymousPost($prj_id)
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project
                  SET
-                    prj_anonymous_post='" . Misc::escapeString($HTTP_POST_VARS["anonymous_post"]) . "',
-                    prj_anonymous_post_options='" . Misc::escapeString(@serialize($HTTP_POST_VARS["options"])) . "'
+                    prj_anonymous_post='" . Misc::escapeString($_POST["anonymous_post"]) . "',
+                    prj_anonymous_post_options='" . Misc::escapeString(@serialize($_POST["options"])) . "'
                  WHERE
                     prj_id=" . Misc::escapeInteger($prj_id);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
@@ -360,9 +358,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project
                  WHERE
@@ -372,18 +368,18 @@
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return false;
         } else {
-            Project::removeUserByProjects($HTTP_POST_VARS["items"]);
-            Category::removeByProjects($HTTP_POST_VARS["items"]);
-            Release::removeByProjects($HTTP_POST_VARS["items"]);
-            Filter::removeByProjects($HTTP_POST_VARS["items"]);
-            Email_Account::removeAccountByProjects($HTTP_POST_VARS["items"]);
-            Issue::removeByProjects($HTTP_POST_VARS["items"]);
-            Custom_Field::removeByProjects($HTTP_POST_VARS["items"]);
-            $statuses = array_keys(Status::getAssocStatusList($HTTP_POST_VARS["items"]));
-            foreach ($HTTP_POST_VARS["items"] as $prj_id) {
+            Project::removeUserByProjects($_POST["items"]);
+            Category::removeByProjects($_POST["items"]);
+            Release::removeByProjects($_POST["items"]);
+            Filter::removeByProjects($_POST["items"]);
+            Email_Account::removeAccountByProjects($_POST["items"]);
+            Issue::removeByProjects($_POST["items"]);
+            Custom_Field::removeByProjects($_POST["items"]);
+            $statuses = array_keys(Status::getAssocStatusList($_POST["items"]));
+            foreach ($_POST["items"] as $prj_id) {
                 Status::removeProjectAssociations($statuses, $prj_id);
             }
-            Group::disassociateProjects($HTTP_POST_VARS["items"]);
+            Group::disassociateProjects($_POST["items"]);
             return true;
         }
     }
@@ -426,46 +422,44 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project
                  SET
-                    prj_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    prj_status='" . Misc::escapeString($HTTP_POST_VARS["status"]) . "',
-                    prj_lead_usr_id=" . Misc::escapeInteger($HTTP_POST_VARS["lead_usr_id"]) . ",
-                    prj_initial_sta_id=" . Misc::escapeInteger($HTTP_POST_VARS["initial_status"]) . ",
-                    prj_outgoing_sender_name='" . Misc::escapeString($HTTP_POST_VARS["outgoing_sender_name"]) . "',
-                    prj_outgoing_sender_email='" . Misc::escapeString($HTTP_POST_VARS["outgoing_sender_email"]) . "',
-                    prj_remote_invocation='" . Misc::escapeString($HTTP_POST_VARS["remote_invocation"]) . "',
-                    prj_segregate_reporter='" . Misc::escapeString($HTTP_POST_VARS["segregate_reporter"]) . "',
-                    prj_customer_backend='" . Misc::escapeString($HTTP_POST_VARS["customer_backend"]) . "',
-                    prj_workflow_backend='" . Misc::escapeString($HTTP_POST_VARS["workflow_backend"]) . "'
+                    prj_title='" . Misc::escapeString($_POST["title"]) . "',
+                    prj_status='" . Misc::escapeString($_POST["status"]) . "',
+                    prj_lead_usr_id=" . Misc::escapeInteger($_POST["lead_usr_id"]) . ",
+                    prj_initial_sta_id=" . Misc::escapeInteger($_POST["initial_status"]) . ",
+                    prj_outgoing_sender_name='" . Misc::escapeString($_POST["outgoing_sender_name"]) . "',
+                    prj_outgoing_sender_email='" . Misc::escapeString($_POST["outgoing_sender_email"]) . "',
+                    prj_remote_invocation='" . Misc::escapeString($_POST["remote_invocation"]) . "',
+                    prj_segregate_reporter='" . Misc::escapeString($_POST["segregate_reporter"]) . "',
+                    prj_customer_backend='" . Misc::escapeString($_POST["customer_backend"]) . "',
+                    prj_workflow_backend='" . Misc::escapeString($_POST["workflow_backend"]) . "'
                  WHERE
-                    prj_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    prj_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
-            Project::removeUserByProjects(array($HTTP_POST_VARS["id"]), $HTTP_POST_VARS["users"]);
-            for ($i = 0; $i < count($HTTP_POST_VARS["users"]); $i++) {
-                if ($HTTP_POST_VARS["users"][$i] == $HTTP_POST_VARS["lead_usr_id"]) {
-                    Project::associateUser($HTTP_POST_VARS["id"], $HTTP_POST_VARS["users"][$i], User::getRoleID("Manager"));
-                } elseif (User::getRoleByUser($HTTP_POST_VARS["users"][$i], $HTTP_POST_VARS["id"]) == '') {
+            Project::removeUserByProjects(array($_POST["id"]), $_POST["users"]);
+            for ($i = 0; $i < count($_POST["users"]); $i++) {
+                if ($_POST["users"][$i] == $_POST["lead_usr_id"]) {
+                    Project::associateUser($_POST["id"], $_POST["users"][$i], User::getRoleID("Manager"));
+                } elseif (User::getRoleByUser($_POST["users"][$i], $_POST["id"]) == '') {
                     // users who are now being associated with this project should be set to 'Standard User'
-                    Project::associateUser($HTTP_POST_VARS["id"], $HTTP_POST_VARS["users"][$i], User::getRoleID("Standard User"));
+                    Project::associateUser($_POST["id"], $_POST["users"][$i], User::getRoleID("Standard User"));
                 }
             }
-            $statuses = array_keys(Status::getAssocStatusList($HTTP_POST_VARS["id"]));
+            $statuses = array_keys(Status::getAssocStatusList($_POST["id"]));
             if (count($statuses) > 0) {
-                Status::removeProjectAssociations($statuses, $HTTP_POST_VARS["id"]);
+                Status::removeProjectAssociations($statuses, $_POST["id"]);
             }
-            foreach ($HTTP_POST_VARS['statuses'] as $sta_id) {
-                Status::addProjectAssociation($sta_id, $HTTP_POST_VARS["id"]);
+            foreach ($_POST['statuses'] as $sta_id) {
+                Status::addProjectAssociation($sta_id, $_POST["id"]);
             }
             return 1;
         }
@@ -532,9 +526,7 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "INSERT INTO
@@ -552,15 +544,15 @@
                     prj_workflow_backend
                  ) VALUES (
                     '" . Date_API::getCurrentDateGMT() . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["status"]) . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS["lead_usr_id"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS["initial_status"]) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS["outgoing_sender_name"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["outgoing_sender_email"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["remote_invocation"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["customer_backend"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["workflow_backend"]) . "'
+                    '" . Misc::escapeString($_POST["title"]) . "',
+                    '" . Misc::escapeString($_POST["status"]) . "',
+                    " . Misc::escapeInteger($_POST["lead_usr_id"]) . ",
+                    " . Misc::escapeInteger($_POST["initial_status"]) . ",
+                    '" . Misc::escapeString($_POST["outgoing_sender_name"]) . "',
+                    '" . Misc::escapeString($_POST["outgoing_sender_email"]) . "',
+                    '" . Misc::escapeString($_POST["remote_invocation"]) . "',
+                    '" . Misc::escapeString($_POST["customer_backend"]) . "',
+                    '" . Misc::escapeString($_POST["workflow_backend"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -568,15 +560,15 @@
             return -1;
         } else {
             $new_prj_id = $GLOBALS["db_api"]->get_last_insert_id();
-            for ($i = 0; $i < count($HTTP_POST_VARS["users"]); $i++) {
-                if ($HTTP_POST_VARS["users"][$i] == $HTTP_POST_VARS["lead_usr_id"]) {
+            for ($i = 0; $i < count($_POST["users"]); $i++) {
+                if ($_POST["users"][$i] == $_POST["lead_usr_id"]) {
                     $role_id = User::getRoleID("Manager");
                 } else {
                     $role_id = User::getRoleID("Standard User");
                 }
-                Project::associateUser($new_prj_id, $HTTP_POST_VARS["users"][$i], $role_id);
+                Project::associateUser($new_prj_id, $_POST["users"][$i], $role_id);
             }
-            foreach ($HTTP_POST_VARS['statuses'] as $sta_id) {
+            foreach ($_POST['statuses'] as $sta_id) {
                 Status::addProjectAssociation($sta_id, $new_prj_id);
             }
             Display_Column::setupNewProject($new_prj_id);
Index: include/class.reminder_condition.php
===================================================================
--- include/class.reminder_condition.php	(revision 3164)
+++ include/class.reminder_condition.php	(working copy)
@@ -74,8 +74,6 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "reminder_level_condition
                  (
@@ -87,11 +85,11 @@
                     rlc_comparison_rmf_id
                  ) VALUES (
                     '" . Date_API::getCurrentDateGMT() . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS['rma_id']) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS['field']) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS['operator']) . ",
-                    '" . Misc::escapeString(@$HTTP_POST_VARS['value']) . "',
-                    '" . Misc::escapeInteger(@$HTTP_POST_VARS['comparison_field']) . "'
+                    " . Misc::escapeInteger($_POST['rma_id']) . ",
+                    " . Misc::escapeInteger($_POST['field']) . ",
+                    " . Misc::escapeInteger($_POST['operator']) . ",
+                    '" . Misc::escapeString(@$_POST['value']) . "',
+                    '" . Misc::escapeInteger(@$_POST['comparison_field']) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -111,18 +109,16 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "reminder_level_condition
                  SET
                     rlc_last_updated_date='" . Date_API::getCurrentDateGMT() . "',
-                    rlc_rmf_id=" . Misc::escapeInteger($HTTP_POST_VARS['field']) . ",
-                    rlc_rmo_id=" . Misc::escapeInteger($HTTP_POST_VARS['operator']) . ",
-                    rlc_value='" . Misc::escapeString(@$HTTP_POST_VARS['value']) . "',
-                    rlc_comparison_rmf_id = '" . Misc::escapeInteger(@$HTTP_POST_VARS['comparison_field']) . "'
+                    rlc_rmf_id=" . Misc::escapeInteger($_POST['field']) . ",
+                    rlc_rmo_id=" . Misc::escapeInteger($_POST['operator']) . ",
+                    rlc_value='" . Misc::escapeString(@$_POST['value']) . "',
+                    rlc_comparison_rmf_id = '" . Misc::escapeInteger(@$_POST['comparison_field']) . "'
                  WHERE
-                    rlc_id=" . Misc::escapeInteger($HTTP_POST_VARS['id']);
+                    rlc_id=" . Misc::escapeInteger($_POST['id']);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -142,9 +138,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "reminder_level_condition
                  WHERE
Index: include/class.news.php
===================================================================
--- include/class.news.php	(revision 3164)
+++ include/class.news.php	(working copy)
@@ -111,12 +111,10 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
-        if (Validation::isWhitespace($HTTP_POST_VARS["message"])) {
+        if (Validation::isWhitespace($_POST["message"])) {
             return -3;
         }
         $stmt = "INSERT INTO
@@ -130,9 +128,9 @@
                  ) VALUES (
                     " . Auth::getUserID() . ",
                     '" . Date_API::getCurrentDateGMT() . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["message"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["status"]) . "'
+                    '" . Misc::escapeString($_POST["title"]) . "',
+                    '" . Misc::escapeString($_POST["message"]) . "',
+                    '" . Misc::escapeString($_POST["status"]) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -141,7 +139,7 @@
         } else {
             $new_news_id = $GLOBALS["db_api"]->get_last_insert_id();
             // now populate the project-news mapping table
-            foreach ($HTTP_POST_VARS['projects'] as $prj_id) {
+            foreach ($_POST['projects'] as $prj_id) {
                 News::addProjectAssociation($new_news_id, $prj_id);
             }
             return 1;
@@ -157,9 +155,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "news
                  WHERE
@@ -169,7 +165,7 @@
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return false;
         } else {
-            News::removeProjectAssociations($HTTP_POST_VARS['items']);
+            News::removeProjectAssociations($_POST['items']);
             return true;
         }
     }
@@ -215,31 +211,29 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
-        if (Validation::isWhitespace($HTTP_POST_VARS["message"])) {
+        if (Validation::isWhitespace($_POST["message"])) {
             return -3;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "news
                  SET
-                    nws_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    nws_message='" . Misc::escapeString($HTTP_POST_VARS["message"]) . "',
-                    nws_status='" . Misc::escapeString($HTTP_POST_VARS["status"]) . "'
+                    nws_title='" . Misc::escapeString($_POST["title"]) . "',
+                    nws_message='" . Misc::escapeString($_POST["message"]) . "',
+                    nws_status='" . Misc::escapeString($_POST["status"]) . "'
                  WHERE
-                    nws_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    nws_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
             // remove all of the associations with projects, then add them all again
-            News::removeProjectAssociations($HTTP_POST_VARS['id']);
-            foreach ($HTTP_POST_VARS['projects'] as $prj_id) {
-                News::addProjectAssociation($HTTP_POST_VARS['id'], $prj_id);
+            News::removeProjectAssociations($_POST['id']);
+            foreach ($_POST['projects'] as $prj_id) {
+                News::addProjectAssociation($_POST['id'], $prj_id);
             }
             return 1;
         }
@@ -364,4 +358,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included News Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.custom_field.php
===================================================================
--- include/class.custom_field.php	(revision 3164)
+++ include/class.custom_field.php	(working copy)
@@ -154,10 +154,8 @@
      */
     function updateValues()
     {
-        global $HTTP_POST_VARS;
-
         $prj_id = Auth::getCurrentProject();
-        $issue_id = Misc::escapeInteger($HTTP_POST_VARS["issue_id"]);
+        $issue_id = Misc::escapeInteger($_POST["issue_id"]);
 
         $old_values = Custom_Field::getValuesByIssue($prj_id, $issue_id);
 
@@ -168,7 +166,7 @@
                  FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "custom_field
                  WHERE
-                    fld_id IN (" . implode(", ", Misc::escapeInteger(@array_keys($HTTP_POST_VARS['custom_fields']))) . ")";
+                    fld_id IN (" . implode(", ", Misc::escapeInteger(@array_keys($_POST['custom_fields']))) . ")";
         $field_types = $GLOBALS["db_api"]->dbh->getAssoc($stmt);
 
         // get the titles for all of the custom fields being submitted
@@ -178,11 +176,11 @@
                  FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "custom_field
                  WHERE
-                    fld_id IN (" . implode(", ", Misc::escapeInteger(@array_keys($HTTP_POST_VARS['custom_fields']))) . ")";
+                    fld_id IN (" . implode(", ", Misc::escapeInteger(@array_keys($_POST['custom_fields']))) . ")";
         $field_titles = $GLOBALS["db_api"]->dbh->getAssoc($stmt);
 
         $updated_fields = array();
-        foreach ($HTTP_POST_VARS["custom_fields"] as $fld_id => $value) {
+        foreach ($_POST["custom_fields"] as $fld_id => $value) {
 
             $fld_id = Misc::escapeInteger($fld_id);
 
@@ -270,7 +268,7 @@
                     $updated_fields[$field_titles[$fld_id]] = History::formatChanges($icf_value, $value);
                 }
             } else {
-                $old_value = Custom_Field::getDisplayValue($HTTP_POST_VARS['issue_id'], $fld_id, true);
+                $old_value = Custom_Field::getDisplayValue($_POST['issue_id'], $fld_id, true);
 
                 if (!is_array($old_value)) {
                     $old_value = array($old_value);
@@ -280,21 +278,21 @@
                 }
                 if ((count(array_diff($old_value, $value)) > 0) || (count(array_diff($value, $old_value)) > 0)) {
 
-                    $old_display_value = Custom_Field::getDisplayValue($HTTP_POST_VARS['issue_id'], $fld_id);
+                    $old_display_value = Custom_Field::getDisplayValue($_POST['issue_id'], $fld_id);
                     // need to remove all associated options from issue_custom_field and then
                     // add the selected options coming from the form
-                    Custom_Field::removeIssueAssociation($fld_id, $HTTP_POST_VARS["issue_id"]);
+                    Custom_Field::removeIssueAssociation($fld_id, $_POST["issue_id"]);
                     if (@count($value) > 0) {
-                        Custom_Field::associateIssue($HTTP_POST_VARS["issue_id"], $fld_id, $value);
+                        Custom_Field::associateIssue($_POST["issue_id"], $fld_id, $value);
                     }
-                    $new_display_value = Custom_Field::getDisplayValue($HTTP_POST_VARS['issue_id'], $fld_id);
+                    $new_display_value = Custom_Field::getDisplayValue($_POST['issue_id'], $fld_id);
                     $updated_fields[$field_titles[$fld_id]] = History::formatChanges($old_display_value, $new_display_value);
                 }
             }
         }
 
         Workflow::handleCustomFieldsUpdated($prj_id, $issue_id, $old_values, Custom_Field::getValuesByIssue($prj_id, $issue_id));
-        Issue::markAsUpdated($HTTP_POST_VARS["issue_id"]);
+        Issue::markAsUpdated($_POST["issue_id"]);
         // need to save a history entry for this
 
         if (count($updated_fields) > 0) {
@@ -312,7 +310,7 @@
                 }
                 $i++;
             }
-            History::add($HTTP_POST_VARS["issue_id"], Auth::getUserID(), History::getTypeID('custom_field_updated'), ev_gettext('Custom field updated (%1$s) by %2$s', $changes, User::getFullName(Auth::getUserID())));
+            History::add($_POST["issue_id"], Auth::getUserID(), History::getTypeID('custom_field_updated'), ev_gettext('Custom field updated (%1$s) by %2$s', $changes, User::getFullName(Auth::getUserID())));
         }
         return 1;
     }
@@ -657,9 +655,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "custom_field
                  WHERE
@@ -712,28 +708,26 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (empty($HTTP_POST_VARS["report_form"])) {
-            $HTTP_POST_VARS["report_form"] = 0;
+        if (empty($_POST["report_form"])) {
+            $_POST["report_form"] = 0;
         }
-        if (empty($HTTP_POST_VARS["report_form_required"])) {
-            $HTTP_POST_VARS["report_form_required"] = 0;
+        if (empty($_POST["report_form_required"])) {
+            $_POST["report_form_required"] = 0;
         }
-        if (empty($HTTP_POST_VARS["anon_form"])) {
-            $HTTP_POST_VARS["anon_form"] = 0;
+        if (empty($_POST["anon_form"])) {
+            $_POST["anon_form"] = 0;
         }
-        if (empty($HTTP_POST_VARS["anon_form_required"])) {
-            $HTTP_POST_VARS["anon_form_required"] = 0;
+        if (empty($_POST["anon_form_required"])) {
+            $_POST["anon_form_required"] = 0;
         }
-        if (empty($HTTP_POST_VARS["list_display"])) {
-            $HTTP_POST_VARS["list_display"] = 0;
+        if (empty($_POST["list_display"])) {
+            $_POST["list_display"] = 0;
         }
-        if (empty($HTTP_POST_VARS["min_role"])) {
-            $HTTP_POST_VARS["min_role"] = 1;
+        if (empty($_POST["min_role"])) {
+            $_POST["min_role"] = 1;
         }
-        if (!isset($HTTP_POST_VARS["rank"])) {
-            $HTTP_POST_VARS["rank"] = (Custom_Field::getMaxRank() + 1);
+        if (!isset($_POST["rank"])) {
+            $_POST["rank"] = (Custom_Field::getMaxRank() + 1);
         }
         $stmt = "INSERT INTO
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "custom_field
@@ -750,17 +744,17 @@
                     fld_rank,
                     fld_backend
                  ) VALUES (
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["description"]) . "',
-                    '" . Misc::escapeString($HTTP_POST_VARS["field_type"]) . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS["report_form"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS["report_form_required"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS["anon_form"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS["anon_form_required"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS["list_display"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS["min_role"]) . ",
-                    " . Misc::escapeInteger($HTTP_POST_VARS['rank']) . ",
-                    '" . Misc::escapeString(@$HTTP_POST_VARS['custom_field_backend']) . "'
+                    '" . Misc::escapeString($_POST["title"]) . "',
+                    '" . Misc::escapeString($_POST["description"]) . "',
+                    '" . Misc::escapeString($_POST["field_type"]) . "',
+                    " . Misc::escapeInteger($_POST["report_form"]) . ",
+                    " . Misc::escapeInteger($_POST["report_form_required"]) . ",
+                    " . Misc::escapeInteger($_POST["anon_form"]) . ",
+                    " . Misc::escapeInteger($_POST["anon_form_required"]) . ",
+                    " . Misc::escapeInteger($_POST["list_display"]) . ",
+                    " . Misc::escapeInteger($_POST["min_role"]) . ",
+                    " . Misc::escapeInteger($_POST['rank']) . ",
+                    '" . Misc::escapeString(@$_POST['custom_field_backend']) . "'
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -768,15 +762,15 @@
             return -1;
         } else {
             $new_id = $GLOBALS["db_api"]->get_last_insert_id();
-            if (($HTTP_POST_VARS["field_type"] == 'combo') || ($HTTP_POST_VARS["field_type"] == 'multiple')) {
-                foreach ($HTTP_POST_VARS["field_options"] as $option_value) {
+            if (($_POST["field_type"] == 'combo') || ($_POST["field_type"] == 'multiple')) {
+                foreach ($_POST["field_options"] as $option_value) {
                     $params = Custom_Field::parseParameters($option_value);
                     Custom_Field::addOptions($new_id, $params["value"]);
                 }
             }
             // add the project associations!
-            for ($i = 0; $i < count($HTTP_POST_VARS["projects"]); $i++) {
-                Custom_Field::associateProject($HTTP_POST_VARS["projects"][$i], $new_id);
+            for ($i = 0; $i < count($_POST["projects"]); $i++) {
+                Custom_Field::associateProject($_POST["projects"][$i], $new_id);
             }
             return 1;
         }
@@ -1012,79 +1006,77 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (empty($HTTP_POST_VARS["report_form"])) {
-            $HTTP_POST_VARS["report_form"] = 0;
+        if (empty($_POST["report_form"])) {
+            $_POST["report_form"] = 0;
         }
-        if (empty($HTTP_POST_VARS["report_form_required"])) {
-            $HTTP_POST_VARS["report_form_required"] = 0;
+        if (empty($_POST["report_form_required"])) {
+            $_POST["report_form_required"] = 0;
         }
-        if (empty($HTTP_POST_VARS["anon_form"])) {
-            $HTTP_POST_VARS["anon_form"] = 0;
+        if (empty($_POST["anon_form"])) {
+            $_POST["anon_form"] = 0;
         }
-        if (empty($HTTP_POST_VARS["anon_form_required"])) {
-            $HTTP_POST_VARS["anon_form_required"] = 0;
+        if (empty($_POST["anon_form_required"])) {
+            $_POST["anon_form_required"] = 0;
         }
-        if (empty($HTTP_POST_VARS["list_display"])) {
-            $HTTP_POST_VARS["list_display"] = 0;
+        if (empty($_POST["list_display"])) {
+            $_POST["list_display"] = 0;
         }
-        if (empty($HTTP_POST_VARS["min_role"])) {
-            $HTTP_POST_VARS["min_role"] = 1;
+        if (empty($_POST["min_role"])) {
+            $_POST["min_role"] = 1;
         }
-        if (!isset($HTTP_POST_VARS["rank"])) {
-            $HTTP_POST_VARS["rank"] = (Custom_Field::getMaxRank() + 1);
+        if (!isset($_POST["rank"])) {
+            $_POST["rank"] = (Custom_Field::getMaxRank() + 1);
         }
-        $old_details = Custom_Field::getDetails($HTTP_POST_VARS["id"]);
+        $old_details = Custom_Field::getDetails($_POST["id"]);
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "custom_field
                  SET
-                    fld_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    fld_description='" . Misc::escapeString($HTTP_POST_VARS["description"]) . "',
-                    fld_type='" . Misc::escapeString($HTTP_POST_VARS["field_type"]) . "',
-                    fld_report_form=" . Misc::escapeInteger($HTTP_POST_VARS["report_form"]) . ",
-                    fld_report_form_required=" . Misc::escapeInteger($HTTP_POST_VARS["report_form_required"]) . ",
-                    fld_anonymous_form=" . Misc::escapeInteger($HTTP_POST_VARS["anon_form"]) . ",
-                    fld_anonymous_form_required=" . Misc::escapeInteger($HTTP_POST_VARS["anon_form_required"]) . ",
-                    fld_list_display=" . Misc::escapeInteger($HTTP_POST_VARS["list_display"]) . ",
-                    fld_min_role=" . Misc::escapeInteger($HTTP_POST_VARS['min_role']) . ",
-                    fld_rank = " . Misc::escapeInteger($HTTP_POST_VARS['rank']) . ",
-                    fld_backend = '" . Misc::escapeString(@$HTTP_POST_VARS['custom_field_backend']) . "'
+                    fld_title='" . Misc::escapeString($_POST["title"]) . "',
+                    fld_description='" . Misc::escapeString($_POST["description"]) . "',
+                    fld_type='" . Misc::escapeString($_POST["field_type"]) . "',
+                    fld_report_form=" . Misc::escapeInteger($_POST["report_form"]) . ",
+                    fld_report_form_required=" . Misc::escapeInteger($_POST["report_form_required"]) . ",
+                    fld_anonymous_form=" . Misc::escapeInteger($_POST["anon_form"]) . ",
+                    fld_anonymous_form_required=" . Misc::escapeInteger($_POST["anon_form_required"]) . ",
+                    fld_list_display=" . Misc::escapeInteger($_POST["list_display"]) . ",
+                    fld_min_role=" . Misc::escapeInteger($_POST['min_role']) . ",
+                    fld_rank = " . Misc::escapeInteger($_POST['rank']) . ",
+                    fld_backend = '" . Misc::escapeString(@$_POST['custom_field_backend']) . "'
                  WHERE
-                    fld_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    fld_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
             return -1;
         } else {
             // if the current custom field is a combo box, get all of the current options
-            if (in_array($HTTP_POST_VARS["field_type"], array('combo', 'multiple'))) {
+            if (in_array($_POST["field_type"], array('combo', 'multiple'))) {
                 $stmt = "SELECT
                             cfo_id
                          FROM
                             " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "custom_field_option
                          WHERE
-                            cfo_fld_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                            cfo_fld_id=" . Misc::escapeInteger($_POST["id"]);
                 $current_options = $GLOBALS["db_api"]->dbh->getCol($stmt);
             }
             // gotta remove all custom field options if the field is being changed from a combo box to a text field
-            if (($old_details["fld_type"] != $HTTP_POST_VARS["field_type"]) &&
+            if (($old_details["fld_type"] != $_POST["field_type"]) &&
                       (!in_array($old_details['fld_type'], array('text', 'textarea'))) &&
-                      (!in_array($HTTP_POST_VARS["field_type"], array('combo', 'multiple')))) {
-                Custom_Field::removeOptionsByFields($HTTP_POST_VARS["id"]);
+                      (!in_array($_POST["field_type"], array('combo', 'multiple')))) {
+                Custom_Field::removeOptionsByFields($_POST["id"]);
             }
             // update the custom field options, if any
-            if (($HTTP_POST_VARS["field_type"] == "combo") || ($HTTP_POST_VARS["field_type"] == "multiple")) {
+            if (($_POST["field_type"] == "combo") || ($_POST["field_type"] == "multiple")) {
                 $updated_options = array();
-                if (empty($HTTP_POST_VARS['custom_field_backend'])) {
-                    foreach ($HTTP_POST_VARS["field_options"] as $option_value) {
+                if (empty($_POST['custom_field_backend'])) {
+                    foreach ($_POST["field_options"] as $option_value) {
                         $params = Custom_Field::parseParameters($option_value);
                         if ($params["type"] == 'new') {
-                            Custom_Field::addOptions($HTTP_POST_VARS["id"], $params["value"]);
+                            Custom_Field::addOptions($_POST["id"], $params["value"]);
                         } else {
                             $updated_options[] = $params["id"];
                             // check if the user is trying to update the value of this option
-                            if ($params["value"] != Custom_Field::getOptionValue($HTTP_POST_VARS["id"], $params["id"])) {
+                            if ($params["value"] != Custom_Field::getOptionValue($_POST["id"], $params["id"])) {
                                 Custom_Field::updateOption($params["id"], $params["value"]);
                             }
                         }
@@ -1093,34 +1085,34 @@
             }
             // get the diff between the current options and the ones posted by the form
             // and then remove the options not found in the form submissions
-            if (in_array($HTTP_POST_VARS["field_type"], array('combo', 'multiple'))) {
+            if (in_array($_POST["field_type"], array('combo', 'multiple'))) {
                 $diff_ids = @array_diff($current_options, $updated_options);
                 if (@count($diff_ids) > 0) {
-                    Custom_Field::removeOptions($HTTP_POST_VARS['id'], array_values($diff_ids));
+                    Custom_Field::removeOptions($_POST['id'], array_values($diff_ids));
                 }
             }
             // now we need to check for any changes in the project association of this custom field
             // and update the mapping table accordingly
-            $old_proj_ids = @array_keys(Custom_Field::getAssociatedProjects($HTTP_POST_VARS["id"]));
+            $old_proj_ids = @array_keys(Custom_Field::getAssociatedProjects($_POST["id"]));
             // COMPAT: this next line requires PHP > 4.0.4
-            $diff_ids = array_diff($old_proj_ids, $HTTP_POST_VARS["projects"]);
+            $diff_ids = array_diff($old_proj_ids, $_POST["projects"]);
             if (count($diff_ids) > 0) {
                 foreach ($diff_ids as $removed_prj_id) {
-                    Custom_Field::removeIssueAssociation($HTTP_POST_VARS["id"], false, $removed_prj_id );
+                    Custom_Field::removeIssueAssociation($_POST["id"], false, $removed_prj_id );
                 }
             }
             // update the project associations now
             $stmt = "DELETE FROM
                         " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_custom_field
                      WHERE
-                        pcf_fld_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                        pcf_fld_id=" . Misc::escapeInteger($_POST["id"]);
             $res = $GLOBALS["db_api"]->dbh->query($stmt);
             if (PEAR::isError($res)) {
                 Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
                 return -1;
             } else {
-                for ($i = 0; $i < count($HTTP_POST_VARS["projects"]); $i++) {
-                    Custom_Field::associateProject($HTTP_POST_VARS["projects"][$i], $HTTP_POST_VARS["id"]);
+                for ($i = 0; $i < count($_POST["projects"]); $i++) {
+                    Custom_Field::associateProject($_POST["projects"][$i], $_POST["id"]);
                 }
             }
             return 1;
Index: include/class.priority.php
===================================================================
--- include/class.priority.php	(revision 3164)
+++ include/class.priority.php	(working copy)
@@ -182,9 +182,7 @@
      */
     function remove()
     {
-        global $HTTP_POST_VARS;
-
-        $items = @implode(", ", Misc::escapeInteger($HTTP_POST_VARS["items"]));
+        $items = @implode(", ", Misc::escapeInteger($_POST["items"]));
         $stmt = "DELETE FROM
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_priority
                  WHERE
@@ -209,19 +207,17 @@
      */
     function update()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "UPDATE
                     " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "project_priority
                  SET
-                    pri_title='" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    pri_rank=" . Misc::escapeInteger($HTTP_POST_VARS['rank']) . "
+                    pri_title='" . Misc::escapeString($_POST["title"]) . "',
+                    pri_rank=" . Misc::escapeInteger($_POST['rank']) . "
                  WHERE
-                    pri_prj_id=" . Misc::escapeInteger($HTTP_POST_VARS["prj_id"]) . " AND
-                    pri_id=" . Misc::escapeInteger($HTTP_POST_VARS["id"]);
+                    pri_prj_id=" . Misc::escapeInteger($_POST["prj_id"]) . " AND
+                    pri_id=" . Misc::escapeInteger($_POST["id"]);
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
             Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);
@@ -240,9 +236,7 @@
      */
     function insert()
     {
-        global $HTTP_POST_VARS;
-
-        if (Validation::isWhitespace($HTTP_POST_VARS["title"])) {
+        if (Validation::isWhitespace($_POST["title"])) {
             return -2;
         }
         $stmt = "INSERT INTO
@@ -252,9 +246,9 @@
                     pri_title,
                     pri_rank
                  ) VALUES (
-                    " . Misc::escapeInteger($HTTP_POST_VARS["prj_id"]) . ",
-                    '" . Misc::escapeString($HTTP_POST_VARS["title"]) . "',
-                    " . Misc::escapeInteger($HTTP_POST_VARS['rank']) . "
+                    " . Misc::escapeInteger($_POST["prj_id"]) . ",
+                    '" . Misc::escapeString($_POST["title"]) . "',
+                    " . Misc::escapeInteger($_POST['rank']) . "
                  )";
         $res = $GLOBALS["db_api"]->dbh->query($stmt);
         if (PEAR::isError($res)) {
@@ -361,4 +355,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Priority Class');
 }
-?>
\ No newline at end of file
+?>
Index: include/class.session.php
===================================================================
--- include/class.session.php	(revision 3164)
+++ include/class.session.php	(working copy)
@@ -50,8 +50,8 @@
      */
     function set($name, $var)
     {
-        GLOBAL $HTTP_SESSION_VARS;
-        $HTTP_SESSION_VARS[$name] = $var;
+        GLOBAL $_SESSION;
+        $_SESSION[$name] = $var;
     }
     
     
@@ -64,8 +64,8 @@
      */
     function get($name)
     {
-        GLOBAL $HTTP_SESSION_VARS;
-        return @$HTTP_SESSION_VARS[$name];
+        GLOBAL $_SESSION;
+        return @$_SESSION[$name];
     }
     
     
@@ -78,8 +78,8 @@
      */
     function is_set($name)
     {
-        GLOBAL $HTTP_SESSION_VARS;
-        return isset($HTTP_SESSION_VARS[$name]);
+        GLOBAL $_SESSION;
+        return isset($_SESSION[$name]);
     }
 
 
Index: popup.php
===================================================================
--- popup.php	(revision 3164)
+++ popup.php	(working copy)
@@ -54,72 +54,72 @@
 $usr_id = Auth::getUserID();
 $prj_id = Auth::getCurrentProject();
 
-if (@$HTTP_GET_VARS["cat"] == "delete_note") {
-    $res = Note::remove($HTTP_GET_VARS["id"]);
+if (@$_GET["cat"] == "delete_note") {
+    $res = Note::remove($_GET["id"]);
     $tpl->assign("note_delete_result", $res);
-} elseif (@$HTTP_GET_VARS["cat"] == "delete_time") {
-    $res = Time_Tracking::removeEntry($HTTP_GET_VARS["id"], $usr_id);
+} elseif (@$_GET["cat"] == "delete_time") {
+    $res = Time_Tracking::removeEntry($_GET["id"], $usr_id);
     $tpl->assign("time_delete_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "bulk_update") {
+} elseif (@$_POST["cat"] == "bulk_update") {
     $res = Issue::bulkUpdate();
     $tpl->assign("bulk_update_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "set_initial_impact") {
-    $res = Issue::setImpactAnalysis($HTTP_POST_VARS["issue_id"]);
+} elseif (@$_POST["cat"] == "set_initial_impact") {
+    $res = Issue::setImpactAnalysis($_POST["issue_id"]);
     $tpl->assign("set_initial_impact_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "add_requirement") {
-    $res = Impact_Analysis::insert($HTTP_POST_VARS["issue_id"]);
+} elseif (@$_POST["cat"] == "add_requirement") {
+    $res = Impact_Analysis::insert($_POST["issue_id"]);
     $tpl->assign("add_requirement_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "set_impact_requirement") {
-    $res = Impact_Analysis::update($HTTP_POST_VARS["isr_id"]);
+} elseif (@$_POST["cat"] == "set_impact_requirement") {
+    $res = Impact_Analysis::update($_POST["isr_id"]);
     $tpl->assign("set_impact_requirement_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "delete_requirement") {
+} elseif (@$_POST["cat"] == "delete_requirement") {
     $res = Impact_Analysis::remove();
     $tpl->assign("requirement_delete_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "save_filter") {
+} elseif (@$_POST["cat"] == "save_filter") {
     $res = Filter::save();
     $tpl->assign("save_filter_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "delete_filter") {
+} elseif (@$_POST["cat"] == "delete_filter") {
     $res = Filter::remove();
     $tpl->assign("delete_filter_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "remove_support_email") {
+} elseif (@$_POST["cat"] == "remove_support_email") {
     $res = Support::removeAssociation();
     $tpl->assign("remove_association_result", $res);
-} elseif (@$HTTP_GET_VARS["cat"] == "delete_attachment") {
-    $res = Attachment::remove($HTTP_GET_VARS["id"]);
+} elseif (@$_GET["cat"] == "delete_attachment") {
+    $res = Attachment::remove($_GET["id"]);
     $tpl->assign("remove_attachment_result", $res);
-} elseif (@$HTTP_GET_VARS["cat"] == "delete_file") {
-    $res = Attachment::removeIndividualFile($HTTP_GET_VARS["id"]);
+} elseif (@$_GET["cat"] == "delete_file") {
+    $res = Attachment::removeIndividualFile($_GET["id"]);
     $tpl->assign("remove_file_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "remove_checkin") {
+} elseif (@$_POST["cat"] == "remove_checkin") {
     $res = SCM::remove();
     $tpl->assign("remove_checkin_result", $res);
-} elseif (@$HTTP_GET_VARS['cat'] == 'unassign') {
-    $res = Issue::deleteUserAssociation($HTTP_GET_VARS["iss_id"], $usr_id);
-    Workflow::handleAssignmentChange($prj_id, $HTTP_GET_VARS["iss_id"], Auth::getUserID(), Issue::getDetails($HTTP_GET_VARS["iss_id"]), Issue::getAssignedUserIDs($HTTP_GET_VARS["iss_id"]));
+} elseif (@$_GET['cat'] == 'unassign') {
+    $res = Issue::deleteUserAssociation($_GET["iss_id"], $usr_id);
+    Workflow::handleAssignmentChange($prj_id, $_GET["iss_id"], Auth::getUserID(), Issue::getDetails($_GET["iss_id"]), Issue::getAssignedUserIDs($_GET["iss_id"]));
     $tpl->assign('unassign_result', $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "remove_email") {
+} elseif (@$_POST["cat"] == "remove_email") {
     $res = Support::removeEmails();
     $tpl->assign("remove_email_result", $res);
-} elseif (@$HTTP_GET_VARS["cat"] == "clear_duplicate") {
-    $res = Issue::clearDuplicateStatus($HTTP_GET_VARS["iss_id"]);
+} elseif (@$_GET["cat"] == "clear_duplicate") {
+    $res = Issue::clearDuplicateStatus($_GET["iss_id"]);
     $tpl->assign("clear_duplicate_result", $res);
-} elseif (@$HTTP_GET_VARS["cat"] == "delete_phone") {
-    $res = Phone_Support::remove($HTTP_GET_VARS["id"]);
+} elseif (@$_GET["cat"] == "delete_phone") {
+    $res = Phone_Support::remove($_GET["id"]);
     $tpl->assign("delete_phone_result", $res);
-} elseif (@$HTTP_GET_VARS["cat"] == "new_status") {
+} elseif (@$_GET["cat"] == "new_status") {
     // XXX: need to call the workflow api in the following function?
-    $res = Issue::setStatus($HTTP_GET_VARS["iss_id"], $HTTP_GET_VARS["new_sta_id"], true);
+    $res = Issue::setStatus($_GET["iss_id"], $_GET["new_sta_id"], true);
     if ($res == 1) {
-        History::add($HTTP_GET_VARS["iss_id"], $usr_id, History::getTypeID('status_changed'), 
-                "Issue manually set to status '" . Status::getStatusTitle($HTTP_GET_VARS["new_sta_id"]) . "' by " . User::getFullName($usr_id));
+        History::add($_GET["iss_id"], $usr_id, History::getTypeID('status_changed'), 
+                "Issue manually set to status '" . Status::getStatusTitle($_GET["new_sta_id"]) . "' by " . User::getFullName($usr_id));
     }
     $tpl->assign("new_status_result", $res);
-} elseif (@$HTTP_GET_VARS['cat'] == 'authorize_reply') {
-    $res = Authorized_Replier::addUser($HTTP_GET_VARS["iss_id"], $usr_id);
+} elseif (@$_GET['cat'] == 'authorize_reply') {
+    $res = Authorized_Replier::addUser($_GET["iss_id"], $usr_id);
     $tpl->assign('authorize_reply_result', $res);
-} elseif (@$HTTP_GET_VARS['cat'] == 'remove_quarantine') {
+} elseif (@$_GET['cat'] == 'remove_quarantine') {
     if (Auth::getCurrentRole() > User::getRoleID('Developer')) {
-        $res = Issue::setQuarantine($HTTP_GET_VARS['iss_id'], 0);
+        $res = Issue::setQuarantine($_GET['iss_id'], 0);
         $tpl->assign('remove_quarantine_result', $res);
     }
 }
Index: misc/scm/process_cvs_commits.php
===================================================================
--- misc/scm/process_cvs_commits.php	(revision 3164)
+++ misc/scm/process_cvs_commits.php	(working copy)
@@ -53,18 +53,18 @@
 }
 
 if (isset($_SERVER)) {
-    $HTTP_SERVER_VARS = $_SERVER;
+    $_SERVER = $_SERVER;
 }
 
 $input = getInput();
 
 // remove the first element which is the name of this script
-array_shift($HTTP_SERVER_VARS['argv']);
+array_shift($_SERVER['argv']);
 
 // save who is committing these changes
-$username = array_shift($HTTP_SERVER_VARS['argv']);
+$username = array_shift($_SERVER['argv']);
 // save what the name of the module is
-$cvs_arguments = array_shift($HTTP_SERVER_VARS['argv']);
+$cvs_arguments = array_shift($_SERVER['argv']);
 $pieces = explode(' ', $cvs_arguments);
 $cvs_module = array_shift($pieces);
 
Index: misc/cli/include/class.command_line.php
===================================================================
--- misc/cli/include/class.command_line.php	(revision 3164)
+++ misc/cli/include/class.command_line.php	(working copy)
@@ -1574,10 +1574,8 @@
      */
     function isSafeExecution()
     {
-        global $HTTP_SERVER_VARS;
-
-        if ($HTTP_SERVER_VARS['argv'][count($HTTP_SERVER_VARS['argv'])-1] == '--safe') {
-            unset($HTTP_SERVER_VARS['argv'][count($HTTP_SERVER_VARS['argv'])-1]);
+        if ($_SERVER['argv'][count($_SERVER['argv'])-1] == '--safe') {
+            unset($_SERVER['argv'][count($_SERVER['argv'])-1]);
             return true;
         } else {
             return false;
@@ -1747,4 +1745,4 @@
 if (APP_BENCHMARK) {
     $GLOBALS['bench']->setMarker('Included Command_Line Class');
 }
-?>
\ No newline at end of file
+?>
Index: misc/cli/config.inc.php
===================================================================
--- misc/cli/config.inc.php	(revision 3164)
+++ misc/cli/config.inc.php	(working copy)
@@ -32,16 +32,16 @@
 @set_time_limit(0);
 
 if (isset($_GET)) {
-    $HTTP_POST_VARS = $_POST;
-    $HTTP_GET_VARS = $_GET;
-    $HTTP_SERVER_VARS = $_SERVER;
-    $HTTP_ENV_VARS = $_ENV;
-    $HTTP_POST_FILES = $_FILES;
+    $_POST = $_POST;
+    $_GET = $_GET;
+    $_SERVER = $_SERVER;
+    $_ENV = $_ENV;
+    $_FILES = $_FILES;
     // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global...
     if (isset($_SESSION)) {
-        $HTTP_SESSION_VARS = $_SESSION;
+        $_SESSION = $_SESSION;
     }
-    $HTTP_COOKIE_VARS = $_COOKIE;
+    $_COOKIE = $_COOKIE;
 }
 
 // definitions of path related variables
Index: misc/cli/eventum
===================================================================
--- misc/cli/eventum	(revision 3164)
+++ misc/cli/eventum	(working copy)
@@ -23,11 +23,11 @@
     $relative_url = '/';
 }
 
-if (count($HTTP_SERVER_VARS['argv']) == 1) {
+if (count($_SERVER['argv']) == 1) {
     Command_Line::quit("Requirement argument not found");
 }
 // show usage information if user gave --help
-if (($HTTP_SERVER_VARS['argv'][1] == '--help') || ($HTTP_SERVER_VARS['argv'][1] == 'help')) {
+if (($_SERVER['argv'][1] == '--help') || ($_SERVER['argv'][1] == 'help')) {
     Command_Line::usage(__FILE__);
 }
 
@@ -42,42 +42,42 @@
 $auth = array($user_email, $user_password);
 
 // log command
-Command_Line::log($client, $auth, join(" ", $HTTP_SERVER_VARS['argv']));
+Command_Line::log($client, $auth, join(" ", $_SERVER['argv']));
 
-$issue_id = (integer) $HTTP_SERVER_VARS['argv'][1];
+$issue_id = (integer) $_SERVER['argv'][1];
 if ($issue_id > 0) {
-    if (count($HTTP_SERVER_VARS['argv']) == 2) {
+    if (count($_SERVER['argv']) == 2) {
         Command_Line::printIssueDetails($client, $auth, $issue_id);
     } else {
         if ($should_confirm) {
-            Command_Line::promptConfirmation($client, $auth, $issue_id, @$HTTP_SERVER_VARS['argv']);
+            Command_Line::promptConfirmation($client, $auth, $issue_id, @$_SERVER['argv']);
         }
-        switch ($HTTP_SERVER_VARS['argv'][2]) {
+        switch ($_SERVER['argv'][2]) {
             case 'assign':
-                if (count($HTTP_SERVER_VARS['argv']) == 3) {
+                if (count($_SERVER['argv']) == 3) {
                     Command_Line::quit("Missing parameter for the developer");
                 }
-                Command_Line::assignIssue($client, $auth, $issue_id, $HTTP_SERVER_VARS['argv'][3]);
+                Command_Line::assignIssue($client, $auth, $issue_id, $_SERVER['argv'][3]);
                 break;
             case 'add-replier':
             case 'ar':
                 // adds a user to the list of authorized repliers
-                if (count($HTTP_SERVER_VARS['argv']) == 3) {
+                if (count($_SERVER['argv']) == 3) {
                     Command_Line::quit("Missing parameter for the developer");
                 }
-                Command_Line::addAuthorizedReplier($client, $auth, $issue_id, $HTTP_SERVER_VARS['argv'][3]);
+                Command_Line::addAuthorizedReplier($client, $auth, $issue_id, $_SERVER['argv'][3]);
                 break;
             case 'set-status':
-                if (count($HTTP_SERVER_VARS['argv']) == 3) {
+                if (count($_SERVER['argv']) == 3) {
                     Command_Line::quit("Missing parameter for the status");
                 }
-                Command_Line::setIssueStatus($client, $auth, $issue_id, $HTTP_SERVER_VARS['argv'][3]);
+                Command_Line::setIssueStatus($client, $auth, $issue_id, $_SERVER['argv'][3]);
                 break;
             case 'add-time':
-                if (count($HTTP_SERVER_VARS['argv']) == 3) {
+                if (count($_SERVER['argv']) == 3) {
                     Command_Line::quit("Missing parameter for time worked");
                 }
-                $check = (integer) $HTTP_SERVER_VARS['argv'][3];
+                $check = (integer) $_SERVER['argv'][3];
                 if ($check == 0) {
                     Command_Line::quit("Third argument to command 'add-time' should be a number");
                 }
@@ -89,10 +89,10 @@
                 break;
             case 'get-file':
             case 'gf':
-                if (count($HTTP_SERVER_VARS['argv']) == 3) {
+                if (count($_SERVER['argv']) == 3) {
                     Command_Line::quit("Missing parameter for the file number");
                 }
-                Command_Line::getFile($client, $auth, $issue_id, $HTTP_SERVER_VARS['argv'][3]);
+                Command_Line::getFile($client, $auth, $issue_id, $_SERVER['argv'][3]);
                 break;
             case 'close':
                 Command_Line::closeIssue($client, $auth, $issue_id);
@@ -107,15 +107,15 @@
             case 'get-email':
             case 'ge':
                 // views an email
-                if (count($HTTP_SERVER_VARS['argv']) == 3) {
+                if (count($_SERVER['argv']) == 3) {
                     Command_Line::quit("Missing parameter for the email number");
                 }
-                if (@$HTTP_SERVER_VARS['argv'][4] == "--full") {
+                if (@$_SERVER['argv'][4] == "--full") {
                     $full = true;
                 } else {
                     $full = false;
                 }
-                Command_Line::printEmail($client, $auth, $issue_id, $HTTP_SERVER_VARS['argv'][3], $full);
+                Command_Line::printEmail($client, $auth, $issue_id, $_SERVER['argv'][3], $full);
                 break;
 
             // note related commands
@@ -127,26 +127,26 @@
             case 'get-note':
             case 'gn':
                 // view a note
-                if (count($HTTP_SERVER_VARS['argv']) == 3) {
+                if (count($_SERVER['argv']) == 3) {
                     Command_Line::quit("Missing parameter for the note number");
                 }
-                Command_Line::printNote($client, $auth, $issue_id, $HTTP_SERVER_VARS['argv'][3]);
+                Command_Line::printNote($client, $auth, $issue_id, $_SERVER['argv'][3]);
                 break;
             case 'convert-note':
             case 'cn':
                 // convert a note to an email
-                if (empty($HTTP_SERVER_VARS['argv'][3])) {
+                if (empty($_SERVER['argv'][3])) {
                     Command_Line::quit("Missing parameter for the note number");
                 }
-                if (@$HTTP_SERVER_VARS['argv'][4] != 'draft' && @$HTTP_SERVER_VARS['argv'][4] != 'email' ) {
+                if (@$_SERVER['argv'][4] != 'draft' && @$_SERVER['argv'][4] != 'email' ) {
                     Command_Line::quit("4th parameter must be 'draft' or 'email'");
                 }
-                if (@$HTTP_SERVER_VARS['argv'][5] == 'authorize') {
+                if (@$_SERVER['argv'][5] == 'authorize') {
                     $authorize_sender = true;
                 } else {
                     $authorize_sender = false;
                 }
-                Command_Line::convertNote($client, $auth, $issue_id, $HTTP_SERVER_VARS['argv'][3], $HTTP_SERVER_VARS['argv'][4], $authorize_sender);
+                Command_Line::convertNote($client, $auth, $issue_id, $_SERVER['argv'][3], $_SERVER['argv'][4], $authorize_sender);
                 break;
 
             // draft related commands
@@ -158,18 +158,18 @@
             case 'get-draft':
             case 'gd':
                 // viewing a draft
-                if (count($HTTP_SERVER_VARS['argv']) == 3) {
+                if (count($_SERVER['argv']) == 3) {
                     Command_Line::quit("Missing parameter for the draft number");
                 }
-                Command_Line::printDraft($client, $auth, $issue_id, $HTTP_SERVER_VARS['argv'][3]);
+                Command_Line::printDraft($client, $auth, $issue_id, $_SERVER['argv'][3]);
                 break;
             case 'send-draft':
             case 'sd':
                 // viewing a draft
-                if (count($HTTP_SERVER_VARS['argv']) == 3) {
+                if (count($_SERVER['argv']) == 3) {
                     Command_Line::quit("Missing parameter for the draft number");
                 }
-                Command_Line::sendDraft($client, $auth, $issue_id, $HTTP_SERVER_VARS['argv'][3]);
+                Command_Line::sendDraft($client, $auth, $issue_id, $_SERVER['argv'][3]);
                 break;
 
             case 'redeem':
@@ -183,59 +183,59 @@
                 break;
 
             default:
-                Command_Line::quit("Unknown command '" . $HTTP_SERVER_VARS['argv'][2] . "'");
+                Command_Line::quit("Unknown command '" . $_SERVER['argv'][2] . "'");
         }
     }
 } else {
-    if ($HTTP_SERVER_VARS['argv'][1] == 'developers') {
+    if ($_SERVER['argv'][1] == 'developers') {
         Command_Line::printDeveloperList($client, $auth);
-    } elseif ($HTTP_SERVER_VARS['argv'][1] == 'open-issues') {
-        if (count($HTTP_SERVER_VARS['argv']) == 3) {
-            if (@$HTTP_SERVER_VARS['argv'][2] == 'my') {
+    } elseif ($_SERVER['argv'][1] == 'open-issues') {
+        if (count($_SERVER['argv']) == 3) {
+            if (@$_SERVER['argv'][2] == 'my') {
                 $show_all_issues = false;
                 $status = '';
             } else {
                 $show_all_issues = true;
-                $status = $HTTP_SERVER_VARS['argv'][2];
+                $status = $_SERVER['argv'][2];
             }
-        } elseif (count($HTTP_SERVER_VARS['argv']) == 4) {
-            if (@$HTTP_SERVER_VARS['argv'][3] == 'my') {
+        } elseif (count($_SERVER['argv']) == 4) {
+            if (@$_SERVER['argv'][3] == 'my') {
                 $show_all_issues = false;
             } else {
                 $show_all_issues = true;
             }
-            $status = $HTTP_SERVER_VARS['argv'][2];
+            $status = $_SERVER['argv'][2];
         } else {
             $show_all_issues = true;
             $status = '';
         }
         Command_Line::printOpenIssues($client, $auth, $show_all_issues, $status);
-    } elseif ($HTTP_SERVER_VARS['argv'][1] == 'list-status') {
+    } elseif ($_SERVER['argv'][1] == 'list-status') {
         Command_Line::printStatusList($client, $auth);
-    } elseif ($HTTP_SERVER_VARS['argv'][1] == 'customer') {
-        if (count($HTTP_SERVER_VARS['argv']) != 4) {
+    } elseif ($_SERVER['argv'][1] == 'customer') {
+        if (count($_SERVER['argv']) != 4) {
             Command_Line::quit("Wrong parameter count");
         }
-        Command_Line::lookupCustomer($client, $auth, $HTTP_SERVER_VARS['argv'][2], $HTTP_SERVER_VARS['argv'][3]);
-    } elseif (($HTTP_SERVER_VARS['argv'][1] == 'weekly-report') || ($HTTP_SERVER_VARS['argv'][1] == 'wr')) {
-        if (count(@$HTTP_SERVER_VARS['argv']) >= 4 and $HTTP_SERVER_VARS['argv'][3] != '--separate-closed') {
-            $separate_closed = (@$HTTP_SERVER_VARS['argv'][4] == '--separate-closed');
+        Command_Line::lookupCustomer($client, $auth, $_SERVER['argv'][2], $_SERVER['argv'][3]);
+    } elseif (($_SERVER['argv'][1] == 'weekly-report') || ($_SERVER['argv'][1] == 'wr')) {
+        if (count(@$_SERVER['argv']) >= 4 and $_SERVER['argv'][3] != '--separate-closed') {
+            $separate_closed = (@$_SERVER['argv'][4] == '--separate-closed');
             // date range
-            Command_Line::getWeeklyReport($client, $auth, 0, $HTTP_SERVER_VARS['argv'][2], $HTTP_SERVER_VARS['argv'][3], $separate_closed);
+            Command_Line::getWeeklyReport($client, $auth, 0, $_SERVER['argv'][2], $_SERVER['argv'][3], $separate_closed);
         } else {
             // weekly
-            if (@$HTTP_SERVER_VARS['argv'][2] == '') {
+            if (@$_SERVER['argv'][2] == '') {
                 $separate_closed = false;
-                @$HTTP_SERVER_VARS['argv'][2] = 0;
+                @$_SERVER['argv'][2] = 0;
             } else {
-                $separate_closed = (@$HTTP_SERVER_VARS['argv'][3] == '--separate-closed' or @$HTTP_SERVER_VARS['argv'][2] == '--separate-closed');
+                $separate_closed = (@$_SERVER['argv'][3] == '--separate-closed' or @$_SERVER['argv'][2] == '--separate-closed');
             }
-            Command_Line::getWeeklyReport($client, $auth, $HTTP_SERVER_VARS['argv'][2], '', '', $separate_closed);
+            Command_Line::getWeeklyReport($client, $auth, $_SERVER['argv'][2], '', '', $separate_closed);
         }
-    } elseif ($HTTP_SERVER_VARS['argv'][1] == 'clock') {
-        Command_Line::timeClock($client, $auth, @$HTTP_SERVER_VARS['argv'][2]);
+    } elseif ($_SERVER['argv'][1] == 'clock') {
+        Command_Line::timeClock($client, $auth, @$_SERVER['argv'][2]);
     }  else {
-        Command_Line::quit("Unknown parameter '" . $HTTP_SERVER_VARS['argv'][1] . "'");
+        Command_Line::quit("Unknown parameter '" . $_SERVER['argv'][1] . "'");
     }
 }
 
Index: misc/check_reminders.php
===================================================================
--- misc/check_reminders.php	(revision 3164)
+++ misc/check_reminders.php	(working copy)
@@ -37,7 +37,7 @@
 
 
 // if requested, clear the lock
-if (in_array('--fix-lock', @$HTTP_SERVER_VARS['argv'])) {
+if (in_array('--fix-lock', @$_SERVER['argv'])) {
     Lock::release('check_reminders');
     echo "The lock file was removed successfully.\n";
     exit;
Index: misc/irc/bot.php
===================================================================
--- misc/irc/bot.php	(revision 3164)
+++ misc/irc/bot.php	(working copy)
@@ -62,7 +62,7 @@
 // ============================================
 
 // if requested, clear the lock
-if (in_array('--fix-lock', @$HTTP_SERVER_VARS['argv'])) {
+if (in_array('--fix-lock', @$_SERVER['argv'])) {
     Lock::release('irc_bot');
     echo "The lock file was removed successfully.\n";
     exit;
Index: setup/index.php
===================================================================
--- setup/index.php	(revision 3164)
+++ setup/index.php	(working copy)
@@ -35,16 +35,16 @@
 set_magic_quotes_runtime(0);
 
 if (isset($_GET)) {
-    $HTTP_POST_VARS = $_POST;
-    $HTTP_GET_VARS = $_GET;
-    $HTTP_SERVER_VARS = $_SERVER;
-    $HTTP_ENV_VARS = $_ENV;
-    $HTTP_POST_FILES = $_FILES;
+    $_POST = $_POST;
+    $_GET = $_GET;
+    $_SERVER = $_SERVER;
+    $_ENV = $_ENV;
+    $_FILES = $_FILES;
     // seems like PHP 4.1.0 didn't implement the $_SESSION auto-global...
     if (isset($_SESSION)) {
-        $HTTP_SESSION_VARS = $_SESSION;
+        $_SESSION = $_SESSION;
     }
-    $HTTP_COOKIE_VARS = $_COOKIE;
+    $_COOKIE = $_COOKIE;
 }
 
 function checkPermissions($file, $desc, $is_directory = FALSE)
@@ -220,9 +220,7 @@
 
 function replace_table_prefix($str)
 {
-    global $HTTP_POST_VARS;
-
-    return str_replace('%TABLE_PREFIX%', $HTTP_POST_VARS['db_table_prefix'], $str);
+    return str_replace('%TABLE_PREFIX%', $_POST['db_table_prefix'], $str);
 }
 
 function getErrorMessage($type, $message)
@@ -280,8 +278,6 @@
 
 function install()
 {
-    global $HTTP_POST_VARS;
-
     clearstatcache();
     // check if config.inc.php in the root directory is writable
     if (!is_writable('../config.inc.php')) {
@@ -304,44 +300,44 @@
     }
     fclose($fp);
     // check if we can connect
-    $conn = @mysql_connect($HTTP_POST_VARS['db_hostname'], $HTTP_POST_VARS['db_username'], $HTTP_POST_VARS['db_password']);
+    $conn = @mysql_connect($_POST['db_hostname'], $_POST['db_username'], $_POST['db_password']);
     if (!$conn) {
         return getErrorMessage('connect', mysql_error());
     }
     $db_list = getDatabaseList($conn);
     $db_list = array_map('strtolower', $db_list);
-    if (@$HTTP_POST_VARS['create_db'] == 'yes') {
-        if (!in_array(strtolower($HTTP_POST_VARS['db_name']), $db_list)) {
-            if (!mysql_query('CREATE DATABASE ' . $HTTP_POST_VARS['db_name'], $conn)) {
+    if (@$_POST['create_db'] == 'yes') {
+        if (!in_array(strtolower($_POST['db_name']), $db_list)) {
+            if (!mysql_query('CREATE DATABASE ' . $_POST['db_name'], $conn)) {
                 return getErrorMessage('create_db', mysql_error());
             }
         }
     } else {
-        if ((count($db_list) > 0) && (!in_array(strtolower($HTTP_POST_VARS['db_name']), $db_list))) {
+        if ((count($db_list) > 0) && (!in_array(strtolower($_POST['db_name']), $db_list))) {
             return "The provided database name could not be found. Review your information or specify that the database should be created in the form below.";
         }
     }
     // create the new user, if needed
-    if (@$HTTP_POST_VARS["alternate_user"] == 'yes') {
+    if (@$_POST["alternate_user"] == 'yes') {
         $user_list = getUserList($conn);
         if (count($user_list) > 0) {
             $user_list = array_map('strtolower', $user_list);
-            if (@$HTTP_POST_VARS["create_user"] == 'yes') {
-                if (!in_array(strtolower(@$HTTP_POST_VARS['eventum_user']), $user_list)) {
-                    $stmt = "GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON " . $HTTP_POST_VARS['db_name'] . ".* TO '" . $HTTP_POST_VARS["eventum_user"] . "'@'%' IDENTIFIED BY '" . $HTTP_POST_VARS["eventum_password"] . "'";
+            if (@$_POST["create_user"] == 'yes') {
+                if (!in_array(strtolower(@$_POST['eventum_user']), $user_list)) {
+                    $stmt = "GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON " . $_POST['db_name'] . ".* TO '" . $_POST["eventum_user"] . "'@'%' IDENTIFIED BY '" . $_POST["eventum_password"] . "'";
                     if (!mysql_query($stmt, $conn)) {
                         return getErrorMessage('create_user', mysql_error());
                     }
                 }
             } else {
-                if (!in_array(strtolower(@$HTTP_POST_VARS['eventum_user']), $user_list)) {
+                if (!in_array(strtolower(@$_POST['eventum_user']), $user_list)) {
                     return "The provided MySQL username could not be found. Review your information or specify that the username should be created in the form below.";
                 }
             }
         }
     }
     // check if we can use the database
-    if (!mysql_select_db($HTTP_POST_VARS['db_name'])) {
+    if (!mysql_select_db($_POST['db_name'])) {
         return getErrorMessage('select_db', mysql_error());
     }
     // check the CREATE and DROP privileges by trying to create and drop a test table
@@ -362,7 +358,7 @@
     $queries = array_map("trim", $queries);
     $queries = array_map("replace_table_prefix", $queries);
     foreach ($queries as $stmt) {
-        if ((stristr($stmt, 'DROP TABLE')) && (@$HTTP_POST_VARS['drop_tables'] != 'yes')) {
+        if ((stristr($stmt, 'DROP TABLE')) && (@$_POST['drop_tables'] != 'yes')) {
             continue;
         }
         // need to check if a CREATE TABLE on an existing table throws an error
@@ -376,20 +372,20 @@
         }
     }
     // substitute the appropriate values in config.inc.php!!!
-    if (@$HTTP_POST_VARS['alternate_user'] == 'yes') {
-        $HTTP_POST_VARS['db_username'] = $HTTP_POST_VARS['eventum_user'];
-        $HTTP_POST_VARS['db_password'] = $HTTP_POST_VARS['eventum_password'];
+    if (@$_POST['alternate_user'] == 'yes') {
+        $_POST['db_username'] = $_POST['eventum_user'];
+        $_POST['db_password'] = $_POST['eventum_password'];
     }
     $config_contents = implode("", file("config.inc.php"));
-    $config_contents = str_replace("%{APP_SQL_DBHOST}%", $HTTP_POST_VARS['db_hostname'], $config_contents);
-    $config_contents = str_replace("%{APP_SQL_DBNAME}%", $HTTP_POST_VARS['db_name'], $config_contents);
-    $config_contents = str_replace("%{APP_SQL_DBUSER}%", $HTTP_POST_VARS['db_username'], $config_contents);
-    $config_contents = str_replace("%{APP_SQL_DBPASS}%", $HTTP_POST_VARS['db_password'], $config_contents);
-    $config_contents = str_replace("%{APP_TABLE_PREFIX}%", $HTTP_POST_VARS['db_table_prefix'], $config_contents);
-    $config_contents = str_replace("%{APP_HOSTNAME}%", $HTTP_POST_VARS['hostname'], $config_contents);
-    $config_contents = str_replace("%{APP_RELATIVE_URL}%", $HTTP_POST_VARS['relative_url'], $config_contents);
+    $config_contents = str_replace("%{APP_SQL_DBHOST}%", $_POST['db_hostname'], $config_contents);
+    $config_contents = str_replace("%{APP_SQL_DBNAME}%", $_POST['db_name'], $config_contents);
+    $config_contents = str_replace("%{APP_SQL_DBUSER}%", $_POST['db_username'], $config_contents);
+    $config_contents = str_replace("%{APP_SQL_DBPASS}%", $_POST['db_password'], $config_contents);
+    $config_contents = str_replace("%{APP_TABLE_PREFIX}%", $_POST['db_table_prefix'], $config_contents);
+    $config_contents = str_replace("%{APP_HOSTNAME}%", $_POST['hostname'], $config_contents);
+    $config_contents = str_replace("%{APP_RELATIVE_URL}%", $_POST['relative_url'], $config_contents);
     $config_contents = str_replace("%{APP_VERSION}%", "1.7.1", $config_contents);
-    if (@$HTTP_POST_VARS['is_ssl'] == 'yes') {
+    if (@$_POST['is_ssl'] == 'yes') {
         $protocol_type = 'https://';
     } else {
         $protocol_type = 'http://';
@@ -428,7 +424,7 @@
     return 'success';
 }
 
-if (@$HTTP_POST_VARS["cat"] == 'install') {
+if (@$_POST["cat"] == 'install') {
     $res = install();
     $tpl->assign("result", $res);
     // check for the optional IMAP extension
@@ -436,7 +432,7 @@
 }
 
 
-$full_url = dirname($HTTP_SERVER_VARS['PHP_SELF']);
+$full_url = dirname($_SERVER['PHP_SELF']);
 $pieces = explode("/", $full_url);
 $relative_url = array();
 $relative_url[] = '';
@@ -450,7 +446,7 @@
 
 $tpl->assign("phpversion", phpversion());
 $tpl->assign("rel_url", $relative_url);
-if (@$HTTP_SERVER_VARS['HTTPS'] == 'on') {
+if (@$_SERVER['HTTPS'] == 'on') {
     $ssl_mode = 'enabled';
 } else {
     $ssl_mode = 'disabled';
Index: duplicate.php
===================================================================
--- duplicate.php	(revision 3164)
+++ duplicate.php	(working copy)
@@ -38,13 +38,13 @@
 
 Auth::checkAuthentication(APP_COOKIE);
 
-if (@$HTTP_POST_VARS["cat"] == "mark") {
-    $res = Issue::markAsDuplicate($HTTP_POST_VARS["issue_id"]);
+if (@$_POST["cat"] == "mark") {
+    $res = Issue::markAsDuplicate($_POST["issue_id"]);
     $tpl->assign("duplicate_result", $res);
 } else {
     // need to show only the issues that have iss_duplicated_iss_id = NULL
-    $tpl->assign("issues", Issue::getColList("iss_duplicated_iss_id IS NULL AND iss_id <> " . $HTTP_GET_VARS["id"]));
-    $tpl->assign("assoc_issues", Issue::getAssocList("iss_duplicated_iss_id IS NULL AND iss_id <> " . $HTTP_GET_VARS["id"]));
+    $tpl->assign("issues", Issue::getColList("iss_duplicated_iss_id IS NULL AND iss_id <> " . $_GET["id"]));
+    $tpl->assign("assoc_issues", Issue::getAssocList("iss_duplicated_iss_id IS NULL AND iss_id <> " . $_GET["id"]));
 }
 
 $tpl->displayTemplate();
Index: customer/example/customer_lookup.php
===================================================================
--- customer/example/customer_lookup.php	(revision 3164)
+++ customer/example/customer_lookup.php	(working copy)
@@ -44,8 +44,8 @@
     Auth::redirect(APP_RELATIVE_URL . "list.php");
 }
 
-if (@$HTTP_POST_VARS['cat'] == 'lookup') {
-    $tpl->assign("results", Customer::lookup($prj_id, $HTTP_POST_VARS['field'], $HTTP_POST_VARS['value']));
+if (@$_POST['cat'] == 'lookup') {
+    $tpl->assign("results", Customer::lookup($prj_id, $_POST['field'], $_POST['value']));
 }
 
 $tpl->displayTemplate();
Index: stats_chart.php
===================================================================
--- stats_chart.php	(revision 3164)
+++ stats_chart.php	(working copy)
@@ -50,7 +50,7 @@
 
 // Some data
 $colors = array();
-if ($HTTP_GET_VARS["plot"] == "status") {
+if ($_GET["plot"] == "status") {
     $data = Stats::getAssocStatus();
     $graph_title = "Issues by Status";
     foreach ($data as $sta_title => $trash) {
@@ -58,16 +58,16 @@
         $status_details = Status::getDetails($sta_id);
         $colors[] = $status_details['sta_color'];
     }
-} elseif ($HTTP_GET_VARS["plot"] == "release") {
+} elseif ($_GET["plot"] == "release") {
     $data = Stats::getAssocRelease();
     $graph_title = ev_gettext("Issues by Release");
-} elseif ($HTTP_GET_VARS["plot"] == "priority") {
+} elseif ($_GET["plot"] == "priority") {
     $data = Stats::getAssocPriority();
     $graph_title = ev_gettext("Issues by Priority");
-} elseif ($HTTP_GET_VARS["plot"] == "user") {
+} elseif ($_GET["plot"] == "user") {
     $data = Stats::getAssocUser();
     $graph_title = ev_gettext("Issues by Assignment");
-} elseif ($HTTP_GET_VARS["plot"] == "category") {
+} elseif ($_GET["plot"] == "category") {
     $data = Stats::getAssocCategory();
     $graph_title = ev_gettext("Issues by Category");
 }
Index: notification.php
===================================================================
--- notification.php	(revision 3164)
+++ notification.php	(working copy)
@@ -42,7 +42,7 @@
 
 $usr_id = Auth::getUserID();
 $prj_id = Auth::getCurrentProject();
-$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["iss_id"];
+$issue_id = @$_POST["issue_id"] ? $_POST["issue_id"] : $_GET["iss_id"];
 $tpl->assign("issue_id", $issue_id);
 
 // format default actions properly
@@ -53,17 +53,17 @@
 }
 $tpl->assign("default_actions", $res);
 
-if (@$HTTP_POST_VARS["cat"] == "insert") {
-    $res = Notification::subscribeEmail($usr_id, $issue_id, $HTTP_POST_VARS['email'], $HTTP_POST_VARS['actions']);
+if (@$_POST["cat"] == "insert") {
+    $res = Notification::subscribeEmail($usr_id, $issue_id, $_POST['email'], $_POST['actions']);
     $tpl->assign("insert_result", $res);
-} elseif (@$HTTP_GET_VARS["cat"] == "edit") {
-    $res = Notification::getDetails($HTTP_GET_VARS["id"]);
+} elseif (@$_GET["cat"] == "edit") {
+    $res = Notification::getDetails($_GET["id"]);
     $tpl->assign("info", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "update") {
-    $res = Notification::update($HTTP_POST_VARS["id"]);
+} elseif (@$_POST["cat"] == "update") {
+    $res = Notification::update($_POST["id"]);
     $tpl->assign("update_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "delete") {
-    $res = Notification::remove($HTTP_POST_VARS["items"]);
+} elseif (@$_POST["cat"] == "delete") {
+    $res = Notification::remove($_POST["items"]);
     $tpl->assign("delete_result", $res);
 }
 
Index: get_attachment.php
===================================================================
--- get_attachment.php	(revision 3164)
+++ get_attachment.php	(working copy)
@@ -35,15 +35,15 @@
 
 Auth::checkAuthentication(APP_COOKIE);
 
-if (@$HTTP_GET_VARS['cat'] == 'blocked_email') {
-    $email = Note::getBlockedMessage($HTTP_GET_VARS["note_id"]);
+if (@$_GET['cat'] == 'blocked_email') {
+    $email = Note::getBlockedMessage($_GET["note_id"]);
 } else {
-    $email = Support::getFullEmail($HTTP_GET_VARS["sup_id"]);
+    $email = Support::getFullEmail($_GET["sup_id"]);
 }
-if (!empty($HTTP_GET_VARS['cid'])) {
-    list($mimetype, $data) = Mime_Helper::getAttachment($email, $HTTP_GET_VARS["filename"], $HTTP_GET_VARS["cid"]);
+if (!empty($_GET['cid'])) {
+    list($mimetype, $data) = Mime_Helper::getAttachment($email, $_GET["filename"], $_GET["cid"]);
 } else {
-    list($mimetype, $data) = Mime_Helper::getAttachment($email, $HTTP_GET_VARS["filename"]);
+    list($mimetype, $data) = Mime_Helper::getAttachment($email, $_GET["filename"]);
 }
-Attachment::outputDownload($data, $HTTP_GET_VARS["filename"], strlen($data), $mimetype);
+Attachment::outputDownload($data, $_GET["filename"], strlen($data), $mimetype);
 ?>
\ No newline at end of file
Index: rpc/xmlrpc.php
===================================================================
--- rpc/xmlrpc.php	(revision 3164)
+++ rpc/xmlrpc.php	(working copy)
@@ -954,19 +954,17 @@
  */
 function createFakeCookie($email, $project = false)
 {
-    global $HTTP_COOKIE_VARS;
-
     $cookie = array(
         "email" => $email
     );
-    $HTTP_COOKIE_VARS[APP_COOKIE] = base64_encode(serialize($cookie));
+    $_COOKIE[APP_COOKIE] = base64_encode(serialize($cookie));
     if ($project) {
         $cookie = array(
             "prj_id"   => $project,
             "remember" => false
         );
     }
-    $HTTP_COOKIE_VARS[APP_PROJECT_COOKIE] = base64_encode(serialize($cookie));
+    $_COOKIE[APP_PROJECT_COOKIE] = base64_encode(serialize($cookie));
 }
 
 
@@ -1109,4 +1107,4 @@
     )
 );
 $server = new XML_RPC_Server($services);
-?>
\ No newline at end of file
+?>
Index: requirement.php
===================================================================
--- requirement.php	(revision 3164)
+++ requirement.php	(working copy)
@@ -38,8 +38,8 @@
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
-if (@$HTTP_POST_VARS["cat"] == "set_analysis") {
-    $res = Impact_Analysis::update($HTTP_POST_VARS["isr_id"]);
+if (@$_POST["cat"] == "set_analysis") {
+    $res = Impact_Analysis::update($_POST["isr_id"]);
     $tpl->assign("set_analysis_result", $res);
 }
 
Index: select_project.php
===================================================================
--- select_project.php	(revision 3164)
+++ select_project.php	(working copy)
@@ -42,11 +42,11 @@
     Auth::redirect(APP_RELATIVE_URL . "index.php?err=11");
 }
 
-if ((@$HTTP_GET_VARS["err"] == '') && (Auth::hasValidCookie(APP_COOKIE))) {
+if ((@$_GET["err"] == '') && (Auth::hasValidCookie(APP_COOKIE))) {
     $cookie = Auth::getCookieInfo(APP_PROJECT_COOKIE);
     if ($cookie["remember"]) {
-        if (!empty($HTTP_GET_VARS["url"])) {
-            Auth::redirect($HTTP_GET_VARS["url"]);
+        if (!empty($_GET["url"])) {
+            Auth::redirect($_GET["url"]);
         } else {
             Auth::redirect(APP_RELATIVE_URL . "main.php");
         }
@@ -63,17 +63,17 @@
         Auth::setCurrentProject($prj_id, 0);
         handleExpiredCustomer($prj_id);
 
-        if (!empty($HTTP_GET_VARS["url"])) {
-            Auth::redirect($HTTP_GET_VARS["url"]);
+        if (!empty($_GET["url"])) {
+            Auth::redirect($_GET["url"]);
         } else {
             Auth::redirect(APP_RELATIVE_URL . "main.php");
         }
-    } elseif ((!empty($HTTP_GET_VARS["url"])) && (
-            (preg_match("/.*view\.php\?id=(\d*)/", $HTTP_GET_VARS["url"], $matches) > 0) ||
-            (preg_match("/switch_prj_id=(\d*)/", $HTTP_GET_VARS["url"], $matches) > 0)
+    } elseif ((!empty($_GET["url"])) && (
+            (preg_match("/.*view\.php\?id=(\d*)/", $_GET["url"], $matches) > 0) ||
+            (preg_match("/switch_prj_id=(\d*)/", $_GET["url"], $matches) > 0)
             )) {
         // check if url is directly linking to an issue, and if it is, don't prompt for project
-        if (stristr($HTTP_GET_VARS["url"], 'view.php')) {
+        if (stristr($_GET["url"], 'view.php')) {
             $prj_id = Issue::getProjectID($matches[1]);
         } else {
             $prj_id = $matches[1];
@@ -81,32 +81,32 @@
         if (!empty($assigned_projects[$prj_id])) {
             Auth::setCurrentProject($prj_id, 0);
             handleExpiredCustomer($prj_id);
-            Auth::redirect($HTTP_GET_VARS["url"]);
+            Auth::redirect($_GET["url"]);
         }
     }
 }
 
-if (@$HTTP_GET_VARS["err"] != '') {
+if (@$_GET["err"] != '') {
     Auth::removeCookie(APP_PROJECT_COOKIE);
-    $tpl->assign("err", $HTTP_GET_VARS["err"]);
+    $tpl->assign("err", $_GET["err"]);
 }
 
-if (@$HTTP_POST_VARS["cat"] == "select") {
+if (@$_POST["cat"] == "select") {
     $usr_id = Auth::getUserID();
     $projects = Project::getAssocList($usr_id);
-    if (!in_array($HTTP_POST_VARS["project"], array_keys($projects))) {
+    if (!in_array($_POST["project"], array_keys($projects))) {
         // show error message
         $tpl->assign("err", 1);
     } else {
         // create cookie and redirect
-        if (empty($HTTP_POST_VARS["remember"])) {
-            $HTTP_POST_VARS["remember"] = 0;
+        if (empty($_POST["remember"])) {
+            $_POST["remember"] = 0;
         }
-        Auth::setCurrentProject($HTTP_POST_VARS["project"], $HTTP_POST_VARS["remember"]);
-        handleExpiredCustomer($HTTP_POST_VARS["project"]);
+        Auth::setCurrentProject($_POST["project"], $_POST["remember"]);
+        handleExpiredCustomer($_POST["project"]);
 
-        if (!empty($HTTP_POST_VARS["url"])) {
-            Auth::redirect($HTTP_POST_VARS["url"]);
+        if (!empty($_POST["url"])) {
+            Auth::redirect($_POST["url"]);
         } else {
             Auth::redirect(APP_RELATIVE_URL . "main.php");
         }
Index: convert_note.php
===================================================================
--- convert_note.php	(revision 3164)
+++ convert_note.php	(working copy)
@@ -45,15 +45,15 @@
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
-if (@$HTTP_POST_VARS['cat'] == 'convert') {
-    if (@$HTTP_POST_VARS["add_authorized_replier"] == 1) {
+if (@$_POST['cat'] == 'convert') {
+    if (@$_POST["add_authorized_replier"] == 1) {
         $authorize_sender = true;
     } else {
         $authorize_sender = false;
     }
-    $tpl->assign("convert_result", Note::convertNote($HTTP_POST_VARS['note_id'], $HTTP_POST_VARS['target'], $authorize_sender));
+    $tpl->assign("convert_result", Note::convertNote($_POST['note_id'], $_POST['target'], $authorize_sender));
 } else {
-    $tpl->assign("note_id", $HTTP_GET_VARS['id']);
+    $tpl->assign("note_id", $_GET['id']);
 }
 
 $tpl->assign("current_user_prefs", Prefs::get(Auth::getUserID()));
Index: reports/recent_activity.php
===================================================================
--- reports/recent_activity.php	(revision 3164)
+++ reports/recent_activity.php	(working copy)
@@ -76,13 +76,13 @@
             (@$_REQUEST["start"]["Year"] != 0) &&
             (@$_REQUEST["start"]["Month"] != 0) &&
             (@$_REQUEST["start"]["Day"] != 0)) {
-        $start_date = join("-", $HTTP_POST_VARS["start"]);
+        $start_date = join("-", $_POST["start"]);
     }
     if (count(@$_REQUEST["end"]) > 0 &&
             (@$_REQUEST["end"]["Year"] != 0) &&
             (@$_REQUEST["end"]["Month"] != 0) &&
             (@$_REQUEST["end"]["Day"] != 0)) {
-        $end_date = join("-", $HTTP_POST_VARS["end"]);
+        $end_date = join("-", $_POST["end"]);
     }
     
     $data = array();
Index: reports/open_issues.php
===================================================================
--- reports/open_issues.php	(revision 3164)
+++ reports/open_issues.php	(working copy)
@@ -45,10 +45,10 @@
 
 $prj_id = Auth::getCurrentProject();
 
-if (!isset($HTTP_GET_VARS['cutoff_days'])) {
+if (!isset($_GET['cutoff_days'])) {
     $cutoff_days = 7;
 } else {
-    $cutoff_days = $HTTP_GET_VARS['cutoff_days'];
+    $cutoff_days = $_GET['cutoff_days'];
 }
 
 if (empty($_GET['group_by_reporter'])) {
Index: reports/weekly.php
===================================================================
--- reports/weekly.php	(revision 3164)
+++ reports/weekly.php	(working copy)
@@ -44,17 +44,17 @@
 
 $prj_id = Auth::getCurrentProject();
 
-if (count(@$HTTP_POST_VARS["start"]) > 0 &&
-        (@$HTTP_POST_VARS["start"]["Year"] != 0) &&
-        (@$HTTP_POST_VARS["start"]["Month"] != 0) &&
-        (@$HTTP_POST_VARS["start"]["Day"] != 0)) {
-    $start_date = join("-", $HTTP_POST_VARS["start"]);
+if (count(@$_POST["start"]) > 0 &&
+        (@$_POST["start"]["Year"] != 0) &&
+        (@$_POST["start"]["Month"] != 0) &&
+        (@$_POST["start"]["Day"] != 0)) {
+    $start_date = join("-", $_POST["start"]);
 }
-if (count(@$HTTP_POST_VARS["end"]) > 0 &&
-        (@$HTTP_POST_VARS["end"]["Year"] != 0) &&
-        (@$HTTP_POST_VARS["end"]["Month"] != 0) &&
-        (@$HTTP_POST_VARS["end"]["Day"] != 0)) {
-    $end_date = join("-", $HTTP_POST_VARS["end"]);
+if (count(@$_POST["end"]) > 0 &&
+        (@$_POST["end"]["Year"] != 0) &&
+        (@$_POST["end"]["Month"] != 0) &&
+        (@$_POST["end"]["Day"] != 0)) {
+    $end_date = join("-", $_POST["end"]);
 }
 
 $tpl->assign(array(
@@ -62,32 +62,32 @@
     "users" => Project::getUserAssocList($prj_id, 'active', User::getRoleID('Customer')),
     "start_date"    =>  @$start_date,
     "end_date"      =>  @$end_date,
-    "report_type"   =>  @$HTTP_POST_VARS["report_type"]
+    "report_type"   =>  @$_POST["report_type"]
 ));
 
-if (!empty($HTTP_POST_VARS["developer"])) {
+if (!empty($_POST["developer"])) {
 
     //split date up
-    if (@$HTTP_POST_VARS["report_type"] == "weekly") {
-        $dates = explode("_", $HTTP_POST_VARS["week"]);
+    if (@$_POST["report_type"] == "weekly") {
+        $dates = explode("_", $_POST["week"]);
     } else {
         $dates = array($start_date, $end_date);
     }
 
     // print out emails
-    $data = Report::getWeeklyReport($HTTP_POST_VARS["developer"], $dates[0], $dates[1], @$_REQUEST['separate_closed'], @$_REQUEST['ignore_statuses']);
+    $data = Report::getWeeklyReport($_POST["developer"], $dates[0], $dates[1], @$_REQUEST['separate_closed'], @$_REQUEST['ignore_statuses']);
     $tpl->assign("data", $data);
 }
 
-if (empty($HTTP_POST_VARS["week"])) {
+if (empty($_POST["week"])) {
     $tpl->assign("week", Date_API::getCurrentWeek());
 } else {
-    $tpl->assign("week", $HTTP_POST_VARS["week"]);
+    $tpl->assign("week", $_POST["week"]);
 }
-if (empty($HTTP_POST_VARS["developer"])) {
+if (empty($_POST["developer"])) {
     $tpl->assign("developer", Auth::getUserID());
 } else {
-    $tpl->assign("developer", $HTTP_POST_VARS["developer"]);
+    $tpl->assign("developer", $_POST["developer"]);
 }
 
 $tpl->displayTemplate();
Index: reports/customer_stats_graph.php
===================================================================
--- reports/customer_stats_graph.php	(revision 3164)
+++ reports/customer_stats_graph.php	(working copy)
@@ -69,7 +69,7 @@
 
 $graph_types = Customer_Stats_Report::getGraphTypes();
 
-$graph_id = $HTTP_GET_VARS["graph_id"];
+$graph_id = $_GET["graph_id"];
 
 $plots = array();
 $max_title_len = 0;
Index: reports/custom_fields.php
===================================================================
--- reports/custom_fields.php	(revision 3164)
+++ reports/custom_fields.php	(working copy)
@@ -61,15 +61,15 @@
 }
 
 if (count(@$_GET['custom_field']) > 0) {
-    $data = Report::getCustomFieldReport(@$HTTP_GET_VARS["custom_field"], @$HTTP_GET_VARS["custom_options"], @$HTTP_GET_VARS["group_by"], true);
+    $data = Report::getCustomFieldReport(@$_GET["custom_field"], @$_GET["custom_options"], @$_GET["group_by"], true);
 }
 
 $tpl->assign(array(
     "custom_fields" =>  $custom_fields,
-    "custom_field"  =>  @$HTTP_GET_VARS["custom_field"],
+    "custom_field"  =>  @$_GET["custom_field"],
     "options"   =>  $options,
-    "custom_options"    =>  @$HTTP_GET_VARS["custom_options"],
-    "group_by"      =>  @$HTTP_GET_VARS["group_by"],
+    "custom_options"    =>  @$_GET["custom_options"],
+    "group_by"      =>  @$_GET["group_by"],
     "selected_options"  => @$_REQUEST['custom_options'],
     "data"  =>  @$data
 ));
Index: reports/workload_time_period.php
===================================================================
--- reports/workload_time_period.php	(revision 3164)
+++ reports/workload_time_period.php	(working copy)
@@ -50,7 +50,7 @@
 // get timezone of current user
 $user_prefs = Prefs::get($usr_id);
 
-if (@$HTTP_GET_VARS["type"] == "email") {
+if (@$_GET["type"] == "email") {
     $data = Report::getEmailWorkloadByTimePeriod(@$user_prefs["timezone"]);
 } else {
     $data = Report::getWorkloadByTimePeriod(@$user_prefs["timezone"]);
@@ -58,7 +58,7 @@
 
 $tpl->assign(array(
     "data"    => $data,
-    "type"    => @$HTTP_GET_VARS["type"],
+    "type"    => @$_GET["type"],
     "user_tz" => Date_API::getTimezoneShortNameByUser($usr_id)
 ));
 $tpl->displayTemplate();
Index: reports/customer_stats.php
===================================================================
--- reports/customer_stats.php	(revision 3164)
+++ reports/customer_stats.php	(working copy)
@@ -55,26 +55,26 @@
     exit;
 }
 
-if (count(@$HTTP_POST_VARS["start"]) > 0 &&
-        (@$HTTP_POST_VARS["start"]["Year"] != 0) &&
-        (@$HTTP_POST_VARS["start"]["Month"] != 0) &&
-        (@$HTTP_POST_VARS["start"]["Day"] != 0)) {
-    $start_date = join("-", $HTTP_POST_VARS["start"]);
+if (count(@$_POST["start"]) > 0 &&
+        (@$_POST["start"]["Year"] != 0) &&
+        (@$_POST["start"]["Month"] != 0) &&
+        (@$_POST["start"]["Day"] != 0)) {
+    $start_date = join("-", $_POST["start"]);
 } else {
     $start_date = "0000-00-00";
 }
-if (count(@$HTTP_POST_VARS["end"]) > 0 &&
-        (@$HTTP_POST_VARS["end"]["Year"] != 0) &&
-        (@$HTTP_POST_VARS["end"]["Month"] != 0) &&
-        (@$HTTP_POST_VARS["end"]["Day"] != 0)) {
-    $end_date = join("-", $HTTP_POST_VARS["end"]);
+if (count(@$_POST["end"]) > 0 &&
+        (@$_POST["end"]["Year"] != 0) &&
+        (@$_POST["end"]["Month"] != 0) &&
+        (@$_POST["end"]["Day"] != 0)) {
+    $end_date = join("-", $_POST["end"]);
 } else {
     $end_date = "0000-00-00";
 }
 
-if (count(@$HTTP_POST_VARS["display_sections"]) < 1) {
-    $HTTP_POST_VARS["display_sections"] = array_keys(Customer_Stats_Report::getDisplaySections());
-    unset($HTTP_POST_VARS["display_sections"][4]);
+if (count(@$_POST["display_sections"]) < 1) {
+    $_POST["display_sections"] = array_keys(Customer_Stats_Report::getDisplaySections());
+    unset($_POST["display_sections"][4]);
 }
 
 $support_levels = array('Aggregate' => 'Aggregate');
@@ -83,8 +83,8 @@
     $support_levels[$level_name] = $level_name;
 }
 
-if (count(@$HTTP_POST_VARS["support_level"]) < 1) {
-    $HTTP_POST_VARS["support_level"] = array('Aggregate');
+if (count(@$_POST["support_level"]) < 1) {
+    $_POST["support_level"] = array('Aggregate');
 }
 
 // XXX: internal only - Remove all mentions of InnoDB
@@ -94,13 +94,13 @@
     "has_support_levels"=>  Customer::doesBackendUseSupportLevels($prj_id),
     "project_name"      =>  Auth::getCurrentProjectName(),
     "support_levels"    =>  $support_levels,
-    "support_level"     =>  @$HTTP_POST_VARS["support_level"],
+    "support_level"     =>  @$_POST["support_level"],
     "start_date"        =>  $start_date,
     "end_date"          =>  $end_date,
     "sections"          =>  Customer_Stats_Report::getDisplaySections(),
-    "display_sections"  =>  $HTTP_POST_VARS["display_sections"],
-    "split_innoDB"      =>  @$HTTP_POST_VARS["split_innoDB"],
-    "include_expired"   =>  @$HTTP_POST_VARS["include_expired"],
+    "display_sections"  =>  $_POST["display_sections"],
+    "split_innoDB"      =>  @$_POST["split_innoDB"],
+    "include_expired"   =>  @$_POST["include_expired"],
     "graphs"            =>  Customer_Stats_Report::getGraphTypes()
 ));
 
@@ -108,19 +108,19 @@
 if (Auth::getCurrentRole() >= User::getRoleID('manager')) {
     $tpl->assign(array(
     "customers"         =>  Customer::getAssocList($prj_id),
-    "customer"          =>  @$HTTP_POST_VARS["customer"]
+    "customer"          =>  @$_POST["customer"]
     ));
 }
 
 // loop through display sections
 $display = array();
-foreach ($HTTP_POST_VARS["display_sections"] as $section) {
+foreach ($_POST["display_sections"] as $section) {
     $display[$section] = 1;
 }
 $tpl->assign("display", $display);
 
 
-if (@$HTTP_POST_VARS["cat"] == "Generate") {
+if (@$_POST["cat"] == "Generate") {
     
     if ($start_date == "0000-00-00") {
         $start_date = '';
@@ -142,14 +142,14 @@
     
     $csr = new Customer_Stats_Report(
                     $prj_id,
-                    @$HTTP_POST_VARS["support_level"],
-                    @$HTTP_POST_VARS["customer"],
+                    @$_POST["support_level"],
+                    @$_POST["customer"],
                     $start_date,
                     $end_date);
-    if (@$HTTP_POST_VARS["split_innoDB"] == 1) {
+    if (@$_POST["split_innoDB"] == 1) {
         $csr->splitByInnoDB(true);
     }
-    if (@$HTTP_POST_VARS["include_expired"] == 1) {
+    if (@$_POST["include_expired"] == 1) {
         $csr->excludeExpired(false);
     } else {
         $csr->excludeExpired(true);
Index: reports/custom_fields_graph.php
===================================================================
--- reports/custom_fields_graph.php	(revision 3164)
+++ reports/custom_fields_graph.php	(working copy)
@@ -48,14 +48,14 @@
  * Generates a graph for the selected custom field
  */
 
-$data = Report::getCustomFieldReport(@$HTTP_GET_VARS["custom_field"], @$HTTP_GET_VARS["custom_options"], @$HTTP_GET_VARS["group_by"]);
-$field_details = Custom_Field::getDetails(@$HTTP_GET_VARS["custom_field"]);
+$data = Report::getCustomFieldReport(@$_GET["custom_field"], @$_GET["custom_options"], @$_GET["group_by"]);
+$field_details = Custom_Field::getDetails(@$_GET["custom_field"]);
 
 if (count($data) < 2) {
     header("Location: " . APP_RELATIVE_URL . "images/no_data.gif");
 }
 
-if (@$HTTP_GET_VARS["type"] == "pie") {
+if (@$_GET["type"] == "pie") {
     
     if (empty($data["All Others"])) {
         unset($data["All Others"]);
@@ -135,7 +135,7 @@
     $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
 }
 
-if (@$HTTP_GET_VARS["group_by"] == "customers") {
+if (@$_GET["group_by"] == "customers") {
     "Customers by " . $field_details["fld_title"];
 } else {
     $title = "Issues by " . $field_details["fld_title"];
Index: reports/workload_time_period_graph.php
===================================================================
--- reports/workload_time_period_graph.php	(revision 3164)
+++ reports/workload_time_period_graph.php	(working copy)
@@ -51,7 +51,7 @@
 // get timezone of current user
 $user_prefs = Prefs::get($usr_id);
 
-if (@$HTTP_GET_VARS["type"] == "email") {
+if (@$_GET["type"] == "email") {
     $data = Report::getEmailWorkloadByTimePeriod(@$user_prefs["timezone"], true);
     $graph_title = "Email by Time Period";
     $event_type = "emails";
Index: reports/issue.php
===================================================================
--- reports/issue.php	(revision 3164)
+++ reports/issue.php	(working copy)
@@ -46,7 +46,7 @@
 $prj_id = Auth::getCurrentProject();
 
 
-if ($HTTP_GET_VARS['cat'] == 'user') {
+if ($_GET['cat'] == 'user') {
     $res = Report::getIssuesByUser($prj_id);
     $tpl->assign("users", $res);
 }
Index: login.php
===================================================================
--- login.php	(revision 3164)
+++ login.php	(working copy)
@@ -33,41 +33,41 @@
 include_once(APP_INC_PATH . "class.user.php");
 include_once(APP_INC_PATH . "class.validation.php");
 
-if (Validation::isWhitespace($HTTP_POST_VARS["email"])) {
+if (Validation::isWhitespace($_POST["email"])) {
     Auth::redirect(APP_RELATIVE_URL . "index.php?err=1");
 }
-if (Validation::isWhitespace($HTTP_POST_VARS["passwd"])) {
-    Auth::saveLoginAttempt($HTTP_POST_VARS["email"], 'failure', 'empty password');
-    Auth::redirect(APP_RELATIVE_URL . "index.php?err=2&email=" . $HTTP_POST_VARS["email"]);
+if (Validation::isWhitespace($_POST["passwd"])) {
+    Auth::saveLoginAttempt($_POST["email"], 'failure', 'empty password');
+    Auth::redirect(APP_RELATIVE_URL . "index.php?err=2&email=" . $_POST["email"]);
 }
 
 // check if user exists
-if (!Auth::userExists($HTTP_POST_VARS["email"])) {
-    Auth::saveLoginAttempt($HTTP_POST_VARS["email"], 'failure', 'unknown user');
+if (!Auth::userExists($_POST["email"])) {
+    Auth::saveLoginAttempt($_POST["email"], 'failure', 'unknown user');
     Auth::redirect(APP_RELATIVE_URL . "index.php?err=3");
 }
 // check if the password matches
-if (!Auth::isCorrectPassword($HTTP_POST_VARS["email"], $HTTP_POST_VARS["passwd"])) {
-    Auth::saveLoginAttempt($HTTP_POST_VARS["email"], 'failure', 'wrong password');
-    Auth::redirect(APP_RELATIVE_URL . "index.php?err=3&email=" . $HTTP_POST_VARS["email"]);
+if (!Auth::isCorrectPassword($_POST["email"], $_POST["passwd"])) {
+    Auth::saveLoginAttempt($_POST["email"], 'failure', 'wrong password');
+    Auth::redirect(APP_RELATIVE_URL . "index.php?err=3&email=" . $_POST["email"]);
 }
 // check if this user did already confirm his account
-if (Auth::isPendingUser($HTTP_POST_VARS["email"])) {
-    Auth::saveLoginAttempt($HTTP_POST_VARS["email"], 'failure', 'pending user');
+if (Auth::isPendingUser($_POST["email"])) {
+    Auth::saveLoginAttempt($_POST["email"], 'failure', 'pending user');
     Auth::redirect(APP_RELATIVE_URL . "index.php?err=9", $is_popup);
 }
 // check if this user is really an active one
-if (!Auth::isActiveUser($HTTP_POST_VARS["email"])) {
-    Auth::saveLoginAttempt($HTTP_POST_VARS["email"], 'failure', 'inactive user');
+if (!Auth::isActiveUser($_POST["email"])) {
+    Auth::saveLoginAttempt($_POST["email"], 'failure', 'inactive user');
     Auth::redirect(APP_RELATIVE_URL . "index.php?err=7", $is_popup);
 }
 
-Auth::saveLoginAttempt($HTTP_POST_VARS["email"], 'success');
+Auth::saveLoginAttempt($_POST["email"], 'success');
 // redirect to the initial page
-@Auth::createLoginCookie(APP_COOKIE, $HTTP_POST_VARS["email"]);
-Session::init(User::getUserIDByEmail($HTTP_POST_VARS['email']));
-if (!empty($HTTP_POST_VARS["url"])) {
-    $extra = '?url=' . urlencode($HTTP_POST_VARS["url"]);
+@Auth::createLoginCookie(APP_COOKIE, $_POST["email"]);
+Session::init(User::getUserIDByEmail($_POST['email']));
+if (!empty($_POST["url"])) {
+    $extra = '?url=' . urlencode($_POST["url"]);
 } else {
     $extra = '';
 }
Index: associate.php
===================================================================
--- associate.php	(revision 3164)
+++ associate.php	(working copy)
@@ -41,52 +41,52 @@
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
-if (@$HTTP_POST_VARS['cat'] == 'associate') {
-    if ($HTTP_POST_VARS['target'] == 'email') {
-        $res = Support::associate(Auth::getUserID(), $HTTP_POST_VARS['issue'], $HTTP_POST_VARS['item']);
+if (@$_POST['cat'] == 'associate') {
+    if ($_POST['target'] == 'email') {
+        $res = Support::associate(Auth::getUserID(), $_POST['issue'], $_POST['item']);
         if ($res == 1) {
-            Workflow::handleManualEmailAssociation(Issue::getProjectID($HTTP_POST_VARS['issue']), $HTTP_POST_VARS['issue']);
+            Workflow::handleManualEmailAssociation(Issue::getProjectID($_POST['issue']), $_POST['issue']);
         }
         $tpl->assign("associate_result", $res);
-    } elseif ($HTTP_POST_VARS['target'] == 'reference') {
-        $res = Support::associateEmail(Auth::getUserID(), $HTTP_POST_VARS['issue'], $HTTP_POST_VARS['item']);
+    } elseif ($_POST['target'] == 'reference') {
+        $res = Support::associateEmail(Auth::getUserID(), $_POST['issue'], $_POST['item']);
         if ($res == 1) {
-            Workflow::handleManualEmailAssociation(Issue::getProjectID($HTTP_POST_VARS['issue']), $HTTP_POST_VARS['issue']);
+            Workflow::handleManualEmailAssociation(Issue::getProjectID($_POST['issue']), $_POST['issue']);
         }
         $tpl->assign("associate_result", $res);
     } else {
-        for ($i = 0; $i < count($HTTP_POST_VARS['item']); $i++) {
-            $email = Support::getEmailDetails(Email_Account::getAccountByEmail($HTTP_POST_VARS['item'][$i]), $HTTP_POST_VARS['item'][$i]);
+        for ($i = 0; $i < count($_POST['item']); $i++) {
+            $email = Support::getEmailDetails(Email_Account::getAccountByEmail($_POST['item'][$i]), $_POST['item'][$i]);
             // add the message body as a note
-            $HTTP_POST_VARS['blocked_msg'] = $email['seb_full_email'];
-            $HTTP_POST_VARS['title'] = $email['sup_subject'];
-            $HTTP_POST_VARS['note'] = $email['seb_body'];
+            $_POST['blocked_msg'] = $email['seb_full_email'];
+            $_POST['title'] = $email['sup_subject'];
+            $_POST['note'] = $email['seb_body'];
             // XXX: probably broken to use the current logged in user as the 'owner' of 
             // XXX: this new note, but that's how it was already
-            $res = Note::insert(Auth::getUserID(), $HTTP_POST_VARS['issue']);
+            $res = Note::insert(Auth::getUserID(), $_POST['issue']);
             // remove the associated email
             if ($res) {
-                list($HTTP_POST_VARS["from"]) = Support::getSender(array($HTTP_POST_VARS['item'][$i]));
-                Workflow::handleBlockedEmail(Issue::getProjectID($HTTP_POST_VARS['issue']), $HTTP_POST_VARS['issue'], $HTTP_POST_VARS, 'associated');
-                Support::removeEmail($HTTP_POST_VARS['item'][$i]);
+                list($_POST["from"]) = Support::getSender(array($_POST['item'][$i]));
+                Workflow::handleBlockedEmail(Issue::getProjectID($_POST['issue']), $_POST['issue'], $_POST, 'associated');
+                Support::removeEmail($_POST['item'][$i]);
             }
         }
         $tpl->assign("associate_result", $res);
     }
-    @$tpl->assign('total_emails', count($HTTP_POST_VARS['item']));
+    @$tpl->assign('total_emails', count($_POST['item']));
 } else {
-    @$tpl->assign('emails', $HTTP_GET_VARS['item']);
-    @$tpl->assign('total_emails', count($HTTP_GET_VARS['item']));
-    $prj_id = Issue::getProjectID($HTTP_GET_VARS['issue']);
+    @$tpl->assign('emails', $_GET['item']);
+    @$tpl->assign('total_emails', count($_GET['item']));
+    $prj_id = Issue::getProjectID($_GET['issue']);
     if (Customer::hasCustomerIntegration($prj_id)) {
         // check if the selected emails all have sender email addresses that are associated with the issue' customer
-        $senders = Support::getSender($HTTP_GET_VARS['item']);
+        $senders = Support::getSender($_GET['item']);
         $sender_emails = array();
         for ($i = 0; $i < count($senders); $i++) {
             $email = Mail_API::getEmailAddress($senders[$i]);
             $sender_emails[$email] = $senders[$i];
         }
-        $customer_id = Issue::getCustomerID($HTTP_GET_VARS['issue']);
+        $customer_id = Issue::getCustomerID($_GET['issue']);
         if (!empty($customer_id)) {
             $contact_emails = array_keys(Customer::getContactEmailAssocList($prj_id, $customer_id));
             $unknown_contacts = array();
Index: news.php
===================================================================
--- news.php	(revision 3164)
+++ news.php	(working copy)
@@ -40,8 +40,8 @@
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
 $prj_id = Auth::getCurrentProject();
-if (!empty($HTTP_GET_VARS["id"])) {
-    $t = News::getDetails($HTTP_GET_VARS['id']);
+if (!empty($_GET["id"])) {
+    $t = News::getDetails($_GET['id']);
     $t['nws_created_date'] = Date_API::getFormattedDate($t["nws_created_date"]);
     $tpl->assign("news", array($t));
 } else {
Index: view_email.php
===================================================================
--- view_email.php	(revision 3164)
+++ view_email.php	(working copy)
@@ -39,7 +39,7 @@
 $tpl->setTemplate("view_email.tpl.html");
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
-$issue_id = Support::getIssueFromEmail($HTTP_GET_VARS["id"]);
+$issue_id = Support::getIssueFromEmail($_GET["id"]);
 
 if (!Issue::canAccess($issue_id, Auth::getUserID())) {
     $tpl->setTemplate("permission_denied.tpl.html");
@@ -47,27 +47,27 @@
     exit;
 }
 
-$email = Support::getEmailDetails($HTTP_GET_VARS["ema_id"], $HTTP_GET_VARS["id"]);
+$email = Support::getEmailDetails($_GET["ema_id"], $_GET["id"]);
 $email['seb_body'] = str_replace("&amp;nbsp;", "&nbsp;", $email['seb_body']);
 $tpl->bulkAssign(array(
     "email"           => $email,
     "issue_id"        => $issue_id,
-    'extra_title'     => "Email #" . $HTTP_GET_VARS['id'] . ": " . $email['sup_subject'],
+    'extra_title'     => "Email #" . $_GET['id'] . ": " . $email['sup_subject'],
     'email_accounts'  =>  Email_Account::getAssocList(array_keys(Project::getAssocList(Auth::getUserID())), true)
 ));
 
-if (@$HTTP_GET_VARS['cat'] == 'list_emails') {
-    $sides = Support::getListingSides($HTTP_GET_VARS["id"]);
+if (@$_GET['cat'] == 'list_emails') {
+    $sides = Support::getListingSides($_GET["id"]);
     $tpl->assign(array(
         'previous' => $sides['previous'],
         'next'     => $sides['next']
     ));
-} elseif ((@$HTTP_GET_VARS['cat'] == 'move_email') && (Auth::getCurrentRole() >= User::getRoleID("Standard User"))) {
-    $res = Support::moveEmail(@$HTTP_GET_VARS['id'], @$HTTP_GET_VARS['ema_id'], @$HTTP_GET_VARS['new_ema_id']);
+} elseif ((@$_GET['cat'] == 'move_email') && (Auth::getCurrentRole() >= User::getRoleID("Standard User"))) {
+    $res = Support::moveEmail(@$_GET['id'], @$_GET['ema_id'], @$_GET['new_ema_id']);
     $tpl->assign("move_email_result", $res);
     $tpl->assign("current_user_prefs", Prefs::get(Auth::getUserID()));
 } else {
-    $sides = Support::getIssueSides($issue_id, $HTTP_GET_VARS["id"]);
+    $sides = Support::getIssueSides($issue_id, $_GET["id"]);
     $tpl->assign(array(
         'previous' => $sides['previous'],
         'next'     => $sides['next']
Index: authorized_replier.php
===================================================================
--- authorized_replier.php	(revision 3164)
+++ authorized_replier.php	(working copy)
@@ -41,14 +41,14 @@
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
 $prj_id = Auth::getCurrentProject();
-$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["iss_id"];
+$issue_id = @$_POST["issue_id"] ? $_POST["issue_id"] : $_GET["iss_id"];
 $tpl->assign("issue_id", $issue_id);
 
-if (@$HTTP_POST_VARS["cat"] == "insert") {
-    $res = Authorized_Replier::manualInsert($issue_id, $HTTP_POST_VARS['email']);
+if (@$_POST["cat"] == "insert") {
+    $res = Authorized_Replier::manualInsert($issue_id, $_POST['email']);
     $tpl->assign("insert_result", $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "delete") {
-    $res = Authorized_Replier::removeRepliers($HTTP_POST_VARS["items"]);
+} elseif (@$_POST["cat"] == "delete") {
+    $res = Authorized_Replier::removeRepliers($_POST["items"]);
     $tpl->assign("delete_result", $res);
 }
 
Index: switch.php
===================================================================
--- switch.php	(revision 3164)
+++ switch.php	(working copy)
@@ -39,7 +39,7 @@
 
 // get the 'remember' setting of the project cookie
 $cookie = Auth::getCookieInfo(APP_PROJECT_COOKIE);
-Auth::setCurrentProject($HTTP_POST_VARS["current_project"], $cookie["remember"]);
+Auth::setCurrentProject($_POST["current_project"], $cookie["remember"]);
 
 $tpl->assign("current_user_prefs", Prefs::get(Auth::getUserID()));
 
Index: history.php
===================================================================
--- history.php	(revision 3164)
+++ history.php	(working copy)
@@ -39,11 +39,11 @@
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
-$tpl->assign("changes", History::getListing($HTTP_GET_VARS["iss_id"]));
+$tpl->assign("changes", History::getListing($_GET["iss_id"]));
 
 $role_id = Auth::getCurrentRole();
 if ($role_id > User::getRoleID('Customer')) {
-    $tpl->assign("reminders", Reminder::getHistoryList($HTTP_GET_VARS["iss_id"]));
+    $tpl->assign("reminders", Reminder::getHistoryList($_GET["iss_id"]));
 }
 
 $tpl->displayTemplate();
Index: preferences.php
===================================================================
--- preferences.php	(revision 3164)
+++ preferences.php	(working copy)
@@ -42,18 +42,18 @@
 
 $usr_id = Auth::getUserID();
 
-if (@$HTTP_POST_VARS["cat"] == "update_account") {
+if (@$_POST["cat"] == "update_account") {
     $res = Prefs::set($usr_id);
     $tpl->assign('update_lang_result', User::setLang(Auth::getUserID(), $_POST['language']));
     $tpl->assign('update_account_result', $res);
-    User::updateSMS($usr_id, @$HTTP_POST_VARS['sms_email']);
-} elseif (@$HTTP_POST_VARS["cat"] == "update_name") {
+    User::updateSMS($usr_id, @$_POST['sms_email']);
+} elseif (@$_POST["cat"] == "update_name") {
     $res = User::updateFullName($usr_id);
     $tpl->assign('update_name_result', $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "update_email") {
+} elseif (@$_POST["cat"] == "update_email") {
     $res = User::updateEmail($usr_id);
     $tpl->assign('update_email_result', $res);
-} elseif (@$HTTP_POST_VARS["cat"] == "update_password") {
+} elseif (@$_POST["cat"] == "update_password") {
     $res = User::updatePassword($usr_id);
     $tpl->assign('update_password_result', $res);
 }
Index: manage/priorities.php
===================================================================
--- manage/priorities.php	(revision 3164)
+++ manage/priorities.php	(working copy)
@@ -48,21 +48,21 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    @$prj_id = $HTTP_POST_VARS["prj_id"] ? $HTTP_POST_VARS["prj_id"] : $HTTP_GET_VARS["prj_id"];
+    @$prj_id = $_POST["prj_id"] ? $_POST["prj_id"] : $_GET["prj_id"];
     $tpl->assign("project", Project::getDetails($prj_id));
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Priority::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Priority::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Priority::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Priority::getDetails($HTTP_GET_VARS["id"]));
-    } elseif (@$HTTP_GET_VARS["cat"] == "change_rank") {
-        Priority::changeRank($prj_id, $HTTP_GET_VARS['id'], $HTTP_GET_VARS['rank']);
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Priority::getDetails($_GET["id"]));
+    } elseif (@$_GET["cat"] == "change_rank") {
+        Priority::changeRank($prj_id, $_GET['id'], $_GET['rank']);
     }
     $tpl->assign("list", Priority::getList($prj_id));
 } else {
Index: manage/reminder_conditions.php
===================================================================
--- manage/reminder_conditions.php	(revision 3164)
+++ manage/reminder_conditions.php	(working copy)
@@ -43,8 +43,8 @@
 
 $tpl->assign("type", "reminder_conditions");
 
-$rem_id = @$HTTP_POST_VARS['rem_id'] ? $HTTP_POST_VARS['rem_id'] : $HTTP_GET_VARS['rem_id'];
-$rma_id = @$HTTP_POST_VARS['rma_id'] ? $HTTP_POST_VARS['rma_id'] : $HTTP_GET_VARS['rma_id'];
+$rem_id = @$_POST['rem_id'] ? $_POST['rem_id'] : $_GET['rem_id'];
+$rma_id = @$_POST['rma_id'] ? $_POST['rma_id'] : $_GET['rma_id'];
 
 $role_id = Auth::getCurrentRole();
 if (($role_id == User::getRoleID('administrator')) || ($role_id == User::getRoleID('manager'))) {
@@ -52,28 +52,28 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Reminder_Condition::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Reminder_Condition::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Reminder_Condition::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $info = Reminder_Condition::getDetails($HTTP_GET_VARS["id"]);
-        if (!empty($HTTP_GET_VARS['field'])) {
-            $info['rlc_rmf_id'] = $HTTP_GET_VARS['field'];
+    if (@$_GET["cat"] == "edit") {
+        $info = Reminder_Condition::getDetails($_GET["id"]);
+        if (!empty($_GET['field'])) {
+            $info['rlc_rmf_id'] = $_GET['field'];
         } else {
-            $HTTP_GET_VARS['field'] = $info['rlc_rmf_id'];
+            $_GET['field'] = $info['rlc_rmf_id'];
         }
         $tpl->assign("info", $info);
         
     }
 
-    if (!empty($HTTP_GET_VARS['field'])) {
-        $field_title = Reminder_Condition::getFieldTitle($HTTP_GET_VARS['field']);
-        if (Reminder_Condition::canFieldBeCompared($HTTP_GET_VARS['field'])) {
+    if (!empty($_GET['field'])) {
+        $field_title = Reminder_Condition::getFieldTitle($_GET['field']);
+        if (Reminder_Condition::canFieldBeCompared($_GET['field'])) {
             $tpl->assign(array(
                 'show_field_options'    =>  'yes',
                 'comparable_fields'     =>  Reminder_Condition::getFieldAdminList(true)
@@ -93,9 +93,9 @@
         } else {
             $tpl->assign('show_status_options', 'no');
         }
-        if (@$HTTP_GET_VARS["cat"] != "edit") {
+        if (@$_GET["cat"] != "edit") {
             $tpl->assign('info', array(
-                'rlc_rmf_id' => $HTTP_GET_VARS['field'],
+                'rlc_rmf_id' => $_GET['field'],
                 'rlc_rmo_id' => '',
                 'rlc_value'  => ''
             ));
Index: manage/custom_fields.php
===================================================================
--- manage/custom_fields.php	(revision 3164)
+++ manage/custom_fields.php	(working copy)
@@ -45,18 +45,18 @@
 if ($role_id == User::getRoleID('administrator')) {
     $tpl->assign("show_setup_links", true);
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Custom_Field::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Custom_Field::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Custom_Field::remove();
     }elseif (@$_REQUEST["cat"] == "change_rank") {
         Custom_Field::changeRank();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Custom_Field::getDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Custom_Field::getDetails($_GET["id"]));
     }
     
     $excluded_roles = array();
Index: manage/users.php
===================================================================
--- manage/users.php	(revision 3164)
+++ manage/users.php	(working copy)
@@ -50,18 +50,18 @@
         $excluded_roles = array('customer', 'administrator');
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", User::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", User::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "change_status") {
+    } elseif (@$_POST["cat"] == "change_status") {
         User::changeStatus();
     }
 
     $project_roles = array();
     $project_list = Project::getAll();
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $info = User::getDetails($HTTP_GET_VARS["id"]);
+    if (@$_GET["cat"] == "edit") {
+        $info = User::getDetails($_GET["id"]);
         $tpl->assign("info", $info);
     }
     foreach ($project_list as $prj_id => $prj_title) {
@@ -77,7 +77,7 @@
         }
         $project_roles[$prj_id] = $user_roles = array(0 => "No Access") + User::getRoles($excluded_roles);
     }
-    if (@$HTTP_GET_VARS['show_customers'] == 1) {
+    if (@$_GET['show_customers'] == 1) {
         $show_customer = true;
     } else {
         $show_customer = false;
Index: manage/releases.php
===================================================================
--- manage/releases.php	(revision 3164)
+++ manage/releases.php	(working copy)
@@ -48,19 +48,19 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    @$prj_id = $HTTP_POST_VARS["prj_id"] ? $HTTP_POST_VARS["prj_id"] : $HTTP_GET_VARS["prj_id"];
+    @$prj_id = $_POST["prj_id"] ? $_POST["prj_id"] : $_GET["prj_id"];
     $tpl->assign("project", Project::getDetails($prj_id));
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Release::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Release::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Release::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Release::getDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Release::getDetails($_GET["id"]));
     }
 
     $tpl->assign("list", Release::getList($prj_id));
Index: manage/resolution.php
===================================================================
--- manage/resolution.php	(revision 3164)
+++ manage/resolution.php	(working copy)
@@ -47,16 +47,16 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Resolution::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Resolution::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Resolution::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Resolution::getDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Resolution::getDetails($_GET["id"]));
     }
 
     $tpl->assign("list", Resolution::getList());
Index: manage/faq.php
===================================================================
--- manage/faq.php	(revision 3164)
+++ manage/faq.php	(working copy)
@@ -48,25 +48,25 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", FAQ::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", FAQ::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         FAQ::remove();
-    } elseif (!empty($HTTP_GET_VARS['prj_id'])) {
-        $tpl->assign("info", array('faq_prj_id' => $HTTP_GET_VARS['prj_id']));
-        $backend_uses_support_levels = Customer::doesBackendUseSupportLevels($HTTP_GET_VARS['prj_id']);
+    } elseif (!empty($_GET['prj_id'])) {
+        $tpl->assign("info", array('faq_prj_id' => $_GET['prj_id']));
+        $backend_uses_support_levels = Customer::doesBackendUseSupportLevels($_GET['prj_id']);
         $tpl->assign("backend_uses_support_levels", $backend_uses_support_levels);
         if ($backend_uses_support_levels) {
-            $tpl->assign("support_levels", Customer::getSupportLevelAssocList($HTTP_GET_VARS['prj_id']));
+            $tpl->assign("support_levels", Customer::getSupportLevelAssocList($_GET['prj_id']));
         }
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $info = FAQ::getDetails($HTTP_GET_VARS["id"]);
-        if (!empty($HTTP_GET_VARS['prj_id'])) {
-            $info['faq_prj_id'] = $HTTP_GET_VARS['prj_id'];
+    if (@$_GET["cat"] == "edit") {
+        $info = FAQ::getDetails($_GET["id"]);
+        if (!empty($_GET['prj_id'])) {
+            $info['faq_prj_id'] = $_GET['prj_id'];
         }
         $backend_uses_support_levels = Customer::doesBackendUseSupportLevels($info['faq_prj_id']);
         $tpl->assign("backend_uses_support_levels", $backend_uses_support_levels);
@@ -74,8 +74,8 @@
             $tpl->assign("support_levels", Customer::getSupportLevelAssocList($info['faq_prj_id']));
         }
         $tpl->assign("info", $info);
-    } elseif (@$HTTP_GET_VARS["cat"] == "change_rank") {
-        FAQ::changeRank($HTTP_GET_VARS['id'], $HTTP_GET_VARS['rank']);
+    } elseif (@$_GET["cat"] == "change_rank") {
+        FAQ::changeRank($_GET['id'], $_GET['rank']);
     }
 
     $tpl->assign("list", FAQ::getList());
Index: manage/field_display.php
===================================================================
--- manage/field_display.php	(revision 3164)
+++ manage/field_display.php	(working copy)
@@ -43,7 +43,7 @@
 
 $tpl->assign("type", "field_display");
 
-$prj_id = @$HTTP_GET_VARS["prj_id"];
+$prj_id = @$_GET["prj_id"];
 
 $role_id = Auth::getCurrentRole();
 if (($role_id == User::getRoleID('administrator')) || ($role_id == User::getRoleID('manager'))) {
@@ -51,8 +51,8 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (count(@$HTTP_POST_VARS["min_role"]) > 0) {
-        $tpl->assign("result", Project::updateFieldDisplaySettings($prj_id, $HTTP_POST_VARS["min_role"]));
+    if (count(@$_POST["min_role"]) > 0) {
+        $tpl->assign("result", Project::updateFieldDisplaySettings($prj_id, $_POST["min_role"]));
     }
 
     $fields = Project::getDisplayFields();
Index: manage/customer_notes.php
===================================================================
--- manage/customer_notes.php	(revision 3164)
+++ manage/customer_notes.php	(working copy)
@@ -48,21 +48,21 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
-        $tpl->assign("result", Customer::insertNote($HTTP_POST_VARS["project"], $HTTP_POST_VARS["customer"], $HTTP_POST_VARS["note"]));
-    } else if (@$HTTP_POST_VARS["cat"] == "update") {
-        $tpl->assign("result", Customer::updateNote($HTTP_POST_VARS["id"], $HTTP_POST_VARS["project"], $HTTP_POST_VARS["customer"], $HTTP_POST_VARS["note"])); 
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
-        $tpl->assign("result", Customer::removeNotes($HTTP_POST_VARS['items']));
-    } elseif (!empty($HTTP_GET_VARS['prj_id'])) {
-        $tpl->assign("info", array('cno_prj_id' => $HTTP_GET_VARS['prj_id']));
-        $tpl->assign('customers', Customer::getAssocList($HTTP_GET_VARS['prj_id']));
+    if (@$_POST["cat"] == "new") {
+        $tpl->assign("result", Customer::insertNote($_POST["project"], $_POST["customer"], $_POST["note"]));
+    } else if (@$_POST["cat"] == "update") {
+        $tpl->assign("result", Customer::updateNote($_POST["id"], $_POST["project"], $_POST["customer"], $_POST["note"])); 
+    } elseif (@$_POST["cat"] == "delete") {
+        $tpl->assign("result", Customer::removeNotes($_POST['items']));
+    } elseif (!empty($_GET['prj_id'])) {
+        $tpl->assign("info", array('cno_prj_id' => $_GET['prj_id']));
+        $tpl->assign('customers', Customer::getAssocList($_GET['prj_id']));
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $info = Customer::getNoteDetailsByID($HTTP_GET_VARS["id"]);
-        if (!empty($HTTP_GET_VARS['prj_id'])) {
-            $info['cno_prj_id'] = $HTTP_GET_VARS['prj_id'];
+    if (@$_GET["cat"] == "edit") {
+        $info = Customer::getNoteDetailsByID($_GET["id"]);
+        if (!empty($_GET['prj_id'])) {
+            $info['cno_prj_id'] = $_GET['prj_id'];
         }
         $tpl->assign('customers', Customer::getAssocList($info['cno_prj_id']));
         $tpl->assign("info", $info);
Index: manage/news.php
===================================================================
--- manage/news.php	(revision 3164)
+++ manage/news.php	(working copy)
@@ -47,16 +47,16 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", News::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", News::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         News::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", News::getAdminDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", News::getAdminDetails($_GET["id"]));
     }
 
     $tpl->assign("list", News::getList());
Index: manage/groups.php
===================================================================
--- manage/groups.php	(revision 3164)
+++ manage/groups.php	(working copy)
@@ -48,23 +48,23 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Group::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Group::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Group::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $info = Group::getDetails($HTTP_GET_VARS["id"]);
+    if (@$_GET["cat"] == "edit") {
+        $info = Group::getDetails($_GET["id"]);
         $tpl->assign("info", $info);
-        $user_options = User::getActiveAssocList(Auth::getCurrentProject(), User::getRoleID('customer'), false, $HTTP_GET_VARS["id"]);
+        $user_options = User::getActiveAssocList(Auth::getCurrentProject(), User::getRoleID('customer'), false, $_GET["id"]);
     } else {
         $user_options = User::getActiveAssocList(Auth::getCurrentProject(), User::getRoleID('customer'), true);
     }
 
-    if (@$HTTP_GET_VARS['show_customers'] == 1) {
+    if (@$_GET['show_customers'] == 1) {
         $show_customer = true;
     } else {
         $show_customer = false;
Index: manage/time_tracking.php
===================================================================
--- manage/time_tracking.php	(revision 3164)
+++ manage/time_tracking.php	(working copy)
@@ -47,16 +47,16 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Time_Tracking::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Time_Tracking::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Time_Tracking::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Time_Tracking::getDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Time_Tracking::getDetails($_GET["id"]));
     }
 
     $tpl->assign("list", Time_Tracking::getList());
Index: manage/round_robin.php
===================================================================
--- manage/round_robin.php	(revision 3164)
+++ manage/round_robin.php	(working copy)
@@ -47,16 +47,16 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Round_Robin::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Round_Robin::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Round_Robin::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $info = Round_Robin::getDetails($HTTP_GET_VARS["id"]);
+    if (@$_GET["cat"] == "edit") {
+        $info = Round_Robin::getDetails($_GET["id"]);
         $tpl->assign("info", $info);
         $_REQUEST['prj_id'] = $info['prr_prj_id'];
     }
Index: manage/reminder_review.php
===================================================================
--- manage/reminder_review.php	(revision 3164)
+++ manage/reminder_review.php	(working copy)
@@ -43,7 +43,7 @@
 
 echo "<span class='default'>";
 echo "<b>The following is the SQL statement produced by this reminder:</b><br /><br />";
-echo nl2br(Reminder::getSQLQuery($HTTP_GET_VARS['rem_id'], $HTTP_GET_VARS['rma_id']));
+echo nl2br(Reminder::getSQLQuery($_GET['rem_id'], $_GET['rma_id']));
 
 ?>
 
Index: manage/email_accounts.php
===================================================================
--- manage/email_accounts.php	(revision 3164)
+++ manage/email_accounts.php	(working copy)
@@ -48,16 +48,16 @@
 if ($role_id == User::getRoleID('administrator')) {
     $tpl->assign("show_setup_links", true);
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Email_Account::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Email_Account::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Email_Account::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Email_Account::getDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Email_Account::getDetails($_GET["id"]));
     }
     $tpl->assign("list", Email_Account::getList());
 } else {
Index: manage/email_responses.php
===================================================================
--- manage/email_responses.php	(revision 3164)
+++ manage/email_responses.php	(working copy)
@@ -47,16 +47,16 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Email_Response::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Email_Response::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Email_Response::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Email_Response::getDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Email_Response::getDetails($_GET["id"]));
     }
 
     $tpl->assign("project_list", Project::getAll());
Index: manage/anonymous.php
===================================================================
--- manage/anonymous.php	(revision 3164)
+++ manage/anonymous.php	(working copy)
@@ -45,7 +45,7 @@
 
 $tpl->assign("type", "anonymous");
 
-@$prj_id = $HTTP_POST_VARS["prj_id"] ? $HTTP_POST_VARS["prj_id"] : $HTTP_GET_VARS["prj_id"];
+@$prj_id = $_POST["prj_id"] ? $_POST["prj_id"] : $_GET["prj_id"];
 
 $role_id = Auth::getCurrentRole();
 if (($role_id == User::getRoleID('administrator')) || ($role_id == User::getRoleID('manager'))) {
@@ -53,7 +53,7 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "update") {
+    if (@$_POST["cat"] == "update") {
         $tpl->assign("result", Project::updateAnonymousPost($prj_id));
     }
     // load the form fields
Index: manage/projects.php
===================================================================
--- manage/projects.php	(revision 3164)
+++ manage/projects.php	(working copy)
@@ -49,17 +49,17 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Project::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Project::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Project::remove();
     }
     $tpl->assign("active_projects", Project::getAssocList(Auth::getUserID(), true));
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Project::getDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Project::getDetails($_GET["id"]));
     }
 
     $tpl->assign("list", Project::getList());
Index: manage/check_email_settings.php
===================================================================
--- manage/check_email_settings.php	(revision 3164)
+++ manage/check_email_settings.php	(working copy)
@@ -51,17 +51,17 @@
     echo "Please refer to the PHP manual for more details about how to enable the IMAP extension.</b>";
 } else {
     // check if the hostname is just an IP based one
-    if ((!preg_match("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $HTTP_POST_VARS["hostname"])) &&
-            (gethostbyname($HTTP_POST_VARS["hostname"]) == $HTTP_POST_VARS["hostname"])) {
+    if ((!preg_match("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $_POST["hostname"])) &&
+            (gethostbyname($_POST["hostname"]) == $_POST["hostname"])) {
         echo "<b>The provided hostname could not be resolved. Please check your information and try again.</b>";
     } else {
         $account = array(
-            "ema_hostname" => $HTTP_POST_VARS["hostname"],
-            "ema_port"     => $HTTP_POST_VARS["port"],
-            "ema_type"     => $HTTP_POST_VARS["type"],
-            "ema_folder"   => $HTTP_POST_VARS["folder"],
-            "ema_username" => $HTTP_POST_VARS["username"],
-            "ema_password" => $HTTP_POST_VARS["password"]
+            "ema_hostname" => $_POST["hostname"],
+            "ema_port"     => $_POST["port"],
+            "ema_type"     => $_POST["type"],
+            "ema_folder"   => $_POST["folder"],
+            "ema_username" => $_POST["username"],
+            "ema_password" => $_POST["password"]
         );
         $mbox = Support::connectEmailServer($account);
         if (!$mbox) {
Index: manage/issue_auto_creation.php
===================================================================
--- manage/issue_auto_creation.php	(revision 3164)
+++ manage/issue_auto_creation.php	(working copy)
@@ -46,7 +46,7 @@
 
 $tpl->assign("type", "issue_auto_creation");
 
-@$ema_id = $HTTP_POST_VARS["ema_id"] ? $HTTP_POST_VARS["ema_id"] : $HTTP_GET_VARS["ema_id"];
+@$ema_id = $_POST["ema_id"] ? $_POST["ema_id"] : $_GET["ema_id"];
 
 $role_id = Auth::getCurrentRole();
 if (($role_id == User::getRoleID('administrator')) || ($role_id == User::getRoleID('manager'))) {
@@ -56,8 +56,8 @@
 
     $prj_id = Email_Account::getProjectID($ema_id);
 
-    if (@$HTTP_POST_VARS["cat"] == "update") {
-        @Email_Account::updateIssueAutoCreation($ema_id, $HTTP_POST_VARS['issue_auto_creation'], $HTTP_POST_VARS['options']);
+    if (@$_POST["cat"] == "update") {
+        @Email_Account::updateIssueAutoCreation($ema_id, $_POST['issue_auto_creation'], $_POST['options']);
     }
     // load the form fields
     $tpl->assign("info", Email_Account::getDetails($ema_id));
Index: manage/account_managers.php
===================================================================
--- manage/account_managers.php	(revision 3164)
+++ manage/account_managers.php	(working copy)
@@ -46,21 +46,21 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Customer::insertAccountManager());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Customer::updateAccountManager());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Customer::removeAccountManager();
-    } elseif (!empty($HTTP_GET_VARS['prj_id'])) {
-        $tpl->assign("info", array('cam_prj_id' => $HTTP_GET_VARS['prj_id']));
-        $tpl->assign('customers', Customer::getAssocList($HTTP_GET_VARS['prj_id']));
+    } elseif (!empty($_GET['prj_id'])) {
+        $tpl->assign("info", array('cam_prj_id' => $_GET['prj_id']));
+        $tpl->assign('customers', Customer::getAssocList($_GET['prj_id']));
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $info = Customer::getAccountManagerDetails($HTTP_GET_VARS["id"]);
-        if (!empty($HTTP_GET_VARS['prj_id'])) {
-            $info['cam_prj_id'] = $HTTP_GET_VARS['prj_id'];
+    if (@$_GET["cat"] == "edit") {
+        $info = Customer::getAccountManagerDetails($_GET["id"]);
+        if (!empty($_GET['prj_id'])) {
+            $info['cam_prj_id'] = $_GET['prj_id'];
         }
         $tpl->assign('customers', Customer::getAssocList($info['cam_prj_id']));
         $tpl->assign("info", $info);
Index: manage/customize_listing.php
===================================================================
--- manage/customize_listing.php	(revision 3164)
+++ manage/customize_listing.php	(working copy)
@@ -46,16 +46,16 @@
 if ($role_id == User::getRoleID('administrator')) {
     $tpl->assign("show_setup_links", true);
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
-        $tpl->assign("result", Status::insertCustomization($HTTP_POST_VARS['project'], $HTTP_POST_VARS['status'], $HTTP_POST_VARS['date_field'], $HTTP_POST_VARS['label']));
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
-        $tpl->assign("result", Status::updateCustomization($HTTP_POST_VARS['id'], $HTTP_POST_VARS['project'], $HTTP_POST_VARS['status'], $HTTP_POST_VARS['date_field'], $HTTP_POST_VARS['label']));
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
-        Status::removeCustomization($HTTP_POST_VARS['items']);
+    if (@$_POST["cat"] == "new") {
+        $tpl->assign("result", Status::insertCustomization($_POST['project'], $_POST['status'], $_POST['date_field'], $_POST['label']));
+    } elseif (@$_POST["cat"] == "update") {
+        $tpl->assign("result", Status::updateCustomization($_POST['id'], $_POST['project'], $_POST['status'], $_POST['date_field'], $_POST['label']));
+    } elseif (@$_POST["cat"] == "delete") {
+        Status::removeCustomization($_POST['items']);
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $details = Status::getCustomizationDetails($HTTP_GET_VARS["id"]);
+    if (@$_GET["cat"] == "edit") {
+        $details = Status::getCustomizationDetails($_GET["id"]);
         $tpl->assign(array(
             "info"        => $details,
             'project_id'  => $details['psd_prj_id'],
@@ -64,7 +64,7 @@
     }
 
     $display_customer_fields = false;
-    @$prj_id = $HTTP_POST_VARS["prj_id"] ? $HTTP_POST_VARS["prj_id"] : $HTTP_GET_VARS["prj_id"];
+    @$prj_id = $_POST["prj_id"] ? $_POST["prj_id"] : $_GET["prj_id"];
     if (!empty($prj_id)) {
         $tpl->assign("status_list", Status::getAssocStatusList($prj_id, TRUE));
         $tpl->assign('project_id', $prj_id);
Index: manage/statuses.php
===================================================================
--- manage/statuses.php	(revision 3164)
+++ manage/statuses.php	(working copy)
@@ -47,16 +47,16 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Status::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Status::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Status::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Status::getDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Status::getDetails($_GET["id"]));
     }
 
     $tpl->assign("list", Status::getList());
Index: manage/general.php
===================================================================
--- manage/general.php	(revision 3164)
+++ manage/general.php	(working copy)
@@ -48,32 +48,32 @@
 
     $tpl->assign("project_list", Project::getAll());
 
-    if (@$HTTP_POST_VARS["cat"] == "update") {
+    if (@$_POST["cat"] == "update") {
         $setup = array();
-        $setup["tool_caption"] = $HTTP_POST_VARS["tool_caption"];
-        $setup["support_email"] = $HTTP_POST_VARS["support_email"];
-        $setup["daily_tips"] = $HTTP_POST_VARS["daily_tips"];
-        $setup["spell_checker"] = $HTTP_POST_VARS["spell_checker"];
-        $setup["irc_notification"] = $HTTP_POST_VARS["irc_notification"];
-        $setup["allow_unassigned_issues"] = $HTTP_POST_VARS["allow_unassigned_issues"];
-        @$setup["update"] = $HTTP_POST_VARS["update"];
-        @$setup["closed"] = $HTTP_POST_VARS["closed"];
-        @$setup["notes"] = $HTTP_POST_VARS["notes"];
-        @$setup["emails"] = $HTTP_POST_VARS["emails"];
-        @$setup["files"] = $HTTP_POST_VARS["files"];
-        @$setup["smtp"] = $HTTP_POST_VARS["smtp"];
-        @$setup["scm_integration"] = $HTTP_POST_VARS["scm_integration"];
-        @$setup["checkout_url"] = $HTTP_POST_VARS["checkout_url"];
-        @$setup["diff_url"] = $HTTP_POST_VARS["diff_url"];
-        @$setup["open_signup"] = $HTTP_POST_VARS["open_signup"];
-        @$setup["accounts_projects"] = $HTTP_POST_VARS["accounts_projects"];
-        @$setup["accounts_role"] = $HTTP_POST_VARS["accounts_role"];
-        @$setup['subject_based_routing'] = $HTTP_POST_VARS['subject_based_routing'];
-        @$setup['email_routing'] = $HTTP_POST_VARS['email_routing'];
-        @$setup['note_routing'] = $HTTP_POST_VARS['note_routing'];
-        @$setup['draft_routing'] = $HTTP_POST_VARS['draft_routing'];
-        @$setup['email_error'] = $HTTP_POST_VARS['email_error'];
-        @$setup['email_reminder'] = $HTTP_POST_VARS['email_reminder'];
+        $setup["tool_caption"] = $_POST["tool_caption"];
+        $setup["support_email"] = $_POST["support_email"];
+        $setup["daily_tips"] = $_POST["daily_tips"];
+        $setup["spell_checker"] = $_POST["spell_checker"];
+        $setup["irc_notification"] = $_POST["irc_notification"];
+        $setup["allow_unassigned_issues"] = $_POST["allow_unassigned_issues"];
+        @$setup["update"] = $_POST["update"];
+        @$setup["closed"] = $_POST["closed"];
+        @$setup["notes"] = $_POST["notes"];
+        @$setup["emails"] = $_POST["emails"];
+        @$setup["files"] = $_POST["files"];
+        @$setup["smtp"] = $_POST["smtp"];
+        @$setup["scm_integration"] = $_POST["scm_integration"];
+        @$setup["checkout_url"] = $_POST["checkout_url"];
+        @$setup["diff_url"] = $_POST["diff_url"];
+        @$setup["open_signup"] = $_POST["open_signup"];
+        @$setup["accounts_projects"] = $_POST["accounts_projects"];
+        @$setup["accounts_role"] = $_POST["accounts_role"];
+        @$setup['subject_based_routing'] = $_POST['subject_based_routing'];
+        @$setup['email_routing'] = $_POST['email_routing'];
+        @$setup['note_routing'] = $_POST['note_routing'];
+        @$setup['draft_routing'] = $_POST['draft_routing'];
+        @$setup['email_error'] = $_POST['email_error'];
+        @$setup['email_reminder'] = $_POST['email_reminder'];
         $options = Setup::load();
         @$setup['downloading_emails'] = $options['downloading_emails'];
         $res = Setup::save($setup);
Index: manage/phone_categories.php
===================================================================
--- manage/phone_categories.php	(revision 3164)
+++ manage/phone_categories.php	(working copy)
@@ -48,19 +48,19 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    @$prj_id = $HTTP_POST_VARS["prj_id"] ? $HTTP_POST_VARS["prj_id"] : $HTTP_GET_VARS["prj_id"];
+    @$prj_id = $_POST["prj_id"] ? $_POST["prj_id"] : $_GET["prj_id"];
     $tpl->assign("project", Project::getDetails($prj_id));
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Phone_Support::insertCategory());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Phone_Support::updateCategory());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Phone_Support::removeCategory();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Phone_Support::getCategoryDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Phone_Support::getCategoryDetails($_GET["id"]));
     }
     $tpl->assign("list", Phone_Support::getCategoryList($prj_id));
 } else {
Index: manage/column_display.php
===================================================================
--- manage/column_display.php	(revision 3164)
+++ manage/column_display.php	(working copy)
@@ -49,7 +49,7 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "save") {
+    if (@$_POST["cat"] == "save") {
         $tpl->assign("result", Display_Column::save());
     }
 
Index: manage/categories.php
===================================================================
--- manage/categories.php	(revision 3164)
+++ manage/categories.php	(working copy)
@@ -48,19 +48,19 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    @$prj_id = $HTTP_POST_VARS["prj_id"] ? $HTTP_POST_VARS["prj_id"] : $HTTP_GET_VARS["prj_id"];
+    @$prj_id = $_POST["prj_id"] ? $_POST["prj_id"] : $_GET["prj_id"];
     $tpl->assign("project", Project::getDetails($prj_id));
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Category::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Category::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Category::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Category::getDetails($HTTP_GET_VARS["id"]));
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Category::getDetails($_GET["id"]));
     }
     $tpl->assign("list", Category::getList($prj_id));
 } else {
Index: manage/link_filters.php
===================================================================
--- manage/link_filters.php	(revision 3164)
+++ manage/link_filters.php	(working copy)
@@ -48,16 +48,16 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Link_Filter::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Link_Filter::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         $tpl->assign("result", Link_Filter::remove());
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $info = Link_Filter::getDetails($HTTP_GET_VARS["id"]);
+    if (@$_GET["cat"] == "edit") {
+        $info = Link_Filter::getDetails($_GET["id"]);
         $tpl->assign("info", $info);
     }
     
Index: manage/reminder_actions.php
===================================================================
--- manage/reminder_actions.php	(revision 3164)
+++ manage/reminder_actions.php	(working copy)
@@ -42,7 +42,7 @@
 
 $tpl->assign("type", "reminder_actions");
 
-$rem_id = @$HTTP_POST_VARS['rem_id'] ? $HTTP_POST_VARS['rem_id'] : $HTTP_GET_VARS['rem_id'];
+$rem_id = @$_POST['rem_id'] ? $_POST['rem_id'] : $_GET['rem_id'];
 
 $role_id = Auth::getCurrentRole();
 if (($role_id == User::getRoleID('administrator')) || ($role_id == User::getRoleID('manager'))) {
@@ -50,18 +50,18 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Reminder_Action::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Reminder_Action::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
-        @Reminder_Action::remove($HTTP_POST_VARS['items']);
+    } elseif (@$_POST["cat"] == "delete") {
+        @Reminder_Action::remove($_POST['items']);
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $tpl->assign("info", Reminder_Action::getDetails($HTTP_GET_VARS["id"]));
-    } elseif (@$HTTP_GET_VARS["cat"] == "change_rank") {
-        Reminder_Action::changeRank($HTTP_GET_VARS['rem_id'], $HTTP_GET_VARS['id'], $HTTP_GET_VARS['rank']);
+    if (@$_GET["cat"] == "edit") {
+        $tpl->assign("info", Reminder_Action::getDetails($_GET["id"]));
+    } elseif (@$_GET["cat"] == "change_rank") {
+        Reminder_Action::changeRank($_GET['rem_id'], $_GET['id'], $_GET['rank']);
     }
 
     $tpl->assign("rem_id", $rem_id);
Index: manage/reminders.php
===================================================================
--- manage/reminders.php	(revision 3164)
+++ manage/reminders.php	(working copy)
@@ -50,18 +50,18 @@
         $tpl->assign("show_setup_links", true);
     }
 
-    if (@$HTTP_POST_VARS["cat"] == "new") {
+    if (@$_POST["cat"] == "new") {
         $tpl->assign("result", Reminder::insert());
-    } elseif (@$HTTP_POST_VARS["cat"] == "update") {
+    } elseif (@$_POST["cat"] == "update") {
         $tpl->assign("result", Reminder::update());
-    } elseif (@$HTTP_POST_VARS["cat"] == "delete") {
+    } elseif (@$_POST["cat"] == "delete") {
         Reminder::remove();
     }
 
-    if (@$HTTP_GET_VARS["cat"] == "edit") {
-        $info = Reminder::getDetails($HTTP_GET_VARS["id"]);
-        if (!empty($HTTP_GET_VARS['prj_id'])) {
-            $info['rem_prj_id'] = $HTTP_GET_VARS['prj_id'];
+    if (@$_GET["cat"] == "edit") {
+        $info = Reminder::getDetails($_GET["id"]);
+        if (!empty($_GET['prj_id'])) {
+            $info['rem_prj_id'] = $_GET['prj_id'];
         }
         // only show customers and support levels if the selected project really needs it
         $project_has_customer_integration = Customer::hasCustomerIntegration($info['rem_prj_id']);
@@ -81,24 +81,24 @@
         $priorities = array_flip(Priority::getAssocList($info['rem_prj_id']));
         unset($priorities['Not Prioritized']);
         $tpl->assign("priorities", array_flip($priorities));
-    } elseif (@$HTTP_GET_VARS["cat"] == "change_rank") {
-        Reminder::changeRank($HTTP_GET_VARS['id'], $HTTP_GET_VARS['rank']);
-    } elseif (!empty($HTTP_GET_VARS['prj_id'])) {
-        $tpl->assign("info", array('rem_prj_id' => $HTTP_GET_VARS['prj_id']));
-        $tpl->assign('issues', Reminder::getIssueAssocListByProject($HTTP_GET_VARS['prj_id']));
+    } elseif (@$_GET["cat"] == "change_rank") {
+        Reminder::changeRank($_GET['id'], $_GET['rank']);
+    } elseif (!empty($_GET['prj_id'])) {
+        $tpl->assign("info", array('rem_prj_id' => $_GET['prj_id']));
+        $tpl->assign('issues', Reminder::getIssueAssocListByProject($_GET['prj_id']));
         // wouldn't make much sense to create a reminder for a 'Not Prioritized' 
         // issue, so let's remove that as an option
-        $priorities = array_flip(Priority::getAssocList($HTTP_GET_VARS['prj_id']));
+        $priorities = array_flip(Priority::getAssocList($_GET['prj_id']));
         unset($priorities['Not Prioritized']);
         $tpl->assign("priorities", array_flip($priorities));
         // only show customers and support levels if the selected project really needs it
-        $project_has_customer_integration = Customer::hasCustomerIntegration($HTTP_GET_VARS['prj_id']);
+        $project_has_customer_integration = Customer::hasCustomerIntegration($_GET['prj_id']);
         $tpl->assign("project_has_customer_integration", $project_has_customer_integration);
         if ($project_has_customer_integration) {
-            $tpl->assign("customers", Customer::getAssocList($HTTP_GET_VARS['prj_id']));
-            $backend_uses_support_levels = Customer::doesBackendUseSupportLevels($HTTP_GET_VARS['prj_id']);
+            $tpl->assign("customers", Customer::getAssocList($_GET['prj_id']));
+            $backend_uses_support_levels = Customer::doesBackendUseSupportLevels($_GET['prj_id']);
             if ($backend_uses_support_levels) {
-                $tpl->assign("support_levels", Customer::getSupportLevelAssocList($HTTP_GET_VARS['prj_id']));
+                $tpl->assign("support_levels", Customer::getSupportLevelAssocList($_GET['prj_id']));
             }
             $tpl->assign("backend_uses_support_levels", $backend_uses_support_levels);
         }
Index: close.php
===================================================================
--- close.php	(revision 3164)
+++ close.php	(working copy)
@@ -44,7 +44,7 @@
 Auth::checkAuthentication(APP_COOKIE);
 
 $prj_id = Auth::getCurrentProject();
-$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : @$HTTP_GET_VARS["id"];
+$issue_id = @$_POST["issue_id"] ? $_POST["issue_id"] : @$_GET["id"];
 $tpl->assign("extra_title", "Close Issue #$issue_id");
 
 if (!Issue::exists($issue_id, false)) {
@@ -59,11 +59,11 @@
 $notification_list_internal = Notification::getSubscribers($issue_id, 'closed', User::getRoleID("Standard User"));
 $tpl->assign("notification_list_internal", $notification_list_internal['all']);
 
-if (@$HTTP_POST_VARS["cat"] == "close") {
-    $res = Issue::close(Auth::getUserID(), $HTTP_POST_VARS["issue_id"], $HTTP_POST_VARS["send_notification"], $HTTP_POST_VARS["resolution"], $HTTP_POST_VARS["status"], $HTTP_POST_VARS["reason"], @$_REQUEST['notification_list']);
+if (@$_POST["cat"] == "close") {
+    $res = Issue::close(Auth::getUserID(), $_POST["issue_id"], $_POST["send_notification"], $_POST["resolution"], $_POST["status"], $_POST["reason"], @$_REQUEST['notification_list']);
 
-    if (!empty($HTTP_POST_VARS['time_spent'])) {
-        $HTTP_POST_VARS['summary'] = 'Time entry inserted when closing issue.';
+    if (!empty($_POST['time_spent'])) {
+        $_POST['summary'] = 'Time entry inserted when closing issue.';
         Time_Tracking::insertEntry();
     }
 
Index: signup.php
===================================================================
--- signup.php	(revision 3164)
+++ signup.php	(working copy)
@@ -35,7 +35,7 @@
 $tpl = new Template_API();
 $tpl->setTemplate("signup.tpl.html");
 
-if (@$HTTP_POST_VARS['cat'] == 'signup') {
+if (@$_POST['cat'] == 'signup') {
     $setup = Setup::load();
     $res = User::createVisitorAccount($setup['accounts_role'], $setup['accounts_projects']);
     $tpl->assign('signup_result', $res);
Index: rss.php
===================================================================
--- rss.php	(revision 3164)
+++ rss.php	(working copy)
@@ -72,78 +72,78 @@
 // Extra tweak needed for IIS/ISAPI users since the PHP_AUTH_USER/PW variables are
 // not set on that particular platform. Instead what you get is a base64 encoded
 // value of the username:password under HTTP_AUTHORIZATION
-if (!empty($HTTP_SERVER_VARS['HTTP_AUTHORIZATION'])) {
-    $pieces = explode(':', base64_decode(substr($HTTP_SERVER_VARS['HTTP_AUTHORIZATION'], 6)));
-    $HTTP_SERVER_VARS['PHP_AUTH_USER'] = $pieces[0];
-    $HTTP_SERVER_VARS['PHP_AUTH_PW'] = $pieces[1];
-} elseif ((!empty($HTTP_SERVER_VARS['ALL_HTTP'])) && (strstr($HTTP_SERVER_VARS['ALL_HTTP'], 'HTTP_AUTHORIZATION'))) {
-    preg_match('/HTTP_AUTHORIZATION:Basic (.*)/', $HTTP_SERVER_VARS['ALL_HTTP'], $matches);
+if (!empty($_SERVER['HTTP_AUTHORIZATION'])) {
+    $pieces = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
+    $_SERVER['PHP_AUTH_USER'] = $pieces[0];
+    $_SERVER['PHP_AUTH_PW'] = $pieces[1];
+} elseif ((!empty($_SERVER['ALL_HTTP'])) && (strstr($_SERVER['ALL_HTTP'], 'HTTP_AUTHORIZATION'))) {
+    preg_match('/HTTP_AUTHORIZATION:Basic (.*)/', $_SERVER['ALL_HTTP'], $matches);
     if (count($matches) > 0) {
         $pieces = explode(':', base64_decode($matches[1]));
-        $HTTP_SERVER_VARS['PHP_AUTH_USER'] = $pieces[0];
-        $HTTP_SERVER_VARS['PHP_AUTH_PW'] = $pieces[1];
+        $_SERVER['PHP_AUTH_USER'] = $pieces[0];
+        $_SERVER['PHP_AUTH_PW'] = $pieces[1];
     }
 }
 
-if (!isset($HTTP_SERVER_VARS['PHP_AUTH_USER'])) {
+if (!isset($_SERVER['PHP_AUTH_USER'])) {
     authenticate();
     echo 'Error: You are required to authenticate in order to access the requested RSS feed.';
     exit;
 } else {
     // check the authentication
-    if (Validation::isWhitespace($HTTP_SERVER_VARS['PHP_AUTH_USER'])) {
+    if (Validation::isWhitespace($_SERVER['PHP_AUTH_USER'])) {
         authenticate();
         echo 'Error: Please provide your email address.';
         exit;
     }
-    if (Validation::isWhitespace($HTTP_SERVER_VARS['PHP_AUTH_PW'])) {
+    if (Validation::isWhitespace($_SERVER['PHP_AUTH_PW'])) {
         authenticate();
         echo 'Error: Please provide your password.';
         exit;
     }
     // check if user exists
-    if (!Auth::userExists($HTTP_SERVER_VARS['PHP_AUTH_USER'])) {
+    if (!Auth::userExists($_SERVER['PHP_AUTH_USER'])) {
         authenticate();
         echo 'Error: The user specified does not exist.';
         exit;
     }
     // check if the password matches
-    if (!Auth::isCorrectPassword($HTTP_SERVER_VARS['PHP_AUTH_USER'], $HTTP_SERVER_VARS['PHP_AUTH_PW'])) {
+    if (!Auth::isCorrectPassword($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) {
         authenticate();
         echo 'Error: The provided email address/password combo is not correct.';
         exit;
     }
     // check if this user did already confirm his account
-    if (Auth::isPendingUser($HTTP_SERVER_VARS['PHP_AUTH_USER'])) {
+    if (Auth::isPendingUser($_SERVER['PHP_AUTH_USER'])) {
         authenticate();
         echo 'Error: The provided user still needs to have its account confirmed.';
         exit;
     }
     // check if this user is really an active one
-    if (!Auth::isActiveUser($HTTP_SERVER_VARS['PHP_AUTH_USER'])) {
+    if (!Auth::isActiveUser($_SERVER['PHP_AUTH_USER'])) {
         authenticate();
         echo 'Error: The provided user is currently set as an inactive user.';
         exit;
     }
 
     // check if the required parameter 'custom_id' is really being passed
-    if (empty($HTTP_GET_VARS['custom_id'])) {
+    if (empty($_GET['custom_id'])) {
         returnError("Error: The required 'custom_id' parameter was not provided.");
         exit;
     }
 
-    $usr_id = User::getUserIDByEmail($HTTP_SERVER_VARS['PHP_AUTH_USER']);
+    $usr_id = User::getUserIDByEmail($_SERVER['PHP_AUTH_USER']);
     // check if the passed 'custom_id' parameter is associated with the usr_id
-    if ((!Filter::isGlobal($HTTP_GET_VARS['custom_id'])) && (!Filter::isOwner($HTTP_GET_VARS['custom_id'], $usr_id))) {
+    if ((!Filter::isGlobal($_GET['custom_id'])) && (!Filter::isOwner($_GET['custom_id'], $usr_id))) {
         returnError('Error: The provided custom filter ID is not associated with the given email address.');
         exit;
     }
 }
 
 
-$filter = Filter::getDetails($HTTP_GET_VARS["custom_id"], FALSE);
+$filter = Filter::getDetails($_GET["custom_id"], FALSE);
 
-Auth::createFakeCookie(User::getUserIDByEmail($HTTP_SERVER_VARS['PHP_AUTH_USER']), $filter['cst_prj_id']);
+Auth::createFakeCookie(User::getUserIDByEmail($_SERVER['PHP_AUTH_USER']), $filter['cst_prj_id']);
 
 $options = array(
     'users'         => $filter['cst_users'],
Index: post_note.php
===================================================================
--- post_note.php	(revision 3164)
+++ post_note.php	(working copy)
@@ -42,7 +42,7 @@
 $prj_id = Auth::getCurrentProject();
 $usr_id = Auth::getUserID();
 
-@$issue_id = $HTTP_GET_VARS["issue_id"] ? $HTTP_GET_VARS["issue_id"] : $HTTP_POST_VARS["issue_id"];
+@$issue_id = $_GET["issue_id"] ? $_GET["issue_id"] : $_POST["issue_id"];
 $details = Issue::getDetails($issue_id);
 $tpl->assign("issue_id", $issue_id);
 $tpl->assign("issue", $details);
@@ -53,12 +53,12 @@
     exit;
 }
 
-if (@$HTTP_POST_VARS["cat"] == "post_note") {
+if (@$_POST["cat"] == "post_note") {
     // change status
-    if (!@empty($HTTP_POST_VARS['new_status'])) {
-        $res = Issue::setStatus($issue_id, $HTTP_POST_VARS['new_status']);
+    if (!@empty($_POST['new_status'])) {
+        $res = Issue::setStatus($issue_id, $_POST['new_status']);
         if ($res != -1) {
-            $new_status = Status::getStatusTitle($HTTP_POST_VARS['new_status']);
+            $new_status = Status::getStatusTitle($_POST['new_status']);
             History::add($issue_id, $usr_id, History::getTypeID('status_changed'), "Status changed to '$new_status' by " . User::getFullName($usr_id));
         }
     }
@@ -66,21 +66,21 @@
     $res = Note::insert($usr_id, $issue_id);
     $tpl->assign("post_result", $res);
     // enter the time tracking entry about this phone support entry
-    if (!empty($HTTP_POST_VARS['time_spent'])) {
-        $HTTP_POST_VARS['issue_id'] = $issue_id;
-        $HTTP_POST_VARS['category'] = $HTTP_POST_VARS['time_category'];
-        $HTTP_POST_VARS['summary'] = 'Time entry inserted when sending an internal note.';
+    if (!empty($_POST['time_spent'])) {
+        $_POST['issue_id'] = $issue_id;
+        $_POST['category'] = $_POST['time_category'];
+        $_POST['summary'] = 'Time entry inserted when sending an internal note.';
         Time_Tracking::insertEntry();
     }
-} elseif (@$HTTP_GET_VARS["cat"] == "reply") {
-    if (!@empty($HTTP_GET_VARS["id"])) {
-        $note = Note::getDetails($HTTP_GET_VARS["id"]);
+} elseif (@$_GET["cat"] == "reply") {
+    if (!@empty($_GET["id"])) {
+        $note = Note::getDetails($_GET["id"]);
         $date = Misc::formatReplyDate($note["timestamp"]);
         $header = "\n\n\nOn $date, " . $note["not_from"] . " wrote:\n>\n";
         $note["not_body"] = $header . Misc::formatReply($note["not_note"]);
         $tpl->bulkAssign(array(
             "note"           => $note,
-            "parent_note_id" => $HTTP_GET_VARS["id"]
+            "parent_note_id" => $_GET["id"]
         ));
         $reply_subject = Mail_API::removeExcessRe($note['not_title']);
     }
Index: spell_check.php
===================================================================
--- spell_check.php	(revision 3164)
+++ spell_check.php	(working copy)
@@ -37,11 +37,11 @@
 
 Auth::checkAuthentication(APP_COOKIE);
 
-if (!empty($HTTP_GET_VARS['form_name'])) {
+if (!empty($_GET['form_name'])) {
     // show temporary form
     $tpl->assign("show_temp_form", "yes");
 } else {
-    $tpl->assign("spell_check", Misc::checkSpelling($HTTP_POST_VARS['textarea']));
+    $tpl->assign("spell_check", Misc::checkSpelling($_POST['textarea']));
 }
 
 $tpl->displayTemplate();
Index: file_upload.php
===================================================================
--- file_upload.php	(revision 3164)
+++ file_upload.php	(working copy)
@@ -38,10 +38,10 @@
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 $usr_id = Auth::getUserID();
-$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["iss_id"];
+$issue_id = @$_POST["issue_id"] ? $_POST["issue_id"] : $_GET["iss_id"];
 
-if (@$HTTP_POST_VARS["cat"] == "upload_file") {
-    $res = Attachment::attach($usr_id, $HTTP_POST_VARS['status']);
+if (@$_POST["cat"] == "upload_file") {
+    $res = Attachment::attach($usr_id, $_POST['status']);
     $tpl->assign("upload_file_result", $res);
 }
 
Index: mail_queue.php
===================================================================
--- mail_queue.php	(revision 3164)
+++ mail_queue.php	(working copy)
@@ -38,7 +38,7 @@
 
 Auth::checkAuthentication(APP_COOKIE);
 
-$issue_id = $HTTP_GET_VARS["iss_id"];
+$issue_id = $_GET["iss_id"];
 
 if ((Auth::getCurrentRole() < User::getRoleID('Developer')) ||
         (Issue::getProjectID($issue_id) != Auth::getCurrentProject())) {
Index: phone_calls.php
===================================================================
--- phone_calls.php	(revision 3164)
+++ phone_calls.php	(working copy)
@@ -38,7 +38,7 @@
 
 Auth::checkAuthentication(APP_COOKIE, 'index.php?err=5', true);
 
-$issue_id = @$HTTP_POST_VARS["issue_id"] ? $HTTP_POST_VARS["issue_id"] : $HTTP_GET_VARS["iss_id"];
+$issue_id = @$_POST["issue_id"] ? $_POST["issue_id"] : $_GET["iss_id"];
 
 if (!Issue::canAccess($issue_id, Auth::getUserID())) {
     $tpl = new Template_API();
@@ -47,7 +47,7 @@
     exit;
 }
 
-if (@$HTTP_POST_VARS["cat"] == "add_phone") {
+if (@$_POST["cat"] == "add_phone") {
     $res = Phone_Support::insert();
     $tpl->assign("add_phone_result", $res);
 }
