r83326 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83325‎ | r83326 | r83327 >
Date:20:35, 5 March 2011
Author:reedy
Status:ok
Tags:
Comment:
Bug 23352 - Link path in code-browsing-path

Even done to parsing multiple paths ;D

Also add some documentation
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeRevisionListView.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeView.php
@@ -9,6 +9,11 @@
1010 */
1111 var $mRepo;
1212
 13+ /**
 14+ * @var Skin
 15+ */
 16+ var $skin;
 17+
1318 function __construct( $repo ) {
1419 $this->mRepo = ( $repo instanceof CodeRepository )
1520 ? $repo
Index: trunk/extensions/CodeReview/ui/CodeRevisionListView.php
@@ -145,6 +145,10 @@
146146 $wgOut->redirect( $this->getPager()->getTitle()->getFullURL( $fields ) );
147147 }
148148
 149+ /**
 150+ * @param SvnRevTablePager $pager
 151+ * @return string
 152+ */
149153 protected function buildBatchInterface( $pager ) {
150154 global $wgUser;
151155
Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php
@@ -123,7 +123,16 @@
124124
125125 $html = '';
126126 if ( $this->mPath != '' ) {
127 - $html .= wfMsgExt( 'code-browsing-path', 'parse', $this->mPath );
 127+ $links = array();
 128+ foreach( explode( '|', $this->mPath ) as $path ) {
 129+ $links[] = $this->skin->link(
 130+ SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ),
 131+ $path,
 132+ array(),
 133+ array( 'path' => $path )
 134+ );
 135+ }
 136+ $html .= wfMsgExt( 'code-browsing-path', array( 'parse', 'replaceafter' ), $wgLang->commaList( $links ) );
128137 }
129138 # Output form
130139 $html .= Xml::openElement( 'form', array( 'action' => $special->getLocalUrl(), 'method' => 'post' ) );

Status & tagging log