Changeset 479

Show
Ignore:
Timestamp:
02/10/08 23:04:54 (11 months ago)
Author:
padams
Message:

fixes for gallery plugin not installing under mysqli db extension.

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/module.inc

    r474 r479  
    2626 * All configuration taken from Gallery directly. 
    2727 */ 
    28 function owa_factory() { 
     28function owa_factory($params = array()) { 
    2929         
    3030        static $owa; 
     
    3838                 
    3939                // init the configuration array for this caller 
    40                 $owa_config = array(); 
     40                $owa_config = $params; 
    4141                 
    4242                // OWA DATABASE CONFIGURATION  
     
    4747                // Get Gallery's DB configuration 
    4848                $db_config = $gallery->getConfig('storage.config'); 
    49                          
    50                 // set OWA's database configuration values       
    51                 $owa_config['db_type'] = $db_config['type']; 
     49                        $gallery->debug($db_config['type']); 
     50                // set OWA's database configuration values 
     51                if ($db_config['type'] === 'mysqli'): 
     52                        $owa_config['db_type'] = 'mysql'; 
     53                else: 
     54                        $owa_config['db_type'] = $db_config['type']; 
     55                endif; 
     56                $gallery->debug($owa_config['db_type']); 
    5257                $owa_config['db_name'] = $db_config['database']; 
    5358                $owa_config['db_host'] = $db_config['hostname'];  
     
    7782                $owa_config['is_embedded'] = 'true'; 
    7883                 
     84                $gallery->debug('hello from owa'); 
     85 
    7986                // create owa instance 
    8087                $owa = new owa_php($owa_config); 
     88$gallery->debug('hello from owa after'); 
    8189                 
    8290                return $owa; 
     
    279287                 
    280288                global $gallery; 
    281                                  
    282                 $owa = owa_factory(); 
    283                  
    284                 // set user priviledges of the request for OWA to log 
     289                 
     290                $owa_config = array(); 
     291                $owa_config['do_not_fetch_config_from_db'] = true;               
     292                $owa = owa_factory($owa_config); 
     293                                // set user priviledges of the request for OWA to log 
    285294                owa_set_priviledges(); 
    286295                 
  • trunk/owa_caller.php

    r469 r479  
    111111                $this->e->debug('Caller configuration overrides applied.'); 
    112112                 
    113                  
    114113                /* APPLY CONFIGURATION FILE OVERRIDES */ 
    115114                 
     
    219218                // needed for backwards compatability  
    220219                $this->config = $this->c->fetch('base'); 
    221  
     220                 
    222221                return; 
    223222         
  • trunk/owa_install.php

    r361 r479  
    8282                 
    8383                $table_check = array(); 
    84                  
     84                //$this->e->notice(print_r($this->tables, true)); 
    8585                // test for existance of tables 
    8686                foreach ($this->tables as $table) { 
  • trunk/owa_module.php

    r367 r479  
    271271                 
    272272                $obj = $this->installerFactory(); 
     273                //$this->e->notice(print_r($obj, true)); 
     274 
    273275                $this->e->notice('starting install'); 
    274276                $tables_to_install = $obj->checkForSchema();