Changeset 414 for branches/XPressMU/xpressme_integration_kit/include
- Timestamp:
- Oct 21, 2009, 9:00:31 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/XPressMU/xpressme_integration_kit/include/general_functions.php
r264 r414 119 119 } 120 120 121 // Get Multi Blog table list for WordPressMU 122 if (!function_exists('get_multi_table_list')){ 123 function get_table_list($wp_prefix = '',$table_name = ''){ 124 global $xoopsDB,$xoops_db; 125 126 $table_list = array(); 127 $ret = array(); 128 if (!empty($wp_prefix) && !empty($table_name)){ 129 $sql = "SHOW TABLES LIKE '" . $wp_prefix . '%' . $table_name . "'"; 130 131 if (empty($xoops_db)) { // not load XPressME 132 if($result = $xoopsDB->queryF($sql)){ 133 while($row = $xoopsDB->fetchRow($result)){ 134 $table_list[] = $row[0]; 135 } 136 } 137 } else { // load XPressME or not Load XOOPS 138 $table_list = $xoops_db->get_results($sql); 139 } 140 } 141 return $table_list; 142 } 143 } 144 145 // Get Middle Prefix from Table name for WordPressMU 146 if (!function_exists('get_multi_mid_prefix')){ 147 function get_multi_mid_prefix($wp_prefix = '',$table_name = '' , $full_table_name){ 148 $pattern = '/' . $wp_prefix . '(.*)' . $table_name . '/'; 149 preg_match($pattern,$full_table_name,$match); 150 return $match[1]; 151 } 152 } 153 121 154 ?>
Note: See TracChangeset
for help on using the changeset viewer.