? sites/all/modules/contrib
? sites/default/files
? sites/default/settings.php
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.429
diff -u -p -r1.429 bootstrap.inc
--- includes/bootstrap.inc	15 Oct 2010 18:03:43 -0000	1.429
+++ includes/bootstrap.inc	22 Oct 2010 06:51:03 -0000
@@ -2482,7 +2482,7 @@ function arg($index = NULL, $path = NULL
   $arguments = &$drupal_static_fast['arguments'];
 
   if (!isset($path)) {
-    $path = $_GET['q'];
+    $path = request_path();
   }
   if (!isset($arguments[$path])) {
     $arguments[$path] = explode('/', $path);
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1244
diff -u -p -r1.1244 common.inc
--- includes/common.inc	21 Oct 2010 19:31:39 -0000	1.1244
+++ includes/common.inc	22 Oct 2010 06:51:09 -0000
@@ -510,7 +510,7 @@ function drupal_get_destination() {
     $destination = array('destination' => $_GET['destination']);
   }
   else {
-    $path = $_GET['q'];
+    $path = request_path();
     $query = drupal_http_build_query(drupal_get_query_parameters());
     if ($query != '') {
       $path .= '?' . $query;
@@ -2272,7 +2272,7 @@ function l($text, $path, array $options 
   );
 
   // Append active class.
-  if (($path == $_GET['q'] || ($path == '<front>' && drupal_is_front_page())) &&
+  if (($path == request_path() || ($path == '<front>' && drupal_is_front_page())) &&
       (empty($options['language']) || $options['language']->language == $language_url->language)) {
     $options['attributes']['class'][] = 'active';
   }
@@ -2398,7 +2398,7 @@ function drupal_deliver_page($page_callb
     // If a delivery callback is specified, but doesn't exist as a function,
     // something is wrong, but don't print anything, since it's not known
     // what format the response needs to be in.
-    watchdog('delivery callback not found', 'callback %callback not found: %q.', array('%callback' => $delivery_callback, '%q' => $_GET['q']), WATCHDOG_ERROR);
+    watchdog('delivery callback not found', 'callback %callback not found: %q.', array('%callback' => $delivery_callback, '%q' => request_path()), WATCHDOG_ERROR);
   }
 }
 
@@ -2431,15 +2431,15 @@ function drupal_deliver_html_page($page_
         // Print a 404 page.
         drupal_add_http_header('Status', '404 Not Found');
 
-        watchdog('page not found', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);
+        watchdog('page not found', check_plain(request_path()), NULL, WATCHDOG_WARNING);
 
         // Keep old path for reference, and to allow forms to redirect to it.
         if (!isset($_GET['destination'])) {
-          $_GET['destination'] = $_GET['q'];
+          $_GET['destination'] = request_path();
         }
 
         $path = drupal_get_normal_path(variable_get('site_404', ''));
-        if ($path && $path != $_GET['q']) {
+        if ($path && $path != request_path()) {
           // Custom 404 handler. Set the active item in case there are tabs to
           // display, or other dependencies on the path.
           menu_set_active_item($path);
@@ -2460,15 +2460,15 @@ function drupal_deliver_html_page($page_
       case MENU_ACCESS_DENIED:
         // Print a 403 page.
         drupal_add_http_header('Status', '403 Forbidden');
-        watchdog('access denied', check_plain($_GET['q']), NULL, WATCHDOG_WARNING);
+        watchdog('access denied', check_plain(request_path()), NULL, WATCHDOG_WARNING);
 
         // Keep old path for reference, and to allow forms to redirect to it.
         if (!isset($_GET['destination'])) {
-          $_GET['destination'] = $_GET['q'];
+          $_GET['destination'] = request_path();
         }
 
         $path = drupal_get_normal_path(variable_get('site_403', ''));
-        if ($path && $path != $_GET['q']) {
+        if ($path && $path != request_path()) {
           // Custom 403 handler. Set the active item in case there are tabs to
           // display or other dependencies on the path.
           menu_set_active_item($path);
@@ -4865,7 +4865,7 @@ function drupal_page_set_cache() {
     $cache = (object) array(
       'cid' => $base_root . request_uri(),
       'data' => array(
-        'path' => $_GET['q'],
+        'path' => request_path(),
         'body' => ob_get_clean(),
         'title' => drupal_get_title(),
         'headers' => array(),
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.506
diff -u -p -r1.506 form.inc
--- includes/form.inc	21 Oct 2010 20:46:58 -0000	1.506
+++ includes/form.inc	22 Oct 2010 06:51:11 -0000
@@ -1103,7 +1103,8 @@ function drupal_redirect_form($form_stat
         $function($form_state['redirect']);
       }
     }
-    drupal_goto($_GET['q']);
+
+    drupal_goto(request_path());
   }
 }
 
@@ -4054,7 +4055,7 @@ function batch_process($redirect = NULL,
       'progressive' => TRUE,
       'url' => $url,
       'url_options' => array(),
-      'source_url' => $_GET['q'],
+      'source_url' => request_path(),
       'redirect' => $redirect,
       'theme' => $GLOBALS['theme_key'],
       'redirect_callback' => $redirect_callback,
Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.416
diff -u -p -r1.416 menu.inc
--- includes/menu.inc	21 Oct 2010 11:56:17 -0000	1.416
+++ includes/menu.inc	22 Oct 2010 06:51:13 -0000
@@ -406,7 +406,7 @@ function menu_set_item($path, $router_it
 function menu_get_item($path = NULL, $router_item = NULL) {
   $router_items = &drupal_static(__FUNCTION__);
   if (!isset($path)) {
-    $path = $_GET['q'];
+    $path = request_path();
   }
   if (isset($router_item)) {
     $router_items[$path] = $router_item;
@@ -462,7 +462,7 @@ function menu_execute_active_handler($pa
   // Allow other modules to change the site status but not the path because that
   // would not change the global variable. hook_url_inbound_alter() can be used
   // to change the path. Code later will not use the $read_only_path variable.
-  $read_only_path = !empty($path) ? $path : $_GET['q'];
+  $read_only_path = !empty($path) ? $path : request_path();
   drupal_alter('menu_site_status', $page_callback_result, $read_only_path);
 
   // Only continue if the site status is not set.
@@ -996,7 +996,7 @@ function menu_tree_output($tree) {
     // the active class accordingly. But local tasks do not appear in menu
     // trees, so if the current path is a local task, and this link is its
     // tab root, then we have to set the class manually.
-    if ($data['link']['href'] == $router_item['tab_root_href'] && $data['link']['href'] != $_GET['q']) {
+    if ($data['link']['href'] == $router_item['tab_root_href'] && $data['link']['href'] != request_path()) {
       $data['link']['localized_options']['attributes']['class'][] = 'active';
     }
 
@@ -1748,7 +1748,7 @@ function menu_navigation_links($menu_nam
       // the active class accordingly. But local tasks do not appear in menu
       // trees, so if the current path is a local task, and this link is its
       // tab root, then we have to set the class manually.
-      if ($item['link']['href'] == $router_item['tab_root_href'] && $item['link']['href'] != $_GET['q']) {
+      if ($item['link']['href'] == $router_item['tab_root_href'] && $item['link']['href'] != request_path()) {
         $l['attributes']['class'][] = 'active';
       }
       // Keyed with the unique mlid to generate classes in theme_links().
@@ -1863,7 +1863,7 @@ function menu_local_tasks($level = 0) {
             // tasks can still be accessed directly, in which case this link
             // would not be marked as active, since l() only compares the href
             // with $_GET['q'].
-            if ($link['href'] != $_GET['q']) {
+            if ($link['href'] != request_path()) {
               $link['localized_options']['attributes']['class'][] = 'active';
             }
             $tabs_current[] = array(
@@ -1939,7 +1939,7 @@ function menu_local_tasks($level = 0) {
             // local task of a default local task. Since this default local task
             // links to its parent, l() will not mark it as active, as it only
             // compares the link's href to $_GET['q'].
-            if ($link['href'] != $_GET['q']) {
+            if ($link['href'] != request_path()) {
               $link['localized_options']['attributes']['class'][] = 'active';
             }
             $tabs_current[] = array(
@@ -2294,7 +2294,7 @@ function menu_link_get_preferred($path =
   $preferred_links = &drupal_static(__FUNCTION__);
 
   if (!isset($path)) {
-    $path = $_GET['q'];
+    $path = request_path();
   }
 
   if (!isset($preferred_links[$path])) {
@@ -3597,7 +3597,7 @@ function _menu_site_is_offline($check_on
       // Ensure that the maintenance mode message is displayed only once
       // (allowing for page redirects) and specifically suppress its display on
       // the maintenance mode settings page.
-      if (!$check_only && $_GET['q'] != 'admin/config/development/maintenance') {
+      if (!$check_only && request_path() != 'admin/config/development/maintenance') {
         if (user_access('administer site configuration')) {
           drupal_set_message(t('Operating in maintenance mode. <a href="@url">Go online.</a>', array('@url' => url('admin/config/development/maintenance'))), 'status', FALSE);
         }
Index: includes/pager.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/pager.inc,v
retrieving revision 1.85
diff -u -p -r1.85 pager.inc
--- includes/pager.inc	8 Oct 2010 05:07:53 -0000	1.85
+++ includes/pager.inc	22 Oct 2010 06:51:14 -0000
@@ -623,7 +623,7 @@ function theme_pager_link($variables) {
     }
   }
 
-  return l($text, $_GET['q'], array('attributes' => $attributes, 'query' => $query));
+  return l($text, request_path(), array('attributes' => $attributes, 'query' => $query));
 }
 
 /**
Index: includes/path.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/path.inc,v
retrieving revision 1.71
diff -u -p -r1.71 path.inc
--- includes/path.inc	9 Aug 2010 00:13:06 -0000	1.71
+++ includes/path.inc	22 Oct 2010 06:51:14 -0000
@@ -198,7 +198,7 @@ function drupal_cache_system_paths() {
 function drupal_get_path_alias($path = NULL, $path_language = NULL) {
   // If no path is specified, use the current page's path.
   if ($path == NULL) {
-    $path = $_GET['q'];
+    $path = request_path();
   }
   $result = $path;
   if ($alias = drupal_lookup_path('alias', $path, $path_language)) {
Index: includes/tablesort.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/tablesort.inc,v
retrieving revision 1.59
diff -u -p -r1.59 tablesort.inc
--- includes/tablesort.inc	15 Oct 2010 04:34:15 -0000	1.59
+++ includes/tablesort.inc	22 Oct 2010 06:51:14 -0000
@@ -180,7 +180,7 @@ function tablesort_header($cell, $header
       $ts['sort'] = 'asc';
       $image = '';
     }
-    $cell['data'] = l($cell['data'] . $image, $_GET['q'], array('attributes' => array('title' => $title), 'query' => array_merge($ts['query'], array('sort' => $ts['sort'], 'order' => $cell['data'])), 'html' => TRUE));
+    $cell['data'] = l($cell['data'] . $image, request_path(), array('attributes' => array('title' => $title), 'query' => array_merge($ts['query'], array('sort' => $ts['sort'], 'order' => $cell['data'])), 'html' => TRUE));
 
     unset($cell['field'], $cell['sort']);
   }
Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.620
diff -u -p -r1.620 theme.inc
--- includes/theme.inc	21 Oct 2010 19:31:39 -0000	1.620
+++ includes/theme.inc	22 Oct 2010 06:51:15 -0000
@@ -1446,7 +1446,7 @@ function theme_links($variables) {
       if ($i == $num_links) {
         $class[] = 'last';
       }
-      if (isset($link['href']) && ($link['href'] == $_GET['q'] || ($link['href'] == '<front>' && drupal_is_front_page()))
+      if (isset($link['href']) && ($link['href'] == request_path() || ($link['href'] == '<front>' && drupal_is_front_page()))
           && (empty($link['language']) || $link['language']->language == $language_url->language)) {
         $class[] = 'active';
       }
Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.431
diff -u -p -r1.431 block.module
--- modules/block/block.module	28 Sep 2010 03:30:37 -0000	1.431
+++ modules/block/block.module	22 Oct 2010 06:51:16 -0000
@@ -763,11 +763,11 @@ function block_block_list_alter(&$blocks
       $pages = drupal_strtolower($block->pages);
       if ($block->visibility < BLOCK_VISIBILITY_PHP) {
         // Convert the Drupal path to lowercase
-        $path = drupal_strtolower(drupal_get_path_alias($_GET['q']));
+        $path = drupal_strtolower(drupal_get_path_alias(request_path()));
         // Compare the lowercase internal and lowercase path alias (if any).
         $page_match = drupal_match_path($path, $pages);
-        if ($path != $_GET['q']) {
-          $page_match = $page_match || drupal_match_path($_GET['q'], $pages);
+        if ($path != request_path()) {
+          $page_match = $page_match || drupal_match_path(request_path(), $pages);
         }
         // When $block->visibility has a value of 0 (BLOCK_VISIBILITY_NOTLISTED),
         // the block is displayed on all pages except those listed in $block->pages.
Index: modules/contact/contact.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.module,v
retrieving revision 1.148
diff -u -p -r1.148 contact.module
--- modules/contact/contact.module	24 Sep 2010 00:37:42 -0000	1.148
+++ modules/contact/contact.module	22 Oct 2010 06:51:16 -0000
@@ -174,7 +174,7 @@ function contact_mail($key, &$message, $
     '!site-name' => variable_get('site_name', 'Drupal'),
     '!subject' => $params['subject'],
     '!category' => isset($params['category']['category']) ? $params['category']['category'] : '',
-    '!form-url' => url($_GET['q'], array('absolute' => TRUE, 'language' => $language)),
+    '!form-url' => url(request_path(), array('absolute' => TRUE, 'language' => $language)),
     '!sender-name' => format_username($params['sender']),
     '!sender-url' => $params['sender']->uid ? url('user/' . $params['sender']->uid, array('absolute' => TRUE, 'language' => $language)) : $params['sender']->mail,
   );
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.303
diff -u -p -r1.303 locale.module
--- modules/locale/locale.module	9 Oct 2010 17:38:41 -0000	1.303
+++ modules/locale/locale.module	22 Oct 2010 06:51:17 -0000
@@ -920,7 +920,7 @@ function locale_block_info() {
  */
 function locale_block_view($type) {
   if (drupal_multilingual()) {
-    $path = drupal_is_front_page() ? '<front>' : $_GET['q'];
+    $path = request_path();
     $links = language_negotiation_get_switch_links($type, $path);
 
     if (isset($links->links) && count($links->links > 1)) {
Index: modules/poll/poll.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.358
diff -u -p -r1.358 poll.module
--- modules/poll/poll.module	20 Oct 2010 01:31:07 -0000	1.358
+++ modules/poll/poll.module	22 Oct 2010 06:51:18 -0000
@@ -363,7 +363,7 @@ function poll_form($node, &$form_state) 
 function poll_more_choices_submit($form, &$form_state) {
   // If this is a AJAX POST, add 1, otherwise add 5 more choices to the form.
   if ($form_state['values']['poll_more']) {
-    $n = $_GET['q'] == 'system/ajax' ? 1 : 5;
+    $n = request_path() == 'system/ajax' ? 1 : 5;
     $form_state['choice_count'] = count($form_state['values']['choice']) + $n;
   }
   // Renumber the choices. This invalidates the corresponding key/value
Index: modules/shortcut/shortcut.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/shortcut/shortcut.module,v
retrieving revision 1.27
diff -u -p -r1.27 shortcut.module
--- modules/shortcut/shortcut.module	24 Sep 2010 00:37:44 -0000	1.27
+++ modules/shortcut/shortcut.module	22 Oct 2010 06:51:18 -0000
@@ -645,7 +645,7 @@ function shortcut_renderable_links($shor
  */
 function shortcut_preprocess_page(&$variables) {
   if (shortcut_set_edit_access()) {
-    $link = $_GET['q'];
+    $link = request_path();
     $query_parameters = drupal_get_query_parameters();
     if (!empty($query_parameters)) {
      $link .= '?' . drupal_http_build_query($query_parameters);
Index: modules/simpletest/tests/common.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/common.test,v
retrieving revision 1.130
diff -u -p -r1.130 common.test
--- modules/simpletest/tests/common.test	8 Oct 2010 15:36:12 -0000	1.130
+++ modules/simpletest/tests/common.test	22 Oct 2010 06:51:20 -0000
@@ -90,7 +90,7 @@ class CommonURLUnitTest extends DrupalWe
    * Tests for active class in l() function.
    */
   function testLActiveClass() {
-    $link = l($this->randomName(), $_GET['q']);
+    $link = l($this->randomName(), request_path());
     $this->assertTrue($this->hasClass($link, 'active'), t('Class @class is present on link to the current page', array('@class' => 'active')));
   }
 
@@ -99,7 +99,7 @@ class CommonURLUnitTest extends DrupalWe
    */
   function testLCustomClass() {
     $class = $this->randomName();
-    $link = l($this->randomName(), $_GET['q'], array('attributes' => array('class' => array($class))));
+    $link = l($this->randomName(), request_path(), array('attributes' => array('class' => array($class))));
     $this->assertTrue($this->hasClass($link, $class), t('Custom class @class is present on link when requested', array('@class' => $class)));
     $this->assertTrue($this->hasClass($link, 'active'), t('Class @class is present on link to the current page', array('@class' => 'active')));
   }
Index: modules/statistics/statistics.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v
retrieving revision 1.339
diff -u -p -r1.339 statistics.module
--- modules/statistics/statistics.module	24 Sep 2010 00:37:44 -0000	1.339
+++ modules/statistics/statistics.module	22 Oct 2010 06:51:20 -0000
@@ -80,7 +80,7 @@ function statistics_exit() {
     db_insert('accesslog')
       ->fields(array(
         'title' => strip_tags(drupal_get_title()),
-        'path' => $_GET['q'],
+        'path' => request_path(),
         'url' => $_SERVER['HTTP_REFERER'],
         'hostname' => ip_address(),
         'uid' => $user->uid,
Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.114
diff -u -p -r1.114 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	20 Oct 2010 01:31:07 -0000	1.114
+++ modules/taxonomy/taxonomy.admin.inc	22 Oct 2010 06:51:21 -0000
@@ -385,7 +385,7 @@ function taxonomy_overview_terms($form, 
       '#type' => 'submit',
       '#value' => t('Reset to alphabetical')
     );
-    $form_state['redirect'] = array($_GET['q'], (isset($_GET['page']) ? array('query' => array('page' => $_GET['page'])) : array()));
+    $form_state['redirect'] = array(request_path(), (isset($_GET['page']) ? array('query' => array('page' => $_GET['page'])) : array()));
   }
 
   return $form;
@@ -749,7 +749,7 @@ function taxonomy_form_term($form, &$for
     );
   }
   else {
-    $form_state['redirect'] = $_GET['q'];
+    $form_state['redirect'] = request_path();
   }
 
   return $form;
Index: modules/update/update.compare.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.compare.inc,v
retrieving revision 1.41
diff -u -p -r1.41 update.compare.inc
--- modules/update/update.compare.inc	4 Oct 2010 07:26:25 -0000	1.41
+++ modules/update/update.compare.inc	22 Oct 2010 06:51:21 -0000
@@ -740,7 +740,7 @@ function update_project_cache($cid) {
 
   // On certain paths, we should clear the cache and recompute the projects for
   // update status of the site to avoid presenting stale information.
-  $q = $_GET['q'];
+  $q = request_path();
   $paths = array(
     'admin/modules',
     'admin/modules/update',
Index: modules/update/update.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.module,v
retrieving revision 1.70
diff -u -p -r1.70 update.module
--- modules/update/update.module	6 Oct 2010 13:36:30 -0000	1.70
+++ modules/update/update.module	22 Oct 2010 06:51:22 -0000
@@ -108,7 +108,7 @@ function update_help($path, $arg) {
  */
 function update_init() {
   if (arg(0) == 'admin' && user_access('administer site configuration')) {
-    switch ($_GET['q']) {
+    switch (request_path()) {
       // These pages don't need additional nagging.
       case 'admin/appearance/update':
       case 'admin/appearance/install':
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1211
diff -u -p -r1.1211 user.module
--- modules/user/user.module	20 Oct 2010 05:32:31 -0000	1.1211
+++ modules/user/user.module	22 Oct 2010 06:51:24 -0000
@@ -1233,7 +1233,7 @@ function user_user_categories() {
 }
 
 function user_login_block($form) {
-  $form['#action'] = url($_GET['q'], array('query' => drupal_get_destination()));
+  $form['#action'] = url(request_path(), array('query' => drupal_get_destination()));
   $form['#id'] = 'user-login-form';
   $form['#validate'] = user_login_default_validators();
   $form['#submit'][] = 'user_login_submit';
@@ -3508,7 +3508,7 @@ function user_register_form($form, &$for
   if ($admin) {
     // Redirect back to page which initiated the create request;
     // usually admin/people/create.
-    $form_state['redirect'] = $_GET['q'];
+    $form_state['redirect'] = request_path();
   }
 
   $form['actions'] = array('#type' => 'actions');
