Index: trunk/extensions/MetavidWiki/includes/MV_Index.php |
— | — | @@ -158,8 +158,8 @@ |
159 | 159 | $ret_ary[$cat_row->cl_from]->category[] = $cat_row->cl_to; |
160 | 160 | } |
161 | 161 | } |
162 | | - // slow especially for lots of query results but join Query is crazy complicated for SMW >= 1.2 |
163 | | - // (and I have not been able to construct it without hitting expensive number of rows in the EXPLIN) |
| 162 | + // slow epecialy for lots of query results but join Query is crazy complicated for SMW >= 1.2 |
| 163 | + // (and I have not been able to construct it without hitting exessive number of rows in the EXPLIN) |
164 | 164 | // @@todo these queries should be merged with semantic wiki Ask with some ~special~ keywords for fulltext search |
165 | 165 | if ( $do_smw_lookup ) { |
166 | 166 | $smwStore =& smwfGetStore(); |
— | — | @@ -627,6 +627,9 @@ |
628 | 628 | } |
629 | 629 | } |
630 | 630 | } |
| 631 | + foreach($ret_ary as $k => $v){ |
| 632 | + $ret_ary[$k]->text = str_replace(array('u800','u82e'),'', $v->text); |
| 633 | + } |
631 | 634 | |
632 | 635 | return $ret_ary; |
633 | 636 | } |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php |
— | — | @@ -262,6 +262,7 @@ |
263 | 263 | global $wgRequest; |
264 | 264 | |
265 | 265 | $this->results = $mvIndex->doUnifiedFiltersQuery( $this->filters ); |
| 266 | + |
266 | 267 | $this->num = $mvIndex->numResults(); |
267 | 268 | $this->numResultsFound = $mvIndex->numResultsFound(); |
268 | 269 | if ( isset ( $mvIndex->offset ) ) |
— | — | @@ -270,7 +271,9 @@ |
271 | 272 | $this->limit = $mvIndex->limit; |
272 | 273 | if ( isset ( $mvIndex->order ) ) |
273 | 274 | $this->order = $mvIndex->order; |
| 275 | + //fix replace text: |
274 | 276 | |
| 277 | + |
275 | 278 | // do search digest (if global config, function req and num_results fit criteria) |
276 | 279 | if ( $mvEnableSearchDigest && |
277 | 280 | $wgRequest->getVal( 'tl' ) != '1' && |
— | — | @@ -479,7 +482,6 @@ |
480 | 483 | $mvStreamTitle = Title :: MakeTitle( MV_NS_STREAM, $mvTitle->getNearStreamName( 0 ) ); |
481 | 484 | } |
482 | 485 | // $mvTitle->getStreamName() .'/'.$mvTitle->getStartTime() .'/'. $mvTitle->getEndTime() ); |
483 | | - $mvd_text = str_replace(array('u800','u82e'),'', $mvd->text); |
484 | 486 | |
485 | 487 | $o .= '<li class="result"> |
486 | 488 | <span class="vid_img" id="mvimg_' . htmlspecialchars( $mvd->id ) . '"> |
— | — | @@ -493,7 +495,7 @@ |
494 | 496 | $sk->makeKnownLinkObj( $mvStreamTitle, $mvTitle->getStreamNameText() . |
495 | 497 | ' :: ' . $mvTitle->getTimeDesc() ) . |
496 | 498 | '</h4> |
497 | | - <p>Matching Phrase:' . $this->termHighlight( $mvd_text, implode( '|', $this->getTerms() ), 1, 100 ) . ' </p> |
| 499 | + <p>Matching Phrase:' . $this->termHighlight( $mvd->text, implode( '|', $this->getTerms() ), 1, 100 ) . ' </p> |
498 | 500 | <span class="by">' . $mvd_cnt_links . '</span> |
499 | 501 | <span class="by">' . $mvd_cat_links . '</span> |
500 | 502 | <span class="by">' . $mvd_bill_links . '</span> |
— | — | @@ -1073,6 +1075,7 @@ |
1074 | 1076 | $v = current(current($v)->getContent()); |
1075 | 1077 | array_push( $results, $v->getXSDValue()); |
1076 | 1078 | } |
| 1079 | + //replace result text: |
1077 | 1080 | return $results; |
1078 | 1081 | } |
1079 | 1082 | function getPersonImageURL( $person_name ) { |