Changeset 749
- Timestamp:
- May 19, 2011, 6:47:15 PM (14 years ago)
- Location:
- branches/Ver3.0/xpressme_integration_kit
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver3.0/xpressme_integration_kit/admin/index.php
r744 r749 31 31 32 32 function admin_check_user_meta_prefix($is_report = false){ 33 global $xoopsModule; 34 $xoopsDB =& Database::getInstance(); 33 global $xoopsModule,$xoopsDB; 35 34 36 35 $mydirname = basename(dirname(dirname(__FILE__))); … … 114 113 function get_xpress_active_plugin_list($before_str = '') 115 114 { 116 global $xoopsModule; 117 $xoopsDB =& Database::getInstance(); 115 global $xoopsModule,$xoopsDB; 118 116 119 117 $mydirname = basename(dirname(dirname(__FILE__))); … … 537 535 function xpress_state($is_report = false) 538 536 { 539 global $xoopsModule ;537 global $xoopsModule,$xoopsDB; 540 538 include(dirname(__FILE__) . '/../wp-includes/version.php'); 541 539 include_once(dirname(__FILE__) . '/../include/general_functions.php'); 542 540 543 $xoopsDB =& Database::getInstance();544 541 545 542 $xp_prefix = $GLOBALS['xoopsModule']->getInfo('dirname'); … … 613 610 function xpress_group_role_state($is_report = false) 614 611 { 615 global $xoopsModule; 616 $xoopsDB =& Database::getInstance(); 612 global $xoopsModule,$xoopsDB; 617 613 $xp_prefix = $GLOBALS['xoopsModule']->getInfo('dirname'); 618 614 $xp_prefix = preg_replace('/wordpress/','wp',$xp_prefix); … … 692 688 function xpress_block_options($is_report = false) 693 689 { 690 global $xoopsModule; 694 691 $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; 695 692 696 693 $module_objs = & get_module_objects($mydirname); 697 694 $module_obj = $module_objs[0]; 698 $mod_id = $ module_obj->getVar('mid', 'n');695 $mod_id = $xoopsModule->getVar('mid', 'n'); 699 696 $blocks = & get_block_object_orber_num_bymodule_id( $mod_id ); 700 $infos = & $module_obj->getInfo('blocks');697 $infos = $xoopsModule->getInfo('blocks'); 701 698 if ($is_report){ 702 699 echo "******** " . _AM_XP2_BLOCK_OPTIONS . "********" . "<br />\n"; -
branches/Ver3.0/xpressme_integration_kit/blocks/block_common.php
r583 r749 21 21 function categorie_select($option_name = '',$value='',$row_num=0 ,$sort_column = 'ID', $sort_order = 'asc') 22 22 { 23 global $xoopsDB; 23 24 $mydirpath = dirname(dirname(__FILE__)); 24 25 $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; 25 26 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname) . '_'; 26 $xoopsDB =& Database::getInstance();27 27 $myts =& MyTextSanitizer::getInstance(); 28 28 $selected = explode(',' , $value); -
branches/Ver3.0/xpressme_integration_kit/blocks/widget_block.php
r583 r749 17 17 function _b_widget_edit($options) 18 18 { 19 global $xoopsDB; 19 20 $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ; 20 21 $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_widget_block.html' : trim( $options[1] ); … … 24 25 $selected = explode(',' , $widget_select); 25 26 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname) . '_'; 26 $xoopsDB =& Database::getInstance();27 27 $myts =& MyTextSanitizer::getInstance(); 28 28 -
branches/Ver3.0/xpressme_integration_kit/class/modInfo_class.php
r747 r749 133 133 134 134 function is_wpdb_installed(){ 135 global $xoopsDB; 135 136 $mydirname = basename(dirname( dirname( __FILE__ ) )) ; 136 137 $prefix_mod = XOOPS_DB_PREFIX .'_' . preg_replace('/wordpress/','wp',$mydirname) . '_'; 137 $xoopsDB =& Database::getInstance();138 138 $sql = "SHOW TABLES LIKE '$prefix_mod%'"; 139 139 if ($result = $xoopsDB->queryf($sql)){ -
branches/Ver3.0/xpressme_integration_kit/class/wpInfo_class.php
r746 r749 88 88 } 89 89 function __construct() { 90 global $xoopsDB; 90 91 $this->mod_dirpath = dirname(dirname(__FILE__)); 91 92 $this->mod_name = basename(dirname(dirname(__FILE__))); … … 94 95 $this->xoops_Lang = @$GLOBALS["xoopsConfig"]['language']; 95 96 $this->php_version = phpversion(); 96 $xoopsDB =& Database::getInstance();97 97 list($SV) = $xoopsDB->fetchRow($xoopsDB->query('SELECT version()')); 98 98 $this->mysql_version = $SV; … … 147 147 148 148 function is_wpdb_installed(){ 149 global $xoopsDB; 149 150 $prefix_mod = XOOPS_DB_PREFIX .'_' . preg_replace('/wordpress/','wp',$this->mod_name) . '_'; 150 $xoopsDB =& Database::getInstance();151 151 $sql = "SHOW TABLES LIKE '$prefix_mod%'"; 152 152 if ($result = $xoopsDB->queryf($sql)){ -
branches/Ver3.0/xpressme_integration_kit/class/xpressD3commentContent.class.php
r616 r749 10 10 // include_once dirname(dirname(__FILE__)).'/include/common_functions.php' ; 11 11 global $forum_id; 12 13 $db =& Database::getInstance() ;12 global $xoopsDB; 13 14 14 $myts =& MyTextsanitizer::getInstance() ; 15 15 … … 26 26 $blog_info = $this->get_comment_blog_info($forum_id); 27 27 // query 28 $post_row = $ db->fetchArray( $db->query( "SELECT * FROM ".$blog_info['mb_table_prefix']."posts WHERE ID=$post_id" ) ) ;28 $post_row = $xoopsDB->fetchArray( $xoopsDB->query( "SELECT * FROM ".$blog_info['mb_table_prefix']."posts WHERE ID=$post_id" ) ) ; 29 29 if( empty( $post_row ) ) return '' ; 30 30 … … 68 68 function canAddComment($external_link_id) 69 69 { 70 global $xoopsDB; 70 71 global $forum_id; 71 72 global $post; … … 80 81 } 81 82 } 82 $db =& Database::getInstance() ;83 83 $myts =& MyTextsanitizer::getInstance() ; 84 84 … … 97 97 // query 98 98 $sql = "SELECT * FROM ".$blog_info['mb_table_prefix']."posts WHERE ID=$post_id"; 99 $post_row = $ db->fetchArray( $db->query( $sql ) ) ;99 $post_row = $xoopsDB->fetchArray( $xoopsDB->query( $sql ) ) ; 100 100 if( empty( $post_row ) ) return false ; 101 101 if ($post_row['comment_status'] == 'open') … … 176 176 function validate_id( $link_id ) 177 177 { 178 global $xoopsDB; 178 179 global $forum_id; 179 180 $post_id = intval( $link_id ) ; … … 181 182 $xpress_prefix = preg_replace('/wordpress/','wp',$mydirname); 182 183 $blog_info = $this->get_comment_blog_info($forum_id); 183 $db =& Database::getInstance() ; 184 185 list( $count ) = $db->fetchRow( $db->query( "SELECT COUNT(*) FROM ".$blog_info['mb_table_prefix'] ."posts WHERE ID=$post_id AND comment_status ='open'" ) ) ; 184 185 list( $count ) = $xoopsDB->fetchRow( $xoopsDB->query( "SELECT COUNT(*) FROM ".$blog_info['mb_table_prefix'] ."posts WHERE ID=$post_id AND comment_status ='open'" ) ) ; 186 186 187 187 if( $count <= 0 ) return false ; … … 206 206 function processCommentNotifications( $mode , $link_id , $forum_id , $topic_id , $post_id ) 207 207 { 208 global $xoopsDB; 208 209 $blog_info = $this->get_comment_blog_info($forum_id); 209 210 $wp_full_prefix = $blog_info['mb_table_prefix']; 210 211 211 $db =& Database::getInstance() ;212 212 $myts =& MyTextsanitizer::getInstance() ; 213 213 … … 225 225 $table_term_taxonomy = $wp_full_prefix."term_taxonomy"; 226 226 $table_terms = $wp_full_prefix."terms"; 227 $table_categories = $ db->prefix($xpress_prefix."_categories");228 $table_post2cat = $ db->prefix($xpress_prefix."_post2cat");227 $table_categories = $xoopsDB->prefix($xpress_prefix."_categories"); 228 $table_post2cat = $xoopsDB->prefix($xpress_prefix."_post2cat"); 229 229 $wp_post = $wp_full_prefix."posts"; 230 230 $wp_options = $wp_full_prefix."options"; 231 $wp_users = $ db->prefix($xpress_prefix."_users");231 $wp_users = $xoopsDB->prefix($xpress_prefix."_users"); 232 232 233 233 $sql = "SELECT option_value FROM $wp_options WHERE option_name ='blogname'"; 234 $blog_row = $ db->fetchArray( $db->query( $sql ) ) ;234 $blog_row = $xoopsDB->fetchArray( $xoopsDB->query( $sql ) ) ; 235 235 if( empty( $blog_row ) ) return false; 236 236 $blog_name = $blog_row['option_value']; … … 239 239 // query 240 240 $sql = "SELECT * FROM ".$wp_post." WHERE ID=$link_id "; 241 $post_row = $ db->fetchArray( $db->query( $sql ) ) ;241 $post_row = $xoopsDB->fetchArray( $xoopsDB->query( $sql ) ) ; 242 242 if( empty( $post_row ) ) return false; 243 243 $post_title = $post_row['post_title']; … … 245 245 246 246 $sql = "SELECT display_name FROM $wp_users WHERE ID ='$post_author'"; 247 $blog_row = $ db->fetchArray( $db->query( $sql ) ) ;247 $blog_row = $xoopsDB->fetchArray( $xoopsDB->query( $sql ) ) ; 248 248 if( empty( $blog_row ) ) return false; 249 249 $user_name = $blog_row['display_name']; … … 263 263 $notification_handler->triggerEvent( 'post' , $link_id , 'comment' , $comment_tags , false , $not_modid ) ; 264 264 265 $post_row = $ db->fetchArray( $db->query( "SELECT * FROM ".$db->prefix($this->d3forum_dirname."_posts")." WHERE post_id=$post_id" ) ) ;265 $post_row = $xoopsDB->fetchArray( $xoopsDB->query( "SELECT * FROM ".$xoopsDB->prefix($this->d3forum_dirname."_posts")." WHERE post_id=$post_id" ) ) ; 266 266 if( !empty( $post_row ) ){ 267 267 if ( $post_row['approval'] ==0 ){ … … 279 279 $sql2 .= "WHERE ($table_term_relationships.object_id =" . $link_id.") AND ($table_term_taxonomy.taxonomy='category')"; 280 280 } 281 $res2 = $ db->query($sql2);282 while($row2 = $ db->fetchArray($res2)){281 $res2 = $xoopsDB->query($sql2); 282 while($row2 = $xoopsDB->fetchArray($res2)){ 283 283 $cat_id = $row2['cat_ID']; 284 284 $cat_name = $row2['cat_name']; … … 291 291 292 292 function sync_to_wp_comment( $mode , $link_id , $forum_id , $topic_id , $post_id = 0 ){ 293 294 global $xoopsDB; 293 295 294 296 $blog_info = $this->get_comment_blog_info($forum_id); … … 302 304 $d3f_prefix = $d3f_forum_dir; 303 305 $myts =& MyTextSanitizer::getInstance(); 304 $xoopsDB =& Database::getInstance();305 306 306 307 $wp_comments = $wp_full_prefix . 'comments'; … … 441 442 } 442 443 function get_wp_comment_ID($d3forum_post_ID){ 444 global $xoopsDB; 445 443 446 $xp_prefix = $wpdirname = basename( dirname( dirname( __FILE__ ) ) ) ; 444 447 $xp_prefix = preg_replace('/wordpress/','wp',$xp_prefix); 445 448 446 $xoopsDB =& Database::getInstance();447 449 $wp_d3forum_link = $xoopsDB->prefix($xp_prefix . '_d3forum_link'); 448 450 … … 458 460 459 461 function get_comment_blog_info($d3forum_forum_id){ 460 $xoopsDB =& Database::getInstance();462 global $xoopsDB; 461 463 $xp_prefix = $wpdirname = basename( dirname( dirname( __FILE__ ) ) ) ; 462 464 $xp_prefix = preg_replace('/wordpress/','wp',$xp_prefix); -
branches/Ver3.0/xpressme_integration_kit/include/data.inc.php
r583 r749 250 250 if( ! function_exists( 'get_blog_option' ) ) { 251 251 function get_blog_option($option_table,$option_name){ 252 $xoopsDB =& Database::getInstance();252 global $xoopsDB; 253 253 254 254 $sql = "SELECT option_value FROM $option_table WHERE option_name = '" . $option_name . "'"; -
branches/Ver3.0/xpressme_integration_kit/include/oninstall.php
r744 r749 38 38 } 39 39 40 $db =& Database::getInstance() ;41 40 $mid = $module->getVar('mid') ; 42 41 -
branches/Ver3.0/xpressme_integration_kit/include/onuninstall.php
r583 r749 9 9 function xpress_onuninstall_base( $module , $mydirname ) 10 10 { 11 global $xoopsDB; 11 12 // transations on module uninstall 12 13 … … 22 23 } 23 24 24 $db =& Database::getInstance() ;25 25 $mid = $module->getVar('mid') ; 26 26 27 27 $xp_prefix = preg_replace('/wordpress/','wp',$mydirname); 28 28 29 $xoops_prefix = $ db->prefix();29 $xoops_prefix = $xoopsDB->prefix(); 30 30 31 31 if (empty($xoops_prefix) || empty($xp_prefix)) { -
branches/Ver3.0/xpressme_integration_kit/include/onupdate.php
r590 r749 21 21 } 22 22 23 $db =& Database::getInstance() ;24 23 $mid = $module->getVar('mid') ; 25 24 … … 80 79 if( ! function_exists( 'xpress_put_siteurl' ) ) : 81 80 function xpress_put_siteurl($mydirname,$url){ 82 global $xoopsModule ;81 global $xoopsModule,$xoopsDB; 83 82 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 84 $xoopsDB =& Database::getInstance();85 83 $db_xpress_option = $xoopsDB->prefix($wp_prefix . '_options'); 86 84 … … 92 90 if( ! function_exists( 'xpress_put_home' ) ) : 93 91 function xpress_put_home($mydirname,$url){ 94 global $xoopsModule ;92 global $xoopsModule,$xoopsDB; 95 93 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 96 $xoopsDB =& Database::getInstance();97 94 $db_xpress_option = $xoopsDB->prefix($wp_prefix . '_options'); 98 95 … … 104 101 if( ! function_exists( 'get_xpress_option' ) ) { 105 102 function get_xpress_option($mydirname,$option_name){ 106 global $xoopsModule ;103 global $xoopsModule,$xoopsDB; 107 104 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 108 $xoopsDB =& Database::getInstance();109 105 $option_table = $xoopsDB->prefix($wp_prefix . '_options'); 110 106 … … 135 131 if( ! function_exists( 'get_db_version' ) ) : 136 132 function get_db_version($mydirname){ 137 global $xoopsModule ;133 global $xoopsModule,$xoopsDB; 138 134 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 139 $xoopsDB =& Database::getInstance();140 135 $db_xpress_option = $xoopsDB->prefix($wp_prefix . '_options'); 141 136 … … 180 175 function xpress_table_make($module, $mydirname) 181 176 { 182 $db =& Database::getInstance();177 global $xoopsDB; 183 178 $mid = $module->getVar('mid') ; 184 179 … … 195 190 KEY post_id (post_id) 196 191 ) TYPE=MyISAM"; 197 $ db->queryF( $queries ) ;192 $xoopsDB->queryF( $queries ) ; 198 193 $msgs[] = "$views_table table of XPressME was made."; 199 194 } else { 200 195 if (!is_found_table_column($views_table,'blog_id')){ 201 196 $queries ="ALTER TABLE $views_table ADD blog_id bigint(20) FIRST"; 202 $ db->queryF( $queries ) ;197 $xoopsDB->queryF( $queries ) ; 203 198 $msgs[] = "$views_table ADD blog_id ."; 204 199 } … … 206 201 // The table is repaired. 207 202 $non_blogid_sql ="SELECT * FROM $views_table WHERE blog_id IS NULL OR blog_id < 1"; 208 $non_blogid_res = $ db->query($non_blogid_sql, 0, 0);209 while($row = $ db->fetchArray($non_blogid_res)){203 $non_blogid_res = $xoopsDB->query($non_blogid_sql, 0, 0); 204 while($row = $xoopsDB->fetchArray($non_blogid_res)){ 210 205 $total_view = $row['post_views']; 211 206 $post_id = $row['post_id']; 212 207 $new_blogid_sql ="SELECT SUM(post_views) as post_views_sum FROM $views_table WHERE post_id = $post_id AND blog_id = 1 GROUP BY post_id"; 213 $new_blogid_res = $ db->query($new_blogid_sql, 0, 0);214 if ($ db->getRowsNum($new_blogid_res) > 0){215 $new_row = $ db->fetchArray($new_blogid_res);208 $new_blogid_res = $xoopsDB->query($new_blogid_sql, 0, 0); 209 if ($xoopsDB->getRowsNum($new_blogid_res) > 0){ 210 $new_row = $xoopsDB->fetchArray($new_blogid_res); 216 211 $total_view = $total_view + $new_row['post_views_sum']; 217 212 $del_sql = "DELETE FROM $views_table WHERE post_id = $post_id AND blog_id = 1"; 218 $ db->queryF( $del_sql ) ;213 $xoopsDB->queryF( $del_sql ) ; 219 214 } 220 215 $update_sql = "UPDATE $views_table SET post_views = $total_view , blog_id = 1 WHERE post_id = $post_id AND (blog_id IS NULL OR blog_id < 1)"; 221 $ db->queryF( $update_sql ) ;216 $xoopsDB->queryF( $update_sql ) ; 222 217 } 223 218 } … … 233 228 KEY post_id (post_id) 234 229 )TYPE=MyISAM"; 235 $ db->queryF( $queries ) ;230 $xoopsDB->queryF( $queries ) ; 236 231 $msgs[] = "$d3forum_link table of XPressME was made."; 237 232 } else { 238 233 if (!is_found_table_column($d3forum_link,'forum_id')){ 239 234 $queries ="ALTER TABLE $d3forum_link ADD forum_id bigint(20) unsigned NOT NULL default '0' AFTER wp_post_ID"; 240 $ db->queryF( $queries ) ;235 $xoopsDB->queryF( $queries ) ; 241 236 $msgs[] = "$d3forum_link ADD forum_id ."; 242 237 // The table is repaired. 243 238 // $update_sql = "UPDATE $d3forum_link SET forum_id = 1 WHERE(forum_id IS NULL OR forum_id < 1)"; 244 // $ db->queryF( $update_sql ) ;239 // $xoopsDB->queryF( $update_sql ) ; 245 240 } 246 241 if (!is_found_table_column($d3forum_link,'blog_id')){ 247 242 $queries ="ALTER TABLE $d3forum_link ADD blog_id bigint(20) unsigned NOT NULL default '0' AFTER forum_id"; 248 $ db->queryF( $queries ) ;243 $xoopsDB->queryF( $queries ) ; 249 244 $msgs[] = "$d3forum_link ADD blog_id ."; 250 245 // The table is repaired. 251 246 $update_sql = "UPDATE $d3forum_link SET blog_id = 1 WHERE(blog_id IS NULL OR blog_id < 1)"; 252 $ db->queryF( $update_sql ) ;247 $xoopsDB->queryF( $update_sql ) ; 253 248 } 254 249 } … … 266 261 KEY groupid (groupid) 267 262 )TYPE=MyISAM"; 268 $ db->queryF( $queries ) ;263 $xoopsDB->queryF( $queries ) ; 269 264 $sql = "INSERT INTO $group_role (groupid, role) VALUES (1, 'administrator')"; 270 $ db->queryF( $sql ) ;265 $xoopsDB->queryF( $sql ) ; 271 266 $msgs[] = "$group_role table of XPressME was made."; 272 267 } else { 273 268 if (!is_found_table_column($group_role,'blog_id')){ 274 269 $queries ="ALTER TABLE $group_role ADD blog_id bigint(20) AFTER groupid"; 275 $ db->queryF( $queries ) ;270 $xoopsDB->queryF( $queries ) ; 276 271 $msgs[] = "$group_role ADD blog_id ."; 277 272 } 278 273 // The table is repaired. 279 274 $update_sql = "UPDATE $group_role SET blog_id = 1 WHERE(blog_id IS NULL OR blog_id < 1)"; 280 $ db->queryF( $update_sql ) ;275 $xoopsDB->queryF( $update_sql ) ; 281 276 } 282 277 … … 295 290 KEY notify_reserve_id (notify_reserve_id) 296 291 )TYPE=MyISAM"; 297 $ db->queryF( $queries ) ;292 $xoopsDB->queryF( $queries ) ; 298 293 $msgs[] = "$notify_reserve table of XPressME was made."; 299 294 } … … 304 299 if( ! function_exists( 'enhanced_table_check' ) ) : 305 300 function enhanced_table_check($mydirname,$table_name){ 306 global $xoopsModule ;301 global $xoopsModule,$xoopsDB; 307 302 308 $xoopsDB =& Database::getInstance();309 303 $xpress_prefix = $xoopsDB->prefix(preg_replace('/wordpress/','wp',$mydirname) . '_'); 310 304 $db_enhanced = $xpress_prefix . $table_name; … … 325 319 if( ! function_exists( 'is_found_table_column' ) ) : 326 320 function is_found_table_column($table,$column){ 327 global $xoopsModule; 328 $xoopsDB =& Database::getInstance(); 321 global $xoopsModule,$xoopsDB; 329 322 330 323 $sql = "DESCRIBE $table $column"; -
branches/Ver3.0/xpressme_integration_kit/include/search.php
r689 r749 107 107 if( ! function_exists( 'get_blog_option' ) ) { 108 108 function get_blog_option($option_table,$option_name){ 109 $xoopsDB =& Database::getInstance();109 global $xoopsDB; 110 110 111 111 $sql = "SELECT option_value FROM $option_table WHERE option_name = '" . $option_name . "'"; -
branches/Ver3.0/xpressme_integration_kit/include/sitemap.plugin.php
r583 r749 62 62 if(!function_exists('xpress_get_categoires_map')){ 63 63 function xpress_get_categoires_map($blogs ,$disp_sub){ 64 global $sitemap_configs; 65 66 $xoopsDB =& Database::getInstance(); 64 global $sitemap_configs,$xoopsDB; 67 65 68 66 $sitemap = array(); … … 150 148 if( ! function_exists( 'get_blog_option' ) ) { 151 149 function get_blog_option($option_table,$option_name){ 152 $xoopsDB =& Database::getInstance();150 global $xoopsDB; 153 151 154 152 $sql = "SELECT option_value FROM $option_table WHERE option_name = '" . $option_name . "'"; -
branches/Ver3.0/xpressme_integration_kit/include/wp_check.php
r744 r749 1 1 <?php 2 2 function is_wpdb_installed(){ 3 global $xoopsDB; 3 4 $mydirname = basename(dirname( dirname( __FILE__ ) )) ; 4 $prefix_mod = XOOPS_DB_PREFIX .'_' . preg_replace('/wordpress/','wp',$mydirname) . '_';5 $ xoopsDB =& Database::getInstance();5 6 $prefix_mod = $xoopsDB->prefix(preg_replace('/wordpress/','wp',$mydirname) . '_'); 6 7 $sql = "SHOW TABLES LIKE '$prefix_mod%'"; 7 8 if ($result = $xoopsDB->queryf($sql)){ -
branches/Ver3.0/xpressme_integration_kit/include/xpress_block_render.php
r719 r749 46 46 function get_block_id($mydirname,$func_file,$options) 47 47 { 48 global $xoopsDB; 48 49 $options_string = ''; 49 50 $mid = get_block_mid($mydirname); … … 52 53 $options_string .= $val; 53 54 } 54 $xoopsDB =& Database::getInstance();55 55 $block_tbl = $xoopsDB->prefix('newblocks'); 56 56 $module_dir = XOOPS_ROOT_PATH . '/modules/' . $mydirname; … … 67 67 function get_block_mid($mydirname) 68 68 { 69 $xoopsDB =& Database::getInstance();69 global $xoopsDB; 70 70 $modules_tbl = $xoopsDB->prefix('modules'); 71 71 … … 81 81 function get_xpress_theme_name($mydirname) 82 82 { 83 global $wpdb ;83 global $wpdb,$xoopsDB; 84 84 85 85 if (is_null($wpdb)){ 86 $xoopsDB =& Database::getInstance();87 86 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 88 87 … … 305 304 306 305 function get_xpress_mod_config($mydirname,$conf_name=''){ 306 global $xoopsDB; 307 307 $module_handler =& xoops_gethandler('module'); 308 308 $xoopsModule =& $module_handler->getByDirname($mydirname); 309 309 $mid = $xoopsModule->getVar('mid'); 310 $xoopsDB =& Database::getInstance();311 310 $db_config = $xoopsDB->prefix('config'); 312 311
Note: See TracChangeset
for help on using the changeset viewer.