XPressME Integration Kit

Trac


Ignore:
Timestamp:
Jun 3, 2011, 10:30:52 AM (13 years ago)
Author:
toemon
Message:

wp_installer.php で拡張データベースのプレフィックスが正常に取得出来ないバグ修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/include/wp_installer.php

    r757 r789  
    4646        //xpress 
    4747        global $wpdb,$wp_rewrite, $wp_queries, $table_prefix, $wp_db_version, $wp_roles, $wp_query,$wp_embed; 
     48        global $modInfo; 
    4849        $msgs = array(); 
    4950                 
    50         $site_url= XOOPS_URL."/modules/".$mydirname; 
    51         $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname; 
     51        $site_url= $modInfo->get_module_url(); 
     52        $mydirpath = $modInfo->get_module_path(); 
    5253        $path = $mydirpath . '/'; 
    5354        $site_name = ucfirst($mydirname) . ' ' . _MI_XP2_NAME; 
     
    106107         
    107108        // Rewrite Option for Xpress 
    108         $xoops_conf_tbl = XOOPS_DB_PREFIX . '_config' ; 
     109        $xoops_conf_tbl = $modInfo->get_xoops_db_prefix() . '_config' ; 
    109110        $sql = "SELECT conf_value FROM  $xoops_conf_tbl WHERE `conf_name` = 'default_TZ'"; 
    110111        $xoops_default_TZ = $wpdb->get_var($sql); 
     
    147148         
    148149        // create XPressME table 
    149         $xp_prefix = preg_replace('/wordpress/','wp',$mydirname); 
    150         $views_table = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_views' ; 
     150        $xp_prefix = $modInfo->get_module_db_prefix(); 
     151        $views_table = $xp_prefix .'views' ; 
    151152 
    152153        $charset_collate = ''; 
     
    166167        $msgs[] = "$views_table table of XPressME was made.<br />"; 
    167168         
    168         $d3forum_link = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_d3forum_link' ; 
     169        $d3forum_link = $xp_prefix .'d3forum_link' ; 
    169170        $views_queries ="CREATE TABLE $d3forum_link ( 
    170171                comment_ID bigint(20) unsigned NOT NULL default '0', 
     
    178179        $msgs[] = "$d3forum_link table of XPressME was made.<br />"; 
    179180         
    180         $group_role = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_group_role' ; 
     181        $group_role = $xp_prefix .'group_role' ; 
    181182        $views_queries ="CREATE TABLE $group_role ( 
    182183                groupid smallint(5) unsigned NOT NULL default '0', 
     
    194195        $wpdb->query($sql); 
    195196         
    196         $notify_reserve = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_notify_reserve' ; 
     197        $notify_reserve = $xp_prefix .'notify_reserve' ; 
    197198        $queries ="CREATE TABLE $notify_reserve ( 
    198199                notify_reserve_id bigint(20) NOT NULL AUTO_INCREMENT , 
Note: See TracChangeset for help on using the changeset viewer.