/[drupal]/contributions/modules/flexinode/flexinode_admin.module
ViewVC logotype

Diff of /contributions/modules/flexinode/flexinode_admin.module

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

revision 1.5.2.2, Tue Apr 17 13:20:28 2007 UTC revision 1.5.2.3, Fri Apr 20 07:51:25 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: flexinode_admin.module,v 1.5.2.1 2007/02/07 10:08:21 ber Exp $  // $Id: flexinode_admin.module,v 1.5.2.2 2007/04/17 13:20:28 ber Exp $
3    
4  /**  /**
5   * @file Administration interface for flexinode.   * @file Administration interface for flexinode.
# Line 258  function flexinode_admin_content_type_fo Line 258  function flexinode_admin_content_type_fo
258      '#maxlength' => 128,      '#maxlength' => 128,
259      '#description' => t('A one-line description of the content type.'),      '#description' => t('A one-line description of the content type.'),
260      );      );
   $form['help'] = array(  
     '#type' => 'textarea',  
     '#title' => t('Help text'),  
     '#default_value' => $ctype->help,  
     '#size' => 60,  
     '#maxlength' => 5,  
     '#description' => t('Instructions to present to the user when adding new content of this type.'),  
     );  
261    $form['ctype_id'] = array('#type' => 'hidden', '#value' => $ctype_id);    $form['ctype_id'] = array('#type' => 'hidden', '#value' => $ctype_id);
262    $form['submit'] = array('#type' => 'submit', '#value' => t('Submit'));    $form['submit'] = array('#type' => 'submit', '#value' => t('Submit'));
263    
# Line 297  function flexinode_admin_content_type_fo Line 289  function flexinode_admin_content_type_fo
289    
290      $former_ctype = flexinode_load_content_type($ctype_id);      $former_ctype = flexinode_load_content_type($ctype_id);
291    
292      db_query("UPDATE {flexinode_type} SET name = '%s', description = '%s', help = '%s' WHERE ctype_id = %d", $edit['name'], $edit['description'], $edit['help'], $ctype_id);      db_query("UPDATE {flexinode_type} SET name = '%s', description = '%s' WHERE ctype_id = %d", $edit['name'], $edit['description'], $ctype_id);
293    
294      drupal_set_message(t('updated content type "%name".', array('%name' => $edit['name'])));      drupal_set_message(t('updated content type "%name".', array('%name' => $edit['name'])));
295    }    }
296    else {    else {
297      $ctype_id = db_next_id('{flexinode_ctype}');      $ctype_id = db_next_id('{flexinode_ctype}');
298    
299      db_query("INSERT INTO {flexinode_type} (name, description, help, ctype_id) VALUES ('%s', '%s', '%s', %d)", $edit['name'], $edit['description'], $edit['help'], $ctype_id);      db_query("INSERT INTO {flexinode_type} (name, description, ctype_id) VALUES ('%s', '%s', %d)", $edit['name'], $edit['description'], $ctype_id);
300    
301      drupal_set_message(t('created new content type "%name".', array('%name' => $edit['name'])));      drupal_set_message(t('created new content type "%name".', array('%name' => $edit['name'])));
302    }    }

Legend:
Removed from v.1.5.2.2  
changed lines
  Added in v.1.5.2.3

  ViewVC Help
Powered by ViewVC 1.1.2