Changeset 454
- Timestamp:
- Nov 24, 2009, 3:49:32 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/include/add_xpress_process.php
r430 r454 5 5 if (is_object($wptouch_plugin)) return $wptouch_plugin->applemobile; 6 6 return false; 7 } 8 9 function safe_site_url(){ 10 global $xoops_config; 11 12 if (is_xpress_index_page_call()){ 13 $siteurl = get_option('siteurl'); 14 $home = get_option('home'); 15 $module_url = $xoops_config->module_url; 16 $guess_url = wp_guess_url(); 17 $guess_url = preg_replace('/\/$/','',$guess_url); 18 19 if($siteurl != $module_url) { 20 if (!@fclose(@fopen($siteurl . '/xoops_version.php', "r"))){ 21 update_option('siteurl' , $module_url); 22 } 23 } 24 25 if($guess_url != $home) { 26 if (!@fclose(@fopen($home . '/xoops_version.php', "r"))){ 27 update_option('home' , $guess_url); 28 } 29 } 30 } 7 31 } 8 32 … … 16 40 unset($offset); 17 41 require_once(ABSPATH.'wp-settings.php'); 42 43 safe_site_url(); 44 18 45 if (!is_object($xoopsUser)){ // before login auth cookie clear 19 46 wp_logout(); -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/functions_for_wp_old.php
r378 r454 190 190 191 191 endif; // Under WP2.5 192 193 // Under WP2.7 194 if (version_compare($xoops_config->wp_version,'2.6', '<')) : 195 /** 196 * Guess the URL for the site. 197 * 198 * Will remove wp-admin links to retrieve only return URLs not in the wp-admin 199 * directory. 200 * 201 * @since 2.6.0 202 * 203 * @return string 204 */ 205 function wp_guess_url() { 206 if ( defined('WP_SITEURL') && '' != WP_SITEURL ) { 207 $url = WP_SITEURL; 208 } else { 209 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 210 $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 211 } 212 return $url; 213 } 214 endif; // Under WP2.6 192 215 193 216 // Under WP2.7 -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php
r452 r454 357 357 } 358 358 359 function safe_site_url_filter($site_url){360 global $xoops_config;361 if (!$xoops_config->is_wpmu){362 if ($site_url != get_xpress_url()) $site_url = get_xpress_url();363 }364 return $site_url;365 }366 367 359 function get_block_file_path($mydirname,$file_name) 368 360 { -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r453 r454 71 71 } 72 72 add_action("wp_meta" , "wp_meta_add_xpress_menu"); // add xpress menu in wp_meta 73 74 //Site URL check75 add_filter('option_home', "safe_site_url_filter");76 add_filter('option_siteurl', "safe_site_url_filter");77 78 73 79 74 //XOOPS Bloack Cache Refresh
Note: See TracChangeset
for help on using the changeset viewer.