diff -upr ../old/contrib/image_gallery/image_gallery.module ./contrib/image_gallery/image_gallery.module --- ../old/contrib/image_gallery/image_gallery.module 2007-12-11 12:43:54.000000000 +0300 +++ ./contrib/image_gallery/image_gallery.module 2007-12-11 12:06:14.000000000 +0300 @@ -1,5 +1,5 @@ 'Edit image gallery', 'page callback' => 'image_gallery_admin_add', - 'page arguments' => array(4), + 'page arguments' => array((array)$term), 'access arguments' => array('administer images'), 'type' => MENU_CALLBACK, ); @@ -186,19 +186,19 @@ function image_gallery_admin_add($edit = if ($_POST['op'] == t('Delete') || $_POST['confirm']) { return drupal_get_form('image_gallery_confirm_delete', $edit['tid']); } - if($edit>0) $edit = taxonomy_get_term($edit); + return drupal_get_form('image_gallery_admin_form', $edit); } -function image_gallery_admin_form($form_state, $edit = array()) { +function image_gallery_admin_form($edit = array()) { if (empty($edit)) { - $edit->vid = _image_gallery_get_vid(); + $edit['vid'] = _image_gallery_get_vid(); } $form['name'] = array( '#type' => 'textfield', '#title' => t('Gallery name'), - '#default_value' => $edit->name, + '#default_value' => $edit['name'], '#size' => 60, '#maxlength' => 64, '#description' => t('The name is used to identify the gallery.'), @@ -207,17 +207,17 @@ function image_gallery_admin_form($form_ $form['description'] = array( '#type' => 'textarea', '#title' => t('Description'), - '#default_value' => $edit->description, + '#default_value' => $edit['description'], '#cols' => 60, '#rows' => 5, '#description' => t('The description can be used to provide more information about the image gallery.'), ); $form['parent']['#tree'] = TRUE; - $form['parent'][0] = _image_gallery_parent_select($edit->tid, t('Parent'), 'forum'); + $form['parent'][0] = _image_gallery_parent_select($edit['tid'], t('Parent'), 'forum'); $form['weight'] = array( '#type' => 'weight', '#title' => t('Weight'), - '#default_value' => $edit->weight, + '#default_value' => $edit['weight'], '#delta' => 10, '#description' => t('When listing galleries, those with with light (small) weights get listed before containers with heavier (larger) weights. Galleries with equal weights are sorted alphabetically.'), ); @@ -229,20 +229,18 @@ function image_gallery_admin_form($form_ '#type' => 'submit', '#value' => t('Submit'), ); - if ($edit->tid) { + if ($edit['tid']) { $form['delete'] = array( '#type' => 'submit', '#value' => t('Delete'), ); $form['tid'] = array( '#type' => 'hidden', - '#value' => $edit->tid, + '#value' => $edit['tid'], ); } $form['#submit'][] = 'image_gallery_admin_submit'; $form['#theme'][] = 'image_gallery_admin'; - $form['#redirect'] = 'admin/content/image'; - return $form; } @@ -259,7 +257,7 @@ function image_gallery_admin_submit($for drupal_set_message(t('The gallery %term has been deleted.', array('%term' => $form_state['values']['name']))); break; } - return; + return 'admin/content/image'; } function image_gallery_confirm_delete($tid) { Only in ./contrib/image_gallery: image_gallery.module~ Only in ./: image-d6upgrade-181809-22_and_editform.patch