/[drupal]/contributions/modules/customerror/customerror.module
ViewVC logotype

Diff of /contributions/modules/customerror/customerror.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.17.2.4, Mon Oct 6 01:03:09 2008 UTC revision 1.17.2.5, Mon Mar 16 18:39:05 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2    
3  //$Id: customerror.module,v 1.17.2.3 2008/09/13 02:54:01 kbahey Exp $  //$Id: customerror.module,v 1.17.2.4 2008/10/06 01:03:09 kbahey Exp $
4    
5  // Copyright 2005 Khalid Baheyeldin http://2bits.com  // Copyright 2005 Khalid Baheyeldin http://2bits.com
6    
# Line 218  function customerror_check_redirect() { Line 218  function customerror_check_redirect() {
218      if (isset($src) && isset($dst)) {      if (isset($src) && isset($dst)) {
219        $src = str_replace("/", "\\/", $src);        $src = str_replace("/", "\\/", $src);
220        $dst = str_replace("\r", "", $dst);        $dst = str_replace("\r", "", $dst);
221        if (preg_match('/'. $src .'/', $destination)) {        // In case there are spaces in the URL, we escape them
222          $orig_dst = str_replace(" ", "%20", $destination);
223          if (preg_match('/'. $src .'/', $orig_dst)) {
224          $_REQUEST['destination'] = $dst;          $_REQUEST['destination'] = $dst;
225          drupal_goto($dst);          drupal_goto($dst);
226        }        }

Legend:
Removed from v.1.17.2.4  
changed lines
  Added in v.1.17.2.5

  ViewVC Help
Powered by ViewVC 1.1.2