XPressME Integration Kit

Trac


Ignore:
Timestamp:
Apr 23, 2010, 10:49:33 AM (14 years ago)
Author:
toemon
Message:

xoops_mod_wordpress060_alphaの複製モジュールからのアップデート対応 fixes#335

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/admin/index.php

    r551 r583  
    3636        $mydirname = basename(dirname(dirname(__FILE__))); 
    3737        $my_dirpath = dirname(dirname(__FILE__)); 
    38         $wp_prefix_only = $mydirname; 
    39         if ($wp_prefix_only == 'wordpress') $wp_prefix_only ='wp'; 
     38        $wp_prefix_only = preg_replace('/wordpress/','wp',$mydirname); 
    4039        $db_prefix = $xoopsDB->prefix($wp_prefix_only); 
    4140 
     
    120119        $mydirname = basename(dirname(dirname(__FILE__))); 
    121120        $my_dirpath = dirname(dirname(__FILE__)); 
    122         $prefix = $mydirname; 
    123         if ($prefix == 'wordpress') $prefix ='wp'; 
     121        $prefix = preg_replace('/wordpress/','wp',$mydirname); 
    124122        $wp_prefix = $xoopsDB->prefix($prefix); 
    125123 
     
    540538         
    541539        $xp_prefix = $GLOBALS['xoopsModule']->getInfo('dirname'); 
    542         if ($xp_prefix == 'wordpress'){ 
    543                 $xp_prefix = 'wp'; 
    544         } 
     540        $xp_prefix = preg_replace('/wordpress/','wp',$xp_prefix); 
    545541 
    546542        $prefix = $xoopsDB->prefix($xp_prefix . '_'); 
     
    614610        $xoopsDB =& Database::getInstance(); 
    615611        $xp_prefix = $GLOBALS['xoopsModule']->getInfo('dirname'); 
    616         if ($xp_prefix == 'wordpress'){ 
    617                 $xp_prefix = 'wp'; 
    618         } 
     612        $xp_prefix = preg_replace('/wordpress/','wp',$xp_prefix); 
    619613        $prefix = $xoopsDB->prefix($xp_prefix . '_'); 
    620614        $group_role_tables = $prefix.'group_role'; 
Note: See TracChangeset for help on using the changeset viewer.