| 1 |
<?php |
<?php |
| 2 |
// $Id: blocks404.active.inc,v 1.2 2009/01/06 06:22:17 johnalbin Exp $ |
// $Id: blocks404.active.inc,v 1.3 2009/01/06 06:42:50 johnalbin Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Helper function that performs the actual inclusion of the left and right regions. |
* Helper function that performs the actual inclusion of the left and right regions. |
| 87 |
* We need this to be able to submit any forms from the error pages, otherwise |
* We need this to be able to submit any forms from the error pages, otherwise |
| 88 |
* the form POSTs to the error page and the form is not processed. |
* the form POSTs to the error page and the form is not processed. |
| 89 |
*/ |
*/ |
| 90 |
function _blocks404_form_alter(&$form, $form_state, $form_id) { |
function _blocks404_form_alter($form_id, &$form) { |
| 91 |
if ($_GET['q'] == BLOCKS404_PAGE) { |
if ($_GET['q'] == BLOCKS404_PAGE) { |
| 92 |
// Form actions that POST to the 404 page won't work properly. |
// Form actions that POST to the 404 page won't work properly. |
| 93 |
if ($form['#action'] == url(BLOCKS404_PAGE) || $form['#action'] == url(BLOCKS404_ORIGINAL_QUERY) || $form_id == 'user_login_block' || $form['#action'] == url(BLOCKS404_PAGE, array('query' => 'destination=' . BLOCKS404_ORIGINAL_QUERY))) { |
if ($form['#action'] == url(BLOCKS404_PAGE) || $form['#action'] == url(BLOCKS404_ORIGINAL_QUERY) || $form_id == 'user_login_block' || $form['#action'] == url(BLOCKS404_PAGE, array('query' => 'destination=' . BLOCKS404_ORIGINAL_QUERY))) { |