/[drupal]/contributions/modules/blocks404/blocks404.module
ViewVC logotype

Diff of /contributions/modules/blocks404/blocks404.module

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

revision 1.3, Tue Jan 6 06:39:55 2009 UTC revision 1.4, Tue Jan 6 06:42:50 2009 UTC
# Line 1  Line 1 
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    
# Line 12  function blocks404_init() { Line 12  function blocks404_init() {
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  /**  /**
# Line 53  function blocks404_form_system_error_rep Line 55  function blocks404_form_system_error_rep
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    }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2