r48898 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48897‎ | r48898 | r48899 >
Date:21:35, 26 March 2009
Author:dale
Status:deferred
Tags:
Comment:
fixed speech by and spoken by magic words
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_MagicWords.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/includes/MV_MagicWords.php
@@ -62,8 +62,11 @@
6363 return $this->getRecentSpeeches();
6464 break;
6565 case 'PERSONSPEECHES':
66 - return $this->getPersonOut();
 66+ return $this->getPersonOut( 'speech_by');
6767 break;
 68+ case 'PERSONSPOKENBY':
 69+ return $this->getPersonOut( 'spoken_by' );
 70+ break;
6871 case 'VIDEOBILL':
6972 return $this->getBillOut();
7073 break;
@@ -84,8 +87,8 @@
8588 $ms->filters[] = array ( 'a' => 'and', 't' => 'bill', 'v' => $bill_name );
8689 $ms->doSearch( $log_search = false );
8790 return $ms->getUnifiedResultsHTML( $show_sidebar = false );
88 - }
89 - function getPersonOut() {
 91+ }
 92+ function getPersonOut( $sp_mode = 'speech_by' ) {
9093 if ( $this->params['person'] != '' ) {
9194 $person_name = $this->params['person'];
9295 } else {
@@ -99,7 +102,7 @@
100103 $pgsl = $mvMediaSearchResultsLimit;
101104 $mvMediaSearchResultsLimit = $this->params['num_results'];
102105
103 - $ms->filters[] = array ( 'a' => 'and', 't' => 'spoken_by', 'v' => $person_name );
 106+ $ms->filters[] = array ( 'a' => 'and', 't' => $sp_mode, 'v' => $person_name );
104107 $ms->doSearch( $log_search = false );
105108
106109 $mvMediaSearchResultsLimit = $pgsl;

Status & tagging log