XPressME Integration Kit

Trac

Changeset 257


Ignore:
Timestamp:
Jun 5, 2009, 5:43:15 PM (15 years ago)
Author:
toemon
Message:

#139 XOOPS UID と WordPress? UID 相違による不具合の修正

Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/Ver2.0/xpressme_integration_kit/class/xpressD3commentContent.class.php

    r144 r257  
    198198                        $mydirname = $this->mydirname ; 
    199199                        if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ; 
    200                                          
     200                         
    201201                        $xpress_prefix = $mydirname; 
    202202                        if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp'; 
     
    216216                        $blog_name = $blog_row['option_value']; 
    217217                         
    218                                                  
     218                         
    219219                        // query 
    220220                        $sql = "SELECT * FROM ".$wp_post." WHERE ID=$link_id "; 
     
    329329                                $comment_content = "'" . addSlashes($d3f_row['post_text']) . "'"; 
    330330                                $comment_approved = "'" . $d3f_row['approval'] . "'"; 
    331                                 $user_ID = $d3f_row['uid']; 
     331                                require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); 
     332                                $user_ID = xoops_uid_to_wp_uid($d3f_row['uid']); 
    332333                                $comment_date_gmt = "'" . gmdate('Y-m-d H:i:s' , $d3f_row['post_time']) . "'"; 
    333334                                $comment_type = ''; 
  • branches/Ver2.0/xpressme_integration_kit/include/data.inc.php

    r37 r257  
    3636                $wp_prefix = $mydirname; 
    3737        } 
    38          
     38        require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); 
    3939        include(XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/wp-includes/version.php'); 
    4040 
     
    9292                $ret[$i]['cat_name'] = $row2['cat_name']; 
    9393 
    94                 $ret[$i]['uid'] = $row1['post_author']; 
     94                $ret[$i]['uid'] = wp_uid_to_xoops_uid($row1['post_author']); 
    9595                $ret[$i]['replies'] = $row1['comment_count']; 
    9696 
     
    180180} 
    181181 
     182 
    182183// --- function end --- 
    183184 
  • branches/Ver2.0/xpressme_integration_kit/include/search.php

    r30 r257  
    1717{ 
    1818        global $xoopsDB, $myts; 
     19         
     20        require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); 
    1921 
    2022        $myts =& MyTextSanitizer::getInstance(); 
     
    3234        } 
    3335        if ($userid) { 
    34                 $userid = intval($userid); 
     36                $userid = xoops_uid_to_wp_uid(intval($userid)); 
    3537                $where  .= " AND (post_author=".$userid.")"; 
    3638        } 
     
    7072                $ss   = substr($date_str,17,2); 
    7173                $ret[$i]['time'] = mktime( $hh,$nn,$ss,$mm,$dd,$yyyy); 
    72                 $ret[$i]['uid'] = $myrow['post_author']; 
     74                $ret[$i]['uid'] = wp_uid_to_xoops_uid($myrow['post_author']); 
    7375//              $ret[$i]['page'] = $myts->htmlSpecialChars($myrow['post_title']); 
    7476 
  • branches/Ver2.0/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php

    r144 r257  
    493493        $post_time = strtotime($row->comment_date);             // or   $row2['comment_date_gmt'] 
    494494        $modified_time = strtotime($row->comment_date); // or   $row2['comment_date_gmt'] 
    495         $uid = $row->user_id; 
     495        require_once (get_xpress_dir_path() . 'include/general_functions.php'); 
     496        $uid =  wp_uid_to_xoops_uid($row->user_id); 
    496497        $poster_ip = "'" . addslashes($row->comment_author_IP ). "'"; 
    497498        $modifier_ip = "'" . addslashes($row->comment_author_IP) . "'"; 
  • trunk/xpressme_integration_kit/class/xpressD3commentContent.class.php

    r144 r257  
    198198                        $mydirname = $this->mydirname ; 
    199199                        if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ; 
    200                                          
     200                         
    201201                        $xpress_prefix = $mydirname; 
    202202                        if ($xpress_prefix == 'wordpress') $xpress_prefix = 'wp'; 
     
    216216                        $blog_name = $blog_row['option_value']; 
    217217                         
    218                                                  
     218                         
    219219                        // query 
    220220                        $sql = "SELECT * FROM ".$wp_post." WHERE ID=$link_id "; 
     
    329329                                $comment_content = "'" . addSlashes($d3f_row['post_text']) . "'"; 
    330330                                $comment_approved = "'" . $d3f_row['approval'] . "'"; 
    331                                 $user_ID = $d3f_row['uid']; 
     331                                require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); 
     332                                $user_ID = xoops_uid_to_wp_uid($d3f_row['uid']); 
    332333                                $comment_date_gmt = "'" . gmdate('Y-m-d H:i:s' , $d3f_row['post_time']) . "'"; 
    333334                                $comment_type = ''; 
  • trunk/xpressme_integration_kit/include/data.inc.php

    r37 r257  
    3636                $wp_prefix = $mydirname; 
    3737        } 
    38          
     38        require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); 
    3939        include(XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/wp-includes/version.php'); 
    4040 
     
    9292                $ret[$i]['cat_name'] = $row2['cat_name']; 
    9393 
    94                 $ret[$i]['uid'] = $row1['post_author']; 
     94                $ret[$i]['uid'] = wp_uid_to_xoops_uid($row1['post_author']); 
    9595                $ret[$i]['replies'] = $row1['comment_count']; 
    9696 
     
    180180} 
    181181 
     182 
    182183// --- function end --- 
    183184 
  • trunk/xpressme_integration_kit/include/search.php

    r30 r257  
    1717{ 
    1818        global $xoopsDB, $myts; 
     19         
     20        require_once (XOOPS_ROOT_PATH . '/modules/'.$mydirname . '/include/general_functions.php'); 
    1921 
    2022        $myts =& MyTextSanitizer::getInstance(); 
     
    3234        } 
    3335        if ($userid) { 
    34                 $userid = intval($userid); 
     36                $userid = xoops_uid_to_wp_uid(intval($userid)); 
    3537                $where  .= " AND (post_author=".$userid.")"; 
    3638        } 
     
    7072                $ss   = substr($date_str,17,2); 
    7173                $ret[$i]['time'] = mktime( $hh,$nn,$ss,$mm,$dd,$yyyy); 
    72                 $ret[$i]['uid'] = $myrow['post_author']; 
     74                $ret[$i]['uid'] = wp_uid_to_xoops_uid($myrow['post_author']); 
    7375//              $ret[$i]['page'] = $myts->htmlSpecialChars($myrow['post_title']); 
    7476 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php

    r144 r257  
    493493        $post_time = strtotime($row->comment_date);             // or   $row2['comment_date_gmt'] 
    494494        $modified_time = strtotime($row->comment_date); // or   $row2['comment_date_gmt'] 
    495         $uid = $row->user_id; 
     495        require_once (get_xpress_dir_path() . 'include/general_functions.php'); 
     496        $uid =  wp_uid_to_xoops_uid($row->user_id); 
    496497        $poster_ip = "'" . addslashes($row->comment_author_IP ). "'"; 
    497498        $modifier_ip = "'" . addslashes($row->comment_author_IP) . "'"; 
Note: See TracChangeset for help on using the changeset viewer.