| 1 |
<?php |
<?php |
| 2 |
// $Id: blocks404.module,v 1.2 2009/01/06 06:22:17 johnalbin Exp $ |
// $Id: blocks404.module,v 1.3 2009/01/06 06:39:55 johnalbin Exp $ |
| 3 |
|
|
| 4 |
define('BLOCKS404_PAGE', 'blocks404'); |
define('BLOCKS404_PAGE', 'blocks404'); |
| 5 |
|
|
| 12 |
if ($site_404 == '') { |
if ($site_404 == '') { |
| 13 |
variable_set('site_404', BLOCKS404_PAGE); |
variable_set('site_404', BLOCKS404_PAGE); |
| 14 |
} |
} |
| 15 |
|
// drupal_not_found() sets $_GET['q'] to the site_404 variable, so make a copy. |
| 16 |
|
define('BLOCKS404_ORIGINAL_QUERY', $_GET['q']); |
| 17 |
} |
} |
| 18 |
|
|
| 19 |
/** |
/** |
| 55 |
$form['site_404']['#default_value'] = ''; |
$form['site_404']['#default_value'] = ''; |
| 56 |
} |
} |
| 57 |
} |
} |
| 58 |
|
|
| 59 |
|
/** |
| 60 |
|
* Implements hook_form_alter(). |
| 61 |
|
*/ |
| 62 |
|
function blocks404_form_alter(&$form, $form_state, $form_id) { |
| 63 |
|
if ($_GET['q'] == BLOCKS404_PAGE) { |
| 64 |
|
module_load_include('inc', 'blocks404', 'blocks404.active'); |
| 65 |
|
_blocks404_form_alter($form, $form_state, $form_id); |
| 66 |
|
} |
| 67 |
|
} |