/[drupal]/contributions/modules/path_redirect/path_redirect.admin.inc
ViewVC logotype

Diff of /contributions/modules/path_redirect/path_redirect.admin.inc

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

revision 1.1.2.46, Wed Nov 4 05:49:46 2009 UTC revision 1.1.2.47, Wed Nov 4 06:00:11 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: path_redirect.admin.inc,v 1.1.2.45 2009/10/27 03:46:12 davereid Exp $  // $Id: path_redirect.admin.inc,v 1.1.2.46 2009/11/04 05:49:46 davereid Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 200  function path_redirect_validate_redirect Line 200  function path_redirect_validate_redirect
200      form_set_error($form_parents . 'redirect', t('The redirect <strong>to</strong> path does not appear valid.'));      form_set_error($form_parents . 'redirect', t('The redirect <strong>to</strong> path does not appear valid.'));
201    }    }
202    
   if ($redirect['redirect'] == '<front>') {  
     $redirect['redirect'] = variable_get('site_frontpage', 'node');  
   }  
   
203    // check that there there are no redirect loops    // check that there there are no redirect loops
204    if ($redirect['path'] === $redirect['redirect']) {    if (url($redirect['path']) == url($redirect['redirect'])) {
205      form_set_error($form_parents . 'redirect', t('You are attempting to redirect the page to itself. This will result in an infinite loop.'));      form_set_error($form_parents . 'redirect', t('You are attempting to redirect the page to itself. This will result in an infinite loop.'));
206    }    }
207  }  }

Legend:
Removed from v.1.1.2.46  
changed lines
  Added in v.1.1.2.47

  ViewVC Help
Powered by ViewVC 1.1.2