| 1 |
<?php |
<?php |
| 2 |
|
|
| 3 |
//$Id: customerror.module,v 1.17.2.6 2009/03/19 16:07:59 kbahey Exp $ |
//$Id: customerror.module,v 1.17.2.7 2009/06/26 03:48:09 kbahey Exp $ |
| 4 |
|
|
| 5 |
// Copyright 2005 Khalid Baheyeldin http://2bits.com |
// Copyright 2005 Khalid Baheyeldin http://2bits.com |
| 6 |
|
|
| 152 |
|
|
| 153 |
switch($code) { |
switch($code) { |
| 154 |
case 403: |
case 403: |
| 155 |
|
$internal_path = substr(request_uri(), strlen(base_path()))) { |
| 156 |
|
if ($internal_path) { |
| 157 |
|
$_REQUEST['destination'] = $internal_path; |
| 158 |
|
} |
| 159 |
|
else { |
| 160 |
|
$_REQUEST['destination'] = variable_get('site_frontpage', 'node'); |
| 161 |
|
} |
| 162 |
$_SESSION['destination'] = $_REQUEST['destination']; |
$_SESSION['destination'] = $_REQUEST['destination']; |
| 163 |
case 404: |
case 404: |
| 164 |
// Check if we should redirect |
// Check if we should redirect |