annotate mee.install @ 17:464f6a6e0e7f

Change the height of the editor. Make the editor bigger, trying to make it match the library height. That should make it more straigthforward to move an item from the library to the editor.
author Franck Deroche <franck@defr.org>
date Fri, 16 Oct 2009 12:06:16 +0000
parents 7bb375e191b1
children
rev   line source
eads@0 1 <?php
eads@0 2 // $Id;
eads@0 3
eads@0 4 /**
eads@0 5 * @file
eads@0 6 * Implementation of hook_install().
eads@0 7 */
eads@0 8 function mee_install() {
eads@0 9 drupal_load('module', 'content');
eads@0 10 content_notify('install', 'mee');
franck@14 11 drupal_install_schema('mee');
eads@0 12 }
eads@0 13
eads@0 14 /**
eads@0 15 * Implementation of hook_uninstall().
eads@0 16 */
eads@0 17 function mee_uninstall() {
eads@0 18 drupal_load('module', 'content');
eads@0 19 content_notify('uninstall', 'mee');
franck@14 20 drupal_uninstall_schema('mee');
eads@0 21 }
eads@0 22
eads@0 23 /**
eads@0 24 * Implementation of hook_disable().
eads@0 25 */
eads@0 26 function mee_disable() {
eads@0 27 drupal_load('module', 'content');
eads@0 28 content_notify('disable', 'mee');
eads@0 29 }
franck@14 30
franck@14 31 /**
franck@14 32 * Add separate column for the required status
franck@14 33 */
franck@14 34 function mee_update_6001() {
franck@14 35 $ret = array();
franck@14 36 switch ($GLOBALS['db_type']) {
franck@14 37 case 'mysql':
franck@14 38 case 'mysqli':
franck@14 39 $ret[] = update_sql("ALTER TABLE {mee_ressources} ADD required INT NOT NULL DEFAULT 0");
franck@14 40 break;
franck@14 41 }
franck@14 42 return $ret;
franck@14 43 }
franck@14 44
franck@15 45 /**
franck@15 46 * Include the 'field' field in the primary key.
franck@15 47 */
franck@15 48 function mee_update_6002() {
franck@15 49 $ret = array();
franck@15 50 $ret[] = update_sql("ALTER TABLE {mee_ressources} DROP PRIMARY KEY, ADD PRIMARY KEY(content_nid, atom_sid, field)");
franck@15 51 return $ret;
franck@15 52 }
franck@14 53
franck@14 54 /**
franck@14 55 * Implementation of hook_schema().
franck@14 56 */
franck@14 57 function mee_schema() {
franck@14 58 $schema['mee_ressources'] = array(
franck@14 59 'fields' => array(
franck@14 60 'content_nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
franck@14 61 'atom_sid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
franck@14 62 'field' => array('type' => 'varchar', 'length' => 31, 'not null' => TRUE, 'default' => ''),
franck@14 63 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
franck@14 64 'required' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
franck@14 65 ),
franck@15 66 'primary key' => array('content_nid', 'atom_sid', 'field'),
franck@14 67 );
franck@14 68
franck@14 69 return $schema;
franck@14 70 }