XPressME Integration Kit

Trac

Changeset 182


Ignore:
Timestamp:
Apr 20, 2009, 5:33:30 PM (15 years ago)
Author:
toemon
Message:

#109 Ver1.XからのアップデートでサイトURLやブログURLが変わるバグ修正
アップデート時にはURLのセットを行っていませんでしたが、アップデート時に正しいURLをセットするようにしました。

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/oninstall.php

    r156 r182  
    5454         
    5555        $option_desc = __('WordPress web address'); 
    56         $wpdb->query("INSERT INTO $wpdb->options (option_id, blog_id, option_name,option_value, autoload) VALUES ('1', '0', 'siteurl','$site_url', 'yes')");     
    57         $wpdb->query("INSERT INTO $wpdb->options (option_id, blog_id, option_name,option_value, autoload) VALUES ('1', '0', 'home','$site_url', 'yes')"); 
     56        $wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'siteurl','$site_url', 'yes')");     
     57        $wpdb->query("INSERT INTO $wpdb->options (blog_id, option_name,option_value, autoload) VALUES ('0', 'home','$site_url', 'yes')"); 
    5858 
    5959        populate_options(); 
  • trunk/wp-content/plugins/xpressme/include/xpress_common_functions.php

    r158 r182  
    294294        return $query; 
    295295} 
     296 
     297function safe_site_url_filter($site_url){ 
     298        if ($site_url != get_xpress_url()) $site_url = get_xpress_url(); 
     299        return $site_url; 
     300} 
     301 
    296302?> 
  • trunk/wp-content/plugins/xpressme/xpressme.php

    r155 r182  
    2828} 
    2929add_action("wp_meta" , "wp_meta_add_xpress_menu");                      // add xpress menu  in wp_meta 
     30         
     31//Site URL check 
     32add_filter('option_home',                       "safe_site_url_filter"); 
     33add_filter('option_siteurl',            "safe_site_url_filter"); 
     34         
    3035 
    3136//XOOPS Bloack Cache Refresh 
     
    7176 
    7277 
    73  
    7478//The trackback and the pingback are excluded from the count of the comment.  
    7579add_filter('get_comments_number', 'xpress_comment_count', 0); 
Note: See TracChangeset for help on using the changeset viewer.