Index: path_redirect.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/path_redirect/path_redirect.module,v
retrieving revision 1.3.2.13
diff -u -r1.3.2.13 path_redirect.module
--- path_redirect.module	16 Dec 2007 17:26:33 -0000	1.3.2.13
+++ path_redirect.module	16 Dec 2007 17:46:35 -0000
@@ -1,5 +1,5 @@
 <?php
-//$Id: path_redirect.module,v 1.3.2.13 2007/12/16 17:26:33 horsepunchkid Exp $
+//$Id: path_redirect.module,v 1.3.2.11 2007/11/25 00:22:47 horsepunchkid Exp $
 
 /**
  * Implementation of hook_help
@@ -25,8 +25,8 @@
 function path_redirect_init() {
   // see if this page has a redirect path
   $query = '';
-  if (isset($_GET['q'])) {
-    $query = $_GET['q'];
+  if (isset($_SERVER['QUERY_STRING'])) {
+    $query = preg_replace('/^q=([^&]*).*$/', '\1', $_SERVER['QUERY_STRING']);
   }
   $r = db_fetch_object(db_query("SELECT redirect, query, fragment, type FROM {path_redirect} WHERE path = '%s' OR path = '%s'", $query, utf8_encode($query)));
   if ($r) {
@@ -133,8 +133,8 @@
   $count = db_num_rows($result);
   $types = path_redirect_error_list();
   while ($r = db_fetch_object($result)) {
-    $path = drupal_get_path_alias($r->path);
-    $redirect = drupal_get_path_alias($r->redirect);
+    $path = $r->path;
+    $redirect = $r->redirect;
     $query = $r->query ? "?$r->query" : '';
     $fragment = $r->fragment ? "#$r->fragment" : '';
     $rows[] = array(
@@ -182,7 +182,7 @@
     '#title' => t('From'),
     '#description' => t('Enter a Drupal path or path alias to redirect'),
     '#maxlength' => 255,
-    '#default_value' => drupal_get_path_alias($edit['path']),
+    '#default_value' => $edit['path'],
   );
   
   $form['redirect'] = array(
@@ -197,7 +197,7 @@
     '#type' => 'textfield',
     '#size' => 30,
     '#maxlength' => 255,
-    '#default_value' => drupal_get_path_alias($edit['redirect']),
+    '#default_value' => $edit['redirect'],
   );
   
   $form['redirect'][] = array(
@@ -275,11 +275,9 @@
     form_set_error('redirect', t('The redirect <strong>to</strong> path does not appear valid.'));
   }
   
-  $form_values['path'] = drupal_get_normal_path($form_values['path']);
   if ($form_values['redirect'] == '<front>') {
     $form_values['redirect'] = variable_get('site_frontpage', 'node');
   }
-  $form_values['redirect'] = drupal_get_normal_path($form_values['redirect']);
   
   //check that there there are no redirect loops
   if ($form_values['path'] === $form_values['redirect']) {
