XPressME Integration Kit

Trac


Ignore:
Timestamp:
Jun 15, 2016, 9:52:13 AM (8 years ago)
Author:
toemon
Message:

PHP7 対応 Fix #431
thx nao-pon

Location:
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include
Files:
3 edited

Legend:

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

    r144 r860  
    3434                $xoops_db->query( "UPDATE ".get_xoops_prefix() . $dir_name."_forums SET forum_external_link_format='".$external_link_format."' WHERE forum_id= $forum_id" ) ; 
    3535                 
    36                 $d3comment =& new xpressD3commentContent( $dir_name , $xpress_dirname ) ; 
     36                $d3comment = new xpressD3commentContent( $dir_name , $xpress_dirname ) ; 
    3737 
    3838                $post_title = get_the_title(); 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php

    r616 r860  
    486486                                $wp_res =       $xoops_db->query($wp_sql); 
    487487                                if ($wp_res === false) die( '...Err. INSERT' . $wp_comments . '(' . $wp_sql . ')'); 
    488                                 $comment_ID = mysql_insert_id(); 
     488                                $comment_ID = $xoops_db->insert_id; 
    489489                                $wp_sql  = "UPDATE $wp_posts SET  comment_count = comment_count +1 WHERE ID = $comment_post_ID"; 
    490490                                $xoops_db->query($wp_sql); 
     
    696696                        $sql = "INSERT INTO ".$d3f_posts." SET $set4sql,pid=$reply_pid,topic_id=$topic_id,post_time=$post_time,poster_ip=$poster_ip"; 
    697697                        $xoops_db->query($sql) ; 
    698                         $post_id = mysql_insert_id(); 
     698                        $post_id = $xoops_db->insert_id; 
    699699                        wp_d3forum_sync_topic( $d3forum_dirname , $topic_id ) ; 
    700700                         
     
    729729                        $sql = "INSERT INTO ".$d3f_topic." SET forum_id=$forum_id,topic_invisible=$topic_invisible,topic_external_link_id='".addslashes($topic_external_link_id)."'"; 
    730730                        $xoops_db->query($sql) ; 
    731                         $topic_id = mysql_insert_id(); 
     731                        $topic_id = $xoops_db->insert_id; 
    732732                        // create post in the topic 
    733733                        $sql = "INSERT INTO ".$d3f_posts." SET $set4sql,topic_id=$topic_id,post_time=$post_time,poster_ip=$poster_ip"; 
    734734                        $xoops_db->query($sql) ; 
    735                         $post_id = mysql_insert_id(); 
     735                        $post_id = $xoops_db->insert_id; 
    736736                        wp_d3forum_sync_topic( $d3forum_dirname , $topic_id , true , true ) ; 
    737737                         
     
    10541054        } 
    10551055 
    1056         $xoops_db->query( "INSERT INTO ".$d3forum_prefix."post_histories SET post_id=$post_id, history_time=UNIX_TIMESTAMP(), data='".mysql_real_escape_string( serialize( $data ) )."'" ) ; 
     1056        $xoops_db->query( $xoops_db->prepare( "INSERT INTO ".$d3forum_prefix."post_histories SET post_id=$post_id, history_time=UNIX_TIMESTAMP(), data=%s", serialize( $data ) ) ) ; 
    10571057} 
    10581058 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/user_sync_xoops.php

    r665 r860  
    267267                                $wu_sql .=              " , '$user_regist_time', $user_status, '$user_display_name')"; 
    268268                                $xoops_db->query($wu_sql); 
    269                                 $wp_user_id = mysql_insert_id(); 
     269                                $wp_user_id = $xoops_db->insert_id; 
    270270                        } else {         // WP User ID has not been used yet.  
    271271                                $wu_sql  =      "INSERT INTO $db_xpress_users "; 
Note: See TracChangeset for help on using the changeset viewer.