Changeset 583
- Timestamp:
- Apr 23, 2010, 10:49:33 AM (15 years ago)
- Location:
- trunk/xpressme_integration_kit
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/admin/index.php
r551 r583 36 36 $mydirname = basename(dirname(dirname(__FILE__))); 37 37 $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); 40 39 $db_prefix = $xoopsDB->prefix($wp_prefix_only); 41 40 … … 120 119 $mydirname = basename(dirname(dirname(__FILE__))); 121 120 $my_dirpath = dirname(dirname(__FILE__)); 122 $prefix = $mydirname; 123 if ($prefix == 'wordpress') $prefix ='wp'; 121 $prefix = preg_replace('/wordpress/','wp',$mydirname); 124 122 $wp_prefix = $xoopsDB->prefix($prefix); 125 123 … … 540 538 541 539 $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); 545 541 546 542 $prefix = $xoopsDB->prefix($xp_prefix . '_'); … … 614 610 $xoopsDB =& Database::getInstance(); 615 611 $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); 619 613 $prefix = $xoopsDB->prefix($xp_prefix . '_'); 620 614 $group_role_tables = $prefix.'group_role'; -
trunk/xpressme_integration_kit/blocks/block_common.php
r513 r583 23 23 $mydirpath = dirname(dirname(__FILE__)); 24 24 $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; 25 if ($mydirname == 'wordpress'){ 26 $wp_prefix = 'wp_'; 27 } else { 28 $wp_prefix = $mydirname . '_'; 29 } 25 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname) . '_'; 30 26 $xoopsDB =& Database::getInstance(); 31 27 $myts =& MyTextSanitizer::getInstance(); -
trunk/xpressme_integration_kit/blocks/widget_block.php
r495 r583 23 23 24 24 $selected = explode(',' , $widget_select); 25 26 if ($mydirname == 'wordpress'){ 27 $wp_prefix = 'wp_'; 28 } else { 29 $wp_prefix = $mydirname . '_'; 30 } 25 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname) . '_'; 31 26 $xoopsDB =& Database::getInstance(); 32 27 $myts =& MyTextSanitizer::getInstance(); -
trunk/xpressme_integration_kit/class/config_from_xoops.class.php
r551 r583 93 93 $this->xoops_upload_path = $this->xoops_root_path .'/uploads'; 94 94 $this->xoops_upload_url = $this->xoops_url . '/uploads'; 95 96 if ($this->module_name == 'wordpress') 97 $this->module_db_prefix = $this->xoops_db_prefix . '_wp_'; 98 else 99 $this->module_db_prefix = $this->xoops_db_prefix . '_' . $this->module_name . '_'; 95 $this->module_db_prefix = $this->xoops_db_prefix . '_' . preg_replace('/wordpress/','wp',$this->module_name) . '_'; 100 96 101 97 $this->set_module_version(); -
trunk/xpressme_integration_kit/class/xpressD3commentContent.class.php
r261 r583 22 22 if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ; 23 23 24 $xpress_prefix = $mydirname; 25 if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp'; 24 $xpress_prefix = preg_replace('/wordpress/','wp',$mydirname); 26 25 27 26 // query … … 74 73 if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ; 75 74 76 $xpress_prefix = $mydirname; 77 if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp'; 75 $xpress_prefix = preg_replace('/wordpress/','wp',$mydirname); 78 76 79 77 // query … … 160 158 $post_id = intval( $link_id ) ; 161 159 $mydirname = $this->mydirname ; 162 $xpress_prefix = $mydirname; 163 if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp'; 160 $xpress_prefix = preg_replace('/wordpress/','wp',$mydirname); 164 161 165 162 $db =& Database::getInstance() ; … … 199 196 if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ; 200 197 201 $xpress_prefix = $mydirname; 202 if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp'; 198 $xpress_prefix = preg_replace('/wordpress/','wp',$mydirname); 203 199 204 200 $table_term_relationships = $db->prefix($xpress_prefix."_term_relationships"); … … 273 269 274 270 $mydirname = $this->mydirname ; 275 $xpress_prefix = $mydirname; 276 if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp'; 271 $xpress_prefix = preg_replace('/wordpress/','wp',$mydirname); 277 272 $d3f_forum_dir = $this->d3forum_dirname; 278 273 … … 419 414 function get_wp_comment_ID($d3forum_post_ID){ 420 415 $xp_prefix = $wpdirname = basename( dirname( dirname( __FILE__ ) ) ) ; 421 if ($xp_prefix == 'wordpress'){ 422 $xp_prefix = 'wp'; 423 } 416 $xp_prefix = preg_replace('/wordpress/','wp',$xp_prefix); 424 417 425 418 $xoopsDB =& Database::getInstance(); -
trunk/xpressme_integration_kit/include/data.inc.php
r426 r583 31 31 global $xoopsDB; 32 32 33 if ($mydirname == 'wordpress'){ 34 $wp_prefix = 'wp'; 35 } else { 36 $wp_prefix = $mydirname; 37 } 33 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 38 34 require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); 39 35 include(XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/wp-includes/version.php'); … … 163 159 164 160 global $xoopsDB; 165 166 if ($mydirname == 'wordpress'){ 167 $wp_prefix = 'wp'; 168 } else { 169 $wp_prefix = $mydirname; 170 } 161 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 171 162 require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); 172 163 $prefix = $xoopsDB->prefix($wp_prefix); … … 208 199 209 200 global $xoopsDB; 210 211 if ($mydirname == 'wordpress'){ 212 $wp_prefix = 'wp'; 213 } else { 214 $wp_prefix = $mydirname; 215 } 201 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 216 202 217 203 require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); -
trunk/xpressme_integration_kit/include/general_functions.php
r526 r583 13 13 if (empty($mydirname)) 14 14 $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; 15 16 if ($mydirname == 'wordpress'){ 17 $wp_prefix = 'wp'; 18 } else { 19 $wp_prefix = $mydirname; 20 } 15 16 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 21 17 22 18 if (empty($xoops_db)) { // not load XPressME … … 56 52 $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ; 57 53 58 if ($mydirname == 'wordpress'){ 59 $wp_prefix = 'wp'; 60 } else { 61 $wp_prefix = $mydirname; 62 } 54 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 63 55 64 56 if (empty($xoops_db)) { // not load XPressME -
trunk/xpressme_integration_kit/include/oninstall.php
r534 r583 86 86 87 87 // create XPressME table 88 $xp_prefix = $mydirname; 89 if ($xp_prefix == 'wordpress'){ 90 $xp_prefix = 'wp'; 91 } 88 $xp_prefix = preg_replace('/wordpress/','wp',$mydirname); 92 89 $views_table = XOOPS_DB_PREFIX . '_' . $xp_prefix .'_views' ; 93 90 -
trunk/xpressme_integration_kit/include/onuninstall.php
r232 r583 25 25 $mid = $module->getVar('mid') ; 26 26 27 $xp_prefix = $mydirname; 28 if ($xp_prefix == 'wordpress'){ 29 $xp_prefix = 'wp'; 30 } 27 $xp_prefix = preg_replace('/wordpress/','wp',$mydirname); 31 28 32 29 $xoops_prefix = $db->prefix(); -
trunk/xpressme_integration_kit/include/onupdate.php
r534 r583 81 81 function xpress_put_siteurl($mydirname,$url){ 82 82 global $xoopsModule; 83 $wp_prefix = $mydirname; 84 if ($wp_prefix == 'wordpress'){ 85 $wp_prefix = 'wp'; 86 } 83 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 87 84 $xoopsDB =& Database::getInstance(); 88 85 $db_xpress_option = $xoopsDB->prefix($wp_prefix . '_options'); … … 96 93 function xpress_put_home($mydirname,$url){ 97 94 global $xoopsModule; 98 $wp_prefix = $mydirname; 99 if ($wp_prefix == 'wordpress'){ 100 $wp_prefix = 'wp'; 101 } 95 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 102 96 $xoopsDB =& Database::getInstance(); 103 97 $db_xpress_option = $xoopsDB->prefix($wp_prefix . '_options'); … … 111 105 function get_xpress_option($mydirname,$option_name){ 112 106 global $xoopsModule; 113 $wp_prefix = $mydirname; 114 if ($wp_prefix == 'wordpress'){ 115 $wp_prefix = 'wp'; 116 } 107 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 117 108 $xoopsDB =& Database::getInstance(); 118 109 $option_table = $xoopsDB->prefix($wp_prefix . '_options'); … … 145 136 function get_db_version($mydirname){ 146 137 global $xoopsModule; 147 $wp_prefix = $mydirname; 148 if ($wp_prefix == 'wordpress'){ 149 $wp_prefix = 'wp'; 150 } 138 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 151 139 $xoopsDB =& Database::getInstance(); 152 140 $db_xpress_option = $xoopsDB->prefix($wp_prefix . '_options'); … … 192 180 function xpress_table_make($module, $mydirname) 193 181 { 194 $xp_prefix = $mydirname;195 if ($xp_prefix == 'wordpress'){196 $xp_prefix = 'wp';197 }198 182 $db =& Database::getInstance() ; 199 183 $mid = $module->getVar('mid') ; 200 184 201 185 // XPressME orignal table update 202 $xp_prefix = $mydirname; 203 if ($xp_prefix == 'wordpress'){ 204 $xp_prefix = 'wp'; 205 } 186 $xp_prefix = preg_replace('/wordpress/','wp',$mydirname); 206 187 $msgs = array(); 207 188 … … 307 288 308 289 $xoopsDB =& Database::getInstance(); 309 if ($mydirname == 'wordpress'){ 310 $xpress_prefix= $xoopsDB->prefix('wp_'); 311 } else { 312 $xpress_prefix= $xoopsDB->prefix($mydirname . '_'); 313 } 290 $xpress_prefix = $xoopsDB->prefix(preg_replace('/wordpress/','wp',$mydirname) . '_'); 314 291 $db_enhanced = $xpress_prefix . $table_name; 315 292 -
trunk/xpressme_integration_kit/include/search.php
r496 r583 20 20 $myts =& MyTextSanitizer::getInstance(); 21 21 22 $xp_prefix = $mydirname; 23 if ($xp_prefix == 'wordpress'){ 24 $xp_prefix = 'wp'; 25 } 22 $xp_prefix = preg_replace('/wordpress/','wp',$mydirname); 26 23 if ($userid) { 27 24 $wp_uid = xoops_uid_to_wp_uid(intval($userid),$mydirname); -
trunk/xpressme_integration_kit/include/sitemap.plugin.php
r423 r583 30 30 $disp_sub =@$sitemap_configs["show_subcategoris"]; 31 31 32 $prefix = $mydirname; 33 if ($prefix == 'wordpress') $prefix ='wp'; 32 $prefix = preg_replace('/wordpress/','wp',$mydirname); 34 33 $prefix = $xoopsDB->prefix($prefix); 35 34 require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); -
trunk/xpressme_integration_kit/include/xpress_block_render.php
r573 r583 84 84 if (is_null($wpdb)){ 85 85 $xoopsDB =& Database::getInstance(); 86 $wp_prefix = $mydirname; 87 if ($wp_prefix == 'wordpress') $wp_prefix = 'wp'; 86 $wp_prefix = preg_replace('/wordpress/','wp',$mydirname); 88 87 89 88 $module_tbl = $xoopsDB->prefix($wp_prefix).'_options'; -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
r552 r583 38 38 { 39 39 $dir_name = get_xpress_dir_name(); 40 $prefix = $dir_name; 41 if ($prefix == 'wordpress') $prefix = 'wp'; 40 $prefix = preg_replace('/wordpress/','wp',$dir_name); 42 41 43 42 $prefix = $prefix . '_'; -
trunk/xpressme_integration_kit/xoops_version.php
r574 r583 88 88 //$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; 89 89 90 $db_prefix = $mydirname; 91 if ($mydirname == 'wordpress') { 92 $db_prefix = 'wp'; 93 } 90 $db_prefix = preg_replace('/wordpress/','wp',$mydirname); 94 91 95 92 /*
Note: See TracChangeset
for help on using the changeset viewer.