XPressME Integration Kit

Trac


Ignore:
Timestamp:
Aug 11, 2009, 4:31:35 PM (15 years ago)
Author:
toemon
Message:

WP2.1.3MEへの対応 fixed #199
但しWP2.1.3ME自体のバグ(MySQL4.1以上でEUC-JPを使用したときの文字化け)があるので注意

Location:
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php

    r350 r360  
    1616} 
    1717 
    18 function xpress_is_wp20() { 
     18function xpress_is_wp_version($operator='==',$comp_version){ 
    1919        global $xoops_config; 
    20          
    21         return $xoops_config->is_wp20; 
     20        return version_compare($xoops_config->wp_version, $comp_version, $operator); 
    2221} 
    2322 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php

    r286 r360  
    250250                        } 
    251251                } else { 
    252                         if(xpress_is_wp20()){ 
     252                        if(xpress_is_wp_version('<','2.1')){  // Maybe, I think that it is ver2.1 or less. 
    253253                                if (!empty($wp->matched_query) ){ 
    254254                                        if (strpos($wp->matched_query,'author_name') !== false ){ 
     
    303303        $query = preg_replace('/\s\s+/', ' ', $query); 
    304304        if (!empty($_COOKIE[$author_cookie])){ 
    305                 if(xpress_is_wp20()){ 
     305                if(xpress_is_wp_version('<','2.1')){ 
    306306                        $pattern = "WHERE.*AND\s?\(*post_author\s*="; 
    307307                        if ( preg_match ( "/".$pattern."/i", $query, $match ) ){ 
Note: See TracChangeset for help on using the changeset viewer.