? image-d6upgrade-181809-1.patch ? image-d6upgrade-181809-3.patch Index: README.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/README.txt,v retrieving revision 1.6 diff -u -p -r1.6 README.txt --- README.txt 18 Jul 2007 17:04:02 -0000 1.6 +++ README.txt 28 Oct 2007 18:49:52 -0000 @@ -7,4 +7,4 @@ other nodes, or used on their own to dis diagrams. Author: -James Walker +James Walker Index: image.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/image.info,v retrieving revision 1.4 diff -u -p -r1.4 image.info --- image.info 18 Jul 2007 17:04:02 -0000 1.4 +++ image.info 28 Oct 2007 18:49:52 -0000 @@ -2,3 +2,4 @@ name = Image description = Allows uploading, resizing and viewing of images. package = Image +core = 6.x Index: image.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/image.install,v retrieving revision 1.14 diff -u -p -r1.14 image.install --- image.install 10 Oct 2007 04:10:07 -0000 1.14 +++ image.install 28 Oct 2007 18:49:52 -0000 @@ -4,35 +4,45 @@ /** * Installing and updating image.module. */ +function image_schema() { + $schema['image'] = array( + 'description' => t('Stores image files information.'), + 'fields' => array( + 'nid' => array( + 'description' => t('Primary Key: The {node}.nid of the image node.'), + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + ), + 'fid' => array( + 'description' => t('Index: The {files}.fid of the image file.'), + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + ), + 'image_size' => array( + 'description' => t('Primary Key: The {files}.filename of the image file. For image module this indicates the file size.'), + 'type' => 'varchar', + 'length' => 32, + 'not null' => TRUE, + 'default' => '', + ), + ), + ); +} + +/** + * Installing and updating image.module. + */ function image_install() { - switch ($GLOBALS['db_type']) { - case 'mysql': - case 'mysqli': - db_query("CREATE TABLE {image} ( - `nid` INTEGER UNSIGNED NOT NULL, - `fid` INTEGER UNSIGNED NOT NULL, - `image_size` VARCHAR(32) NOT NULL, - PRIMARY KEY (`nid`, `image_size`), - INDEX image_fid(`fid`) - ) /*!40100 DEFAULT CHARACTER SET utf8 */;"); - break; - case 'pgsql': - db_query("CREATE TABLE {image} ( - nid int_unsigned NOT NULL, - fid int_unsigned NOT NULL, - image_size VARCHAR(32) NOT NULL, - PRIMARY KEY (nid, image_size) - ); - CREATE INDEX {image_fid} on {image}(fid);"); - break; - } + drupal_install_schema('image'); } /** * Implementation of hook_uninstall(). */ function image_uninstall() { - db_query('DROP TABLE {image}'); + drupal_uninstall_schema('image'); variable_del('image_max_upload_size'); variable_del('image_updated'); Index: image.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/image.module,v retrieving revision 1.258 diff -u -p -r1.258 image.module --- image.module 26 Sep 2007 19:40:42 -0000 1.258 +++ image.module 28 Oct 2007 18:49:52 -0000 @@ -16,8 +16,8 @@ if (module_exists('views')) { /** * Implementation of hook_help */ -function image_help($section) { - switch ($section) { +function image_help($path, $arg) { + switch ($path) { case 'admin/help#image': $output = '

'. t('The image module is used to create and administer images for your site. Each image is stored as a post, with thumbnails of the original generated automatically. There are two default thumbnail sizes, thumbnail and preview. The thumbnail size is shown as the preview for image posts and when browsing image galleries. The preview is the default size when first displaying an image node.') .'

'; $output .= '

'. t('Image administration allows the image directory and the image sizes to be set.

@@ -175,7 +175,7 @@ function image_admin_settings() { /** * Check that the sizes provided have the required amount of information. */ -function image_settings_sizes_validate(&$form) { +function image_settings_sizes_validate($form, &$form_state) { foreach (element_children($form) as $key) { // If there's a label they must provide at either a height or width. if ($key != IMAGE_ORIGINAL && !empty($form[$key]['label']['#value'])) { @@ -192,13 +192,13 @@ function image_settings_sizes_validate(& * * Remove deleted sizes, and use the label as indexes for new sizes. */ -function image_settings_sizes_submit($form_id, &$form_values) { +function image_settings_sizes_submit($form, &$form_state) { $old_sizes = image_get_sizes(); // If the size's operation, or dimensions change we need to rebuild. $rebuild = FALSE; - foreach ($form_values['image_sizes'] as $key => $size) { + foreach ($form_state['values']['image_sizes'] as $key => $size) { // Changed to the original setting only affect new images and they // shouldn't be able to add or remove it. if ($key == IMAGE_ORIGINAL) { @@ -207,25 +207,25 @@ function image_settings_sizes_submit($fo // Remove sizes without labels. if (empty($size['label'])) { - unset($form_values['image_sizes'][$key]); + unset($form_state['values']['image_sizes'][$key]); } // Check if only one is set, indicating an addition or removal. - if (isset($form_values['image_sizes'][$key]) ^ isset($old_sizes[$key])) { + if (isset($form_state['values']['image_sizes'][$key]) ^ isset($old_sizes[$key])) { $rebuild |= TRUE; // When adding a new size, we need to assign a key. - if (isset($form_values['image_sizes'][$key])) { - unset($form_values['image_sizes'][$key]); + if (isset($form_state['values']['image_sizes'][$key])) { + unset($form_state['values']['image_sizes'][$key]); $new_key = drupal_strtolower(drupal_substr($size['label'], 0, 32)); - $form_values['image_sizes'][$new_key] = $size; + $form_state['values']['image_sizes'][$new_key] = $size; } } // Check for changes. - else if (isset($form_values['image_sizes'][$key]) && isset($old_sizes[$key])) { + else if (isset($form_state['values']['image_sizes'][$key]) && isset($old_sizes[$key])) { // Did the operation, height or width change? foreach (array('operation', 'height', 'width') as $field) { - $rebuild |= ($form_values['image_sizes'][$key][$field] != $old_sizes[$key][$field]); + $rebuild |= ($form_state['values']['image_sizes'][$key][$field] != $old_sizes[$key][$field]); } } } @@ -234,10 +234,10 @@ function image_settings_sizes_submit($fo // derivative images are rebuilt. if ($rebuild) { drupal_set_message(t('Changes to the images sizes mean that the derivative images will need to be regenerated.')); - $form_values['image_updated'] = time(); + $form_state['values']['image_updated'] = time(); } - return system_settings_form_submit($form_id, $form_values); + return system_settings_form_submit($form, &$form_state); } function theme_image_settings_sizes_form(&$form) { @@ -260,32 +260,23 @@ function theme_image_settings_sizes_form /** * Implementation of hook_menu */ -function image_menu($may_cache) { +function image_menu() { $items = array(); - if ($may_cache) { - $items[] = array( - 'path' => 'node/add/image', - 'title' => t('Image'), - 'access' => user_access('create images'), - ); - $items[] = array( - 'path' => 'image/view', - 'title' => t('image'), - 'access' => user_access('access content'), - 'type' => MENU_CALLBACK, - 'callback' => 'image_fetch', - ); - $items[] = array( - 'path' => 'admin/settings/image', - 'title' => t('Image'), - 'callback' => 'drupal_get_form', - 'callback arguments' => array('image_admin_settings'), - 'access' => user_access('administer site configuration'), - 'type' => MENU_NORMAL_ITEM, - 'description' => t('Image module settings.'), - ); - } + $items['image/view'] = array( + 'title' => 'image', + 'access arguments' => array('access content'), + 'type' => MENU_CALLBACK, + 'page callback' => 'image_fetch', + ); + $items['admin/settings/image'] = array( + 'title' => 'Image', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('image_admin_settings'), + 'access arguments' => array('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, + 'description' => 'Image module settings.', + ); return $items; } @@ -664,7 +655,7 @@ function image_load(&$node) { // Correct any problems with the derivative images. if ($node->rebuild_images) { image_update($node); - watchdog('image', t('Derivative images were regenerated for %title.', array('%title' => $node->title)), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid)); + watchdog('image', 'Derivative images were regenerated for %title.', array('%title' => $node->title), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid)); } } Index: views.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/views.inc,v retrieving revision 1.4 diff -u -p -r1.4 views.inc --- views.inc 27 Aug 2007 22:50:39 -0000 1.4 +++ views.inc 28 Oct 2007 18:49:52 -0000 @@ -99,7 +99,7 @@ function image_views_handler_image_img($ */ function image_views_handler_image_img_link($fieldinfo, $fielddata, $value, $data) { $node = node_load($data->nid); - return l(image_display($node, $fielddata['options']), "node/{$node->nid}", array(), NULL, NULL, FALSE, TRUE); + return l(image_display($node, $fielddata['options']), "node/{$node->nid}", array('html' => TRUE)); } /** Index: contrib/image_attach/image_attach.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_attach/image_attach.info,v retrieving revision 1.3 diff -u -p -r1.3 image_attach.info --- contrib/image_attach/image_attach.info 18 Jul 2007 17:04:24 -0000 1.3 +++ contrib/image_attach/image_attach.info 28 Oct 2007 18:49:52 -0000 @@ -2,4 +2,5 @@ name = Image Attach description = Allows easy attaching of image nodes to other content types. package = Image -dependencies = image \ No newline at end of file +dependencies[] = image +core = 6.x \ No newline at end of file Index: contrib/image_attach/image_attach.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_attach/image_attach.install,v retrieving revision 1.10 diff -u -p -r1.10 image_attach.install --- contrib/image_attach/image_attach.install 18 Jul 2007 17:04:24 -0000 1.10 +++ contrib/image_attach/image_attach.install 28 Oct 2007 18:49:52 -0000 @@ -1,31 +1,41 @@ t('Stores the image/node relationship.'), + 'fields' => array( + 'nid' => array( + 'description' => t('Primary Key: The {node}.nid of the node.'), + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + ), + 'iid' => array( + 'description' => t('TODO'), + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + ), + ), + ); +} - case 'pgsql': - db_query("CREATE TABLE {image_attach} ( - nid integer NOT NULL default '0', - iid integer NOT NULL default '0', - PRIMARY KEY (nid) - )"); - db_query("CREATE INDEX {image_attach}_iid_idx ON {image_attach}(iid)"); - break; - } +/** + * Implementation of hook_install(). + */ +function image_attach_install() { + drupal_install_schema('image_attach'); } +/** + * Implementation of hook_uninstall(). + */ function image_attach_uninstall() { - db_query('DROP TABLE {image_attach}'); + drupal_uninstall_schema('image_attach'); variable_del('image_attach_existing'); } Index: contrib/image_gallery/image_gallery.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_gallery/image_gallery.info,v retrieving revision 1.4 diff -u -p -r1.4 image_gallery.info --- contrib/image_gallery/image_gallery.info 18 Jul 2007 17:04:31 -0000 1.4 +++ contrib/image_gallery/image_gallery.info 28 Oct 2007 18:49:52 -0000 @@ -2,5 +2,6 @@ name = Image Gallery description = Allows sorting and displaying of image galleries based on categories. package = Image -dependencies = image taxonomy - +dependencies[] = image +dependencies[] = taxonomy +core = 6.x Index: contrib/image_im_advanced/image_im_advanced.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_im_advanced/image_im_advanced.info,v retrieving revision 1.1 diff -u -p -r1.1 image_im_advanced.info --- contrib/image_im_advanced/image_im_advanced.info 26 Aug 2007 21:30:02 -0000 1.1 +++ contrib/image_im_advanced/image_im_advanced.info 28 Oct 2007 18:49:52 -0000 @@ -2,3 +2,4 @@ name = ImageMagick Advanced Options description = Adds advanced options to the ImageMagick image toolkit. package = Image +core = 6.x Index: contrib/image_import/image_import.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_import/image_import.info,v retrieving revision 1.3 diff -u -p -r1.3 image_import.info --- contrib/image_import/image_import.info 18 Jul 2007 17:04:37 -0000 1.3 +++ contrib/image_import/image_import.info 28 Oct 2007 18:49:52 -0000 @@ -2,5 +2,6 @@ name = Image Import description = Allows batches of images to be imported from a directory on the server. package = Image -dependencies = image +dependencies[] = image +core = 6.x Index: contrib/image_import/image_import.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_import/image_import.module,v retrieving revision 1.11 diff -u -p -r1.11 image_import.module --- contrib/image_import/image_import.module 24 Jul 2007 17:33:42 -0000 1.11 +++ contrib/image_import/image_import.module 28 Oct 2007 18:49:52 -0000 @@ -67,11 +67,11 @@ function image_import_form() { if ($files) { if (module_exists('taxonomy')) { - // here's a little hack to get the taxonmy controls onto our form + // here's a little hack to get the taxonomy controls onto our form $form['type'] = array('#type' => 'value', '#value' => 'image'); $form['#node'] = new stdClass(); $form['#node']->type = 'image'; - taxonomy_form_alter('image_node_form', $form); + taxonomy_form_alter(&$form, $form_state, 'image_node_form'); unset($form['type']); unset($form['#node']); }