Mercurial > defr > drupal > core
comparison modules/poll/poll.module @ 9:acef7ccb09b5 6.4
Drupal 6.4
| author | Franck Deroche <webmaster@defr.org> |
|---|---|
| date | Tue, 23 Dec 2008 14:32:08 +0100 |
| parents | fff6d4c8c043 |
| children | 3edae6ecd6c6 |
comparison
equal
deleted
inserted
replaced
| 8:85cbd6048071 | 9:acef7ccb09b5 |
|---|---|
| 1 <?php | 1 <?php |
| 2 // $Id: poll.module,v 1.263.2.1 2008/04/25 20:39:55 goba Exp $ | 2 // $Id: poll.module,v 1.263.2.2 2008/08/13 23:59:13 drumm Exp $ |
| 3 | 3 |
| 4 /** | 4 /** |
| 5 * @file | 5 * @file |
| 6 * Enables your site to capture votes on different topics in the form of multiple | 6 * Enables your site to capture votes on different topics in the form of multiple |
| 7 * choice questions. | 7 * choice questions. |
| 336 $form_state = array('submitted' => FALSE); | 336 $form_state = array('submitted' => FALSE); |
| 337 $form_build_id = $_POST['form_build_id']; | 337 $form_build_id = $_POST['form_build_id']; |
| 338 // Add the new element to the stored form. Without adding the element to the | 338 // Add the new element to the stored form. Without adding the element to the |
| 339 // form, Drupal is not aware of this new elements existence and will not | 339 // form, Drupal is not aware of this new elements existence and will not |
| 340 // process it. We retreive the cached form, add the element, and resave. | 340 // process it. We retreive the cached form, add the element, and resave. |
| 341 $form = form_get_cache($form_build_id, $form_state); | 341 if (!$form = form_get_cache($form_build_id, $form_state)) { |
| 342 exit(); | |
| 343 } | |
| 342 $form['choice_wrapper']['choice'][$delta] = $form_element; | 344 $form['choice_wrapper']['choice'][$delta] = $form_element; |
| 343 form_set_cache($form_build_id, $form, $form_state); | 345 form_set_cache($form_build_id, $form, $form_state); |
| 344 $form += array( | 346 $form += array( |
| 345 '#post' => $_POST, | 347 '#post' => $_POST, |
| 346 '#programmed' => FALSE, | 348 '#programmed' => FALSE, |
