/[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.10.2.2, Mon Nov 17 18:02:36 2008 UTC revision 1.10.2.3, Wed Oct 7 23:19:40 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: prepopulate.module,v 1.10.2.1 2008/11/17 17:41:28 add1sun Exp $  // $Id: prepopulate.module,v 1.10.2.2 2008/11/17 18:02:36 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.10.2.2  
changed lines
  Added in v.1.10.2.3

  ViewVC Help
Powered by ViewVC 1.1.2