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

Diff of /contributions/modules/prepopulate/prepopulate.module

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

revision 1.12, Mon Nov 17 17:43:14 2008 UTC revision 1.13, Thu Oct 8 03:01:32 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: prepopulate.module,v 1.11 2008/06/23 14:50:42 add1sun Exp $  // $Id: prepopulate.module,v 1.12 2008/11/17 17:43:14 add1sun Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 25  function prepopulate_help($path, $arg) { Line 25  function prepopulate_help($path, $arg) {
25   * Implementation of hook_form_alter().   * Implementation of hook_form_alter().
26   */   */
27  function prepopulate_form_alter(&$form, $form_state, $form_id) {  function prepopulate_form_alter(&$form, $form_state, $form_id) {
28    if (isset($_GET['edit'])) {    if (isset($_REQUEST['edit'])) {
29      foreach (array_keys((array)$_GET['edit']) as $getvar) {      foreach (array_keys((array)$_REQUEST['edit']) as $getvar) {
30        if (element_child($getvar) && !is_null($form[$getvar])) {        if (element_child($getvar) && !is_null($form[$getvar])) {
31          _prepopulate_get_walk($form[$getvar], $_GET['edit'][$getvar]);          _prepopulate_get_walk($form[$getvar], $_REQUEST['edit'][$getvar]);
32        }        }
33      }      }
34    }    }

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.2