Changeset 1070 for devel/mod/widget

Show
Ignore:
Timestamp:
04/16/07 09:00:04 (2 years ago)
Author:
ben
Message:

Database handling changes for the widget system.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/widget/lib.php

    r1060 r1070  
    1919    function widget_init() { 
    2020         
    21         global $CFG, $function, $db
     21        global $CFG, $function, $db, $METATABLES
    2222         
    2323        $function['init'][] = $CFG->dirroot . "mod/widget/init.php"; 
     
    3636                                                'type' => "widget::text" 
    3737                                        ); 
    38  /*                               
    39         $tables = $db->Metatables(); 
    40         if (!in_array($CFG->prefix . "widget_data",$tables) || !in_array($CFG->prefix . "widgets",$tables)) { 
     38        if (!in_array($CFG->prefix . "widget_data",$METATABLES) || !in_array($CFG->prefix . "widgets",$METATABLES)) { 
    4139            if (file_exists($CFG->dirroot . "mod/widget/$CFG->dbtype.sql")) { 
    4240                modify_database($CFG->dirroot . "mod/widget/$CFG->dbtype.sql"); 
     
    4745            exit; 
    4846        } 
    49   */       
    5047         
    5148        // Delete users 
  • devel/mod/widget/mysql.sql

    r1030 r1070  
    66  PRIMARY KEY  (`ident`), 
    77  KEY `widget` (`widget`) 
    8 ) ENGINE=MyISAM
     8)
    99 
    1010CREATE TABLE `prefix_widgets` ( 
     
    2020  KEY `owner` (`owner`,`display_order`,`access`), 
    2121  KEY `location_id` (`location_id`)  
    22 ) ENGINE=MyISAM
     22)