Changeset 860 for trunk/xpressme_integration_kit/class
- Timestamp:
- Jun 15, 2016, 9:52:13 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/class/xpressD3commentContent.class.php
r835 r860 9 9 { 10 10 // include_once dirname(dirname(__FILE__)).'/include/common_functions.php' ; 11 global $forum_id; 12 11 if ( empty( $this->forum_id ) ) { 12 global $forum_id; 13 if ( !empty( $forum_id ) ) { 14 $this->forum_id = $forum_id; 15 } else { 16 return parent::fetchSummary( $external_link_id ); 17 } 18 } 19 13 20 $db =& XoopsDatabaseFactory::getDatabaseConnection() ; 14 $myts =& MyTextsanitizer::getInstance() ;21 (method_exists('MyTextsanitizer', 'sGetInstance') && ($myts =& MyTextsanitizer::sGetInstance())) || ($myts =& MyTextsanitizer::getInstance()) ; 15 22 16 23 $module_handler =& xoops_gethandler( 'module' ) ; … … 24 31 25 32 $xpress_prefix = preg_replace('/wordpress/','wp',$mydirname); 26 $blog_info = $this->get_comment_blog_info($ forum_id);33 $blog_info = $this->get_comment_blog_info($this->forum_id); 27 34 // query 28 35 $post_row = $db->fetchArray( $db->query( "SELECT * FROM ".$blog_info['mb_table_prefix']."posts WHERE ID=$post_id" ) ) ; … … 68 75 function canAddComment($external_link_id) 69 76 { 70 global $forum_id;71 77 global $post; 78 79 if ( empty( $this->forum_id ) ) { 80 global $forum_id; 81 if ( !empty( $forum_id ) ) { 82 $this->forum_id = $forum_id; 83 } else { 84 return false; 85 } 86 } 72 87 73 88 if (is_object($post)){ // in wordpress … … 92 107 if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ; 93 108 94 $blog_info = $this->get_comment_blog_info($ forum_id);109 $blog_info = $this->get_comment_blog_info($this->forum_id); 95 110 $xpress_prefix = preg_replace('/wordpress/','wp',$mydirname); 96 111 … … 176 191 function validate_id( $link_id ) 177 192 { 178 global $forum_id; 193 if ( empty( $this->forum_id ) ) { 194 global $forum_id; 195 if ( !empty( $forum_id ) ) { 196 $this->forum_id = $forum_id; 197 } else { 198 return false; 199 } 200 } 179 201 $post_id = intval( $link_id ) ; 180 202 $mydirname = $this->mydirname ; 181 203 $xpress_prefix = preg_replace('/wordpress/','wp',$mydirname); 182 $blog_info = $this->get_comment_blog_info($ forum_id);204 $blog_info = $this->get_comment_blog_info($this->forum_id); 183 205 $db =& XoopsDatabaseFactory::getDatabaseConnection() ; 184 206
Note: See TracChangeset
for help on using the changeset viewer.