| 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 |
| 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 |
} |
} |