| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 | 
							- <?php
 
- /**
 
-  * Install the tripal stock module including it's content type
 
-  * @file
 
-  */
 
- /**
 
-  * Disable default views when module is disabled
 
-  */
 
- function tripal_stock_disable() {
 
-   // Disable all default views provided by this module
 
-   require_once("tripal_stock.views_default.inc");
 
-   $views = tripal_stock_views_default_views();
 
-   foreach (array_keys($views) as $view_name) {
 
-     tripal_views_admin_disable_view($view_name,FALSE,array('suppress_error' => TRUE));
 
-   }
 
- }
 
- /**
 
-  * Implementation of hook_requirements().
 
-  *
 
-  */
 
- function tripal_stock_requirements($phase) {
 
-   $requirements = array();
 
-   if ($phase == 'install') {
 
-     // make sure chado is installed
 
-     if (!$GLOBALS["chado_is_installed"]) {
 
-       $requirements ['tripal_stock'] = array(
 
-         'title' => "tripal_stock",
 
-         'value' => "ERROR: Chado most be installed before this module can be enabled",
 
-         'severity' => REQUIREMENT_ERROR,
 
-       );
 
-     }
 
-   }
 
-   return $requirements;
 
- }
 
- /**
 
-  * Implementation of hook_install().
 
-  */
 
- function tripal_stock_install() {
 
-   // create the module's data directory
 
-   tripal_create_moddir('tripal_stock');
 
- }
 
- /**
 
-  * Implementation of hook_uninstall().
 
-  */
 
- function tripal_stock_uninstall() {
 
- }
 
- /**
 
-  * Implementation of hook_schema().
 
-  */
 
- function tripal_stock_schema() {
 
-   $schema['chado_stock'] = array(
 
-     'fields' => array(
 
-       'vid' => array(
 
-         'type' => 'int',
 
-         'unsigned' => TRUE,
 
-         'not null' => TRUE,
 
-       ),
 
-       'nid' => array(
 
-         'type' => 'int',
 
-         'unsigned' => TRUE,
 
-         'not null' => TRUE,
 
-       ),
 
-       'stock_id' => array(
 
-         'type' => 'int',
 
-         'unsigned' => TRUE,
 
-         'not null' => TRUE,
 
-       ),
 
-     ),
 
-     'indexes' => array(
 
-       'stock_id' => array('stock_id'),
 
-        'nid' => array('nid'),
 
-     ),
 
-     'unique' => array(
 
-       'stock_id' => array('stock_id'),
 
-     ),
 
-     'primary key' => array('vid'),
 
-   );
 
-   return $schema;
 
- }
 
 
  |