Changeset 591 for trunk/xpressme_integration_kit/wp-content/plugins
- Timestamp:
- Apr 30, 2010, 10:15:18 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
r590 r591 293 293 } 294 294 295 function D3Forum_old_Link_clear($value = null){ 296 global $xpress_config,$xoops_db; 297 if ($this->is_use_d3forum){ 298 $d3forum_forum_tbl = get_xoops_prefix() . $this->d3forum_module_dir ."_forums"; 299 $d3forum_external_link_format = ''; 300 $d3f_forum_id = $this->d3forum_forum_id; 301 302 if ($value === 'none'){ 303 $xoops_db->query( "UPDATE ".$d3forum_forum_tbl ." SET forum_external_link_format='' WHERE forum_id= $d3f_forum_id" ) ; 304 } else { 305 $d3f_set = explode('|', $value); 306 if ($this->d3forum_module_dir !== $d3f_set[1] || $this->d3forum_forum_id !== $d3f_set[2]){ 307 $xoops_db->query( "UPDATE ".$d3forum_forum_tbl ." SET forum_external_link_format='' WHERE forum_id= $d3f_forum_id" ) ; 308 } 309 } 310 } 311 } 312 function D3Forum_link_set(){ 313 global $xoops_db; 314 315 if (empty($this->is_use_d3forum)) return; 316 $d3forum_forum_tbl = get_xoops_prefix() . $this->d3forum_module_dir ."_forums"; 317 $d3f_forum_id = $this->d3forum_forum_id; 318 $forum_external_link_format = addslashes($this->d3forum_external_link_format); 319 $xoops_db->query( "UPDATE ".$d3forum_forum_tbl ." SET forum_external_link_format='".$forum_external_link_format."' WHERE forum_id= $d3f_forum_id" ) ; 320 } 321 295 322 function ReadPostData($post_data = null) 296 323 { … … 310 337 // post d3forum 311 338 if ($indedx === 'd3forum') { 339 $this->D3Forum_old_Link_clear($value); 312 340 if ($value == 'none'){ 313 341 $this->is_use_d3forum = false; … … 321 349 $this->d3forum_forum_id = $d3f_set[2]; 322 350 $this->d3forum_external_link_format = get_xpress_dir_name() . '::xpressD3commentContent'; 351 $this->D3Forum_link_set(); 323 352 } 324 353 } else { //post other … … 656 685 $selected = ''; 657 686 658 if (xpress_is_multiblog() && $multi_blog_use_d3forum) {687 if (xpress_is_multiblog() && !$multi_blog_use_d3forum) { 659 688 $forum_list .= '<option value="none"' . $selected . '>' . __('WordPress MultiBlog cannot integrate the comments.', 'xpressme') . "</option>\n"; 660 689 } else { … … 677 706 $forums = $xoops_db->get_results($sql); 678 707 foreach ($forums as $forum) { 679 if (($module->dirname == $this->d3forum_module_dir) && ($forum->forum_id == $this->d3forum_forum_id)) 708 if (($module->dirname == $this->d3forum_module_dir) && ($forum->forum_id == $this->d3forum_forum_id)){ 680 709 $selected = ' selected="selected"'; 681 else 710 $forum_div = 'forum|' . $module->dirname . '|' . $forum->forum_id; 711 $forum_select = "$module->name($module->dirname) $forum->cat_title-$forum->forum_title(ID=$forum->forum_id)"; 712 $forum_list .= '<option value="' . $forum_div . '" ' . $selected . '>' . $forum_select . "</option>\n"; 713 } else if (empty($forum->forum_external_link_format)){ 682 714 $selected = ''; 683 $forum_div = 'forum|' . $module->dirname . '|' . $forum->forum_id; 684 $forum_select = "$module->name($module->dirname) $forum->cat_title-$forum->forum_title(ID=$forum->forum_id)"; 685 $forum_list .= '<option value="' . $forum_div . '" ' . $selected . '>' . $forum_select . "</option>\n"; 715 $forum_div = 'forum|' . $module->dirname . '|' . $forum->forum_id; 716 $forum_select = "$module->name($module->dirname) $forum->cat_title-$forum->forum_title(ID=$forum->forum_id)"; 717 $forum_list .= '<option value="' . $forum_div . '" ' . $selected . '>' . $forum_select . "</option>\n"; 718 } 686 719 } 687 720 break;
Note: See TracChangeset
for help on using the changeset viewer.