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

Diff of /contributions/modules/trash/trash.module

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

revision 1.1, Thu Feb 21 17:33:17 2008 UTC revision 1.1.2.1, Wed Mar 12 00:03:39 2008 UTC
# Line 150  function trash_menu($may_cache) { Line 150  function trash_menu($may_cache) {
150  /**  /**
151   * Implementation of hook_form_alter().   * Implementation of hook_form_alter().
152   */   */
153  function trash_form_alter(&$form, $form_state, $form_id) {  function trash_form_alter($form_id, &$form) {
154    if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) {    if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) {
155      // Node editing form. Check if it is an affected type.      // Node editing form. Check if it is an affected type.
156      if (trash_enabled($form['type']['#value'])) {      if (trash_enabled($form['type']['#value'])) {
# Line 181  function trash_form_alter(&$form, $form_ Line 181  function trash_form_alter(&$form, $form_
181        '#default_value' => variable_get('trash_settings_'. $form['#node_type']->type, array()),        '#default_value' => variable_get('trash_settings_'. $form['#node_type']->type, array()),
182      );      );
183    }    }
   print_r($form_id);  
184    if ($form_id == 'node_delete_confirm') {    if ($form_id == 'node_delete_confirm') {
   print_r($form);  
185      $node = node_load($form['nid']['#value']);      $node = node_load($form['nid']['#value']);
186      if (trash_enabled($node->type)) {      if (trash_enabled($node->type)) {
187        drupal_set_title(t('Are you sure you want to move %title to the trash?', array('%title' => $node->title)));        drupal_set_title(t('Are you sure you want to move %title to the trash?', array('%title' => $node->title)));

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2