XPressME Integration Kit

Trac

Changeset 609


Ignore:
Timestamp:
May 29, 2010, 2:40:30 AM (14 years ago)
Author:
toemon
Message:

検索対象(post_type)にnav_menu_itemも対象になるバグ修正 Fixes#346

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/include/search.php

    r607 r609  
    4343                         
    4444                        $now = date('Y-m-d H:i:s',(time() + ($time_difference * 3600))); 
    45                         $where = "(post_status = 'publish') AND (post_date <= '".$now."')"; 
     45                        $where = "(post_status = 'publish') AND (post_date <= '".$now."') AND (post_type <> 'revision') AND (post_type <> 'nav_menu_item') "; 
    4646 
    4747                        if ( is_array($queryarray) && $count = count($queryarray) ) { 
     
    6565 
    6666                        while($myrow = $xoopsDB->fetchArray($result)){ 
     67                                if ($myrow['post_type'] !=='revision' && $myrow['post_type'] !=='nav_menu_item') 
    6768                                switch ($myrow['post_type']) { 
    6869                                case 'page': 
     
    7475                                        break; 
    7576                                default: 
    76                                         if ($myrow['post_type'] !=='revision'){ // for custom post type 
    77                                                 $ret[$i]['link'] = $mid_url . '?'.$myrow['post_type'].'=' .$myrow['post_name']; 
    78                                         } 
     77                                        $ret[$i]['link'] = $mid_url . '?'.$myrow['post_type'].'=' .$myrow['post_name']; 
    7978                                } 
    8079                                $ret[$i]['title'] = $blog_name . $myts->htmlSpecialChars($myrow['post_title']); 
Note: See TracChangeset for help on using the changeset viewer.