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

Diff of /contributions/modules/formupdater/formupdater.module

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

revision 1.4, Wed Nov 23 01:15:45 2005 UTC revision 1.5, Sat Nov 26 01:53:15 2005 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: formupdater.module,v 1.3 2005/11/13 23:54:43 jjeff Exp $  // $Id: formupdater.module,v 1.4 2005/11/23 01:15:45 webchick Exp $
3    
4  function formupdater_help($section){  function formupdater_help($section){
5    switch($section){    switch($section){
# Line 25  function formupdater_page(){ Line 25  function formupdater_page(){
25    $form['input'] = array('#type' => 'textarea', '#title'=> t('Drupal PHP code containing old form function calls'), '#rows' => 20);    $form['input'] = array('#type' => 'textarea', '#title'=> t('Drupal PHP code containing old form function calls'), '#rows' => 20);
26    $form['submit'] = array('#type' => 'submit', '#value' => 'submit');    $form['submit'] = array('#type' => 'submit', '#value' => 'submit');
27    $output = drupal_get_form('formupdater_input', $form);    $output = drupal_get_form('formupdater_input', $form);
28    $output .= str_replace(array('$RCSf'.'ile:', ',v', ',', '$Re'.'vision: ', '$Da'.'te: ', '$'), '', '<p style="font-size:x-small">$RCSfile: formupdater.module,v $ version: <b>$Revision: 1.3 $</b>, $Date: 2005/11/13 23:54:43 $</p>');    $output .= str_replace(array('$RCSf'.'ile:', ',v', ',', '$Re'.'vision: ', '$Da'.'te: ', '$'), '', '<p style="font-size:x-small">$RCSfile: formupdater.module,v $ version: <b>$Revision: 1.4 $</b>, $Date: 2005/11/23 01:15:45 $</p>');
29    return $output;    return $output;
30  }  }
31    
32  function formupdater_process($edit){  function formupdater_process($edit){
33    //var_dump($form_values);    //var_dump($form_values);
34    $code = $edit['input'];    $code = $edit['input'];
35    $regex = '/form_?(.*?)\(([\w\W]*?)\);/i';    $regex = '/form_(.*?)\(([\w\W]*?)\);/i';
36    preg_match_all($regex, $code, $matches, PREG_SET_ORDER);    preg_match_all($regex, $code, $matches, PREG_SET_ORDER);
37    $i = 1;    $i = 1;
38    if (is_array($matches)){    if (is_array($matches)){

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

  ViewVC Help
Powered by ViewVC 1.1.2