From 0221159f8c62813bcb68ae33a23e3bb1f7c19e17 Mon Sep 17 00:00:00 2001 From: Heshan Wanigasooriya Date: Sun, 5 Dec 2010 15:48:43 +0000 Subject: Updating files to compatible with D7 --- types/uploadfield/uploadfield.info | 11 +++++----- types/uploadfield/uploadfield.install | 40 ++++++++++++++++++----------------- types/videoftp/videoftp.info | 10 ++++----- 3 files changed, 31 insertions(+), 30 deletions(-) (limited to 'types') diff --git a/types/uploadfield/uploadfield.info b/types/uploadfield/uploadfield.info index 9468461..3c5e92d 100644 --- a/types/uploadfield/uploadfield.info +++ b/types/uploadfield/uploadfield.info @@ -1,9 +1,10 @@ ; $Id$ + name = Video Upload description = Handle video upload for video module using filefield and CCK. -core = 6.x -version = 6.x-4.x-dev -dependencies[] = content -dependencies[] = filefield +package = Video +core = 7.x dependencies[] = video -package = "Video" \ No newline at end of file +files[] = uploadfield.module +files[] = uploadfield.field.inc +files[] = uploadfield.install \ No newline at end of file diff --git a/types/uploadfield/uploadfield.install b/types/uploadfield/uploadfield.install index a2e1b65..9f43a6d 100644 --- a/types/uploadfield/uploadfield.install +++ b/types/uploadfield/uploadfield.install @@ -2,24 +2,26 @@ // $Id$ /** - * Implementation of hook_install(). + * Implements hook_field_schema(). */ -function uploadfield_install() { - drupal_load('module', 'content'); - content_notify('install', 'uploadfield'); -} - -function uploadfield_uninstall() { - drupal_load('module', 'content'); - content_notify('uninstall', 'uploadfield'); -} - -function uploadfield_enable() { - drupal_load('module', 'content'); - content_notify('enable', 'uploadfield'); -} - -function uploadfield_disable() { - drupal_load('module', 'content'); - content_notify('disable', 'uploadfield'); +function uploadfield_field_schema($field) { + return array( + 'columns' => array( + 'fid' => array( + 'description' => 'The {file_managed}.fid being referenced in this field.', + 'type' => 'int', + 'not null' => FALSE, + 'unsigned' => TRUE, + ), + ), + 'indexes' => array( + 'fid' => array('fid'), + ), + 'foreign keys' => array( + 'fid' => array( + 'table' => 'file_managed', + 'columns' => array('fid' => 'fid'), + ), + ), + ); } \ No newline at end of file diff --git a/types/videoftp/videoftp.info b/types/videoftp/videoftp.info index 73b9318..c14f111 100644 --- a/types/videoftp/videoftp.info +++ b/types/videoftp/videoftp.info @@ -1,9 +1,7 @@ ; $Id$ + name = Video FTP description = Allows you to attach videos uploaded through FTP to nodes. -core = 6.x -version = 6.x-4.x-dev -dependencies[] = content -dependencies[] = filefield -dependencies[] = video -package = "Video" \ No newline at end of file +package = Video +core = 7.x +dependencies[] = video \ No newline at end of file -- cgit v1.2.3