plugins/SpecialSearch.php
changeset 756 e8cf18383425
parent 685 17ebe24cdf85
child 801 eb8b23f11744
equal deleted inserted replaced
755:9b4cd3ef42f3 756:e8cf18383425
   173       $parser->assign_vars(array(
   173       $parser->assign_vars(array(
   174          'PAGE_TITLE' => $result['page_name'],
   174          'PAGE_TITLE' => $result['page_name'],
   175          'PAGE_TEXT' => $result['page_text'],
   175          'PAGE_TEXT' => $result['page_text'],
   176          'PAGE_LENGTH' => $result['page_length'],
   176          'PAGE_LENGTH' => $result['page_length'],
   177          'RELEVANCE_SCORE' => $result['score'],
   177          'RELEVANCE_SCORE' => $result['score'],
   178          'RESULT_URL' => makeUrlNS($result['namespace'], $result['page_id'], false, true),
   178          'RESULT_URL' => makeUrlNS($result['namespace'], $result['page_id'], false, true) . ( isset($result['url_append']) ? $result['url_append'] : '' ),
   179          'PAGE_LENGTH_UNIT' => $length_unit,
   179          'PAGE_LENGTH_UNIT' => $length_unit,
   180          'PAGE_URL' => $url,
   180          'PAGE_URL' => $url,
   181          'PAGE_NOTE' => ( isset($result['page_note']) ? $result['page_note'] . ' ' : '' )
   181          'PAGE_NOTE' => ( isset($result['page_note']) ? $result['page_note'] . ' ' : '' )
   182         ));
   182         ));
   183       $has_content = ( $result['namespace'] == 'Special' );
   183       $has_content = ( $result['namespace'] == 'Special' || !empty($result['zero_length']) );
   184       
   184       
   185       $code = $plugins->setHook('search_global_results');
   185       $code = $plugins->setHook('search_global_results');
   186       foreach ( $code as $cmd )
   186       foreach ( $code as $cmd )
   187       {
   187       {
   188         eval($cmd);
   188         eval($cmd);