From c7474ecfeb5036e568c940b629accd6a3d038b09 Mon Sep 17 00:00:00 2001 From: Heshan Wanigasooriya Date: Thu, 13 Jan 2011 02:37:51 +0000 Subject: #1024822 by hadsie. [Patch] Class attribute in forms is an array in D7 and Fatal error: Call to undefined function content_fields() D7 --- video.install | 55 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 15 deletions(-) (limited to 'video.install') diff --git a/video.install b/video.install index 35fcc31..1d07e50 100644 --- a/video.install +++ b/video.install @@ -78,12 +78,11 @@ function video_schema() { return $schema; } - /** * Implementation of hook_install(). */ function video_install() { -// drupal_install_schema('video'); + drupal_install_schema('video'); } /** @@ -103,18 +102,44 @@ function video_uninstall() { } /** - * Implements hook_requirements() to check the PHP GD Library. - * - * @param $phase - * @TODO : add requirment when this need FFMPEG, thing on install profiles + * Implements hook_field_schema(). */ -function video_requirements($phase) { - $requirements = array(); - - if ($phase == 'runtime') { - $requirements['video']['value'] = t('1.0'); - $requirements['video']['severity'] = REQUIREMENT_OK; - $requirements['video']['title'] = t('GD library rotate and desaturate effects'); - } - return $requirements; +function video_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, + ), + 'fid' => array( + 'description' => 'The {file_managed}.fid being referenced in this field.', + 'type' => 'int', + 'not null' => FALSE, + 'unsigned' => TRUE, + ), + 'dimensions' => array( + 'description' => "Video dimention for the video player.", + 'type' => 'varchar', + 'length' => 32, + 'not null' => FALSE, + ), + 'title' => array( + 'description' => "Image title text, for the image's 'title' attribute.", + 'type' => 'varchar', + 'length' => 128, + 'not null' => FALSE, + ), + ), + 'indexes' => array( + 'fid' => array('fid'), + ), + 'foreign keys' => array( + 'fid' => array( + 'table' => 'file_managed', + 'columns' => array('fid' => 'fid'), + ), + ), + ); } \ No newline at end of file -- cgit v1.2.3