r66887 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66886‎ | r66887 | r66888 >
Date:18:37, 25 May 2010
Author:reedy
Status:ok
Tags:
Comment:
Followup to r66873

If title valid, append URL to parse output
Modified paths:
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParse.php
@@ -322,7 +322,13 @@
323323 foreach ( $titles as $title => $id ) {
324324 $entry = array();
325325 $entry['prefix'] = $prefix;
326 - $this->getResult()->setContent( $entry, Title::makeTitle( $ns, $title )->getFullText() );
 326+
 327+ $title = Title::newFromText( "{$prefix}:{$title}" );
 328+ if ( $title ) {
 329+ $entry['url'] = $title->getFullURL();
 330+ }
 331+
 332+ $this->getResult()->setContent( $entry, $title->getFullText() );
327333 $result[] = $entry;
328334 }
329335 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66873Part of bug 23254 - Add interwiki links to parse outputreedy13:47, 25 May 2010

Status & tagging log