http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99801
Revision: 99801
Author: ialex
Date: 2011-10-14 20:36:40 +0000 (Fri, 14 Oct 2011)
Log Message:
-----------
* Inlinised wfShowingResults()
* Pass a Title object to wfViewPrevNext()
* Use OutputPage::addWikiMsg() to display 'specialpage-empty' message
* Fixed calls to $this->getTitle() in QueryPage subclasses since they use to
old way (i.e. not the same object as the special page) which throws "Invalid
special page name: ''" when called
Modified Paths:
--------------
trunk/extensions/EditConflict/CurrentEdits.php
Modified: trunk/extensions/EditConflict/CurrentEdits.php
===================================================================
--- trunk/extensions/EditConflict/CurrentEdits.php 2011-10-14 20:15:25 UTC
(rev 99800)
+++ trunk/extensions/EditConflict/CurrentEdits.php 2011-10-14 20:36:40 UTC
(rev 99801)
@@ -120,20 +120,19 @@
// if list is empty, display a warning
if( $num == 0 ) {
- $wgOut->addHTML( '<p>' .
wfMsgHTML('specialpage-empty') . '</p>' );
+ $wgOut->addWikiMsg( 'specialpage-empty'
);
return;
}
- $top = wfShowingResults( $offset, $num );
- $wgOut->addHTML( "<p>{$top}\n" );
+ $wgOut->addHTML( wfMsgExt( 'showingresults',
'parse',
+ $wgLang->formatNum( $num ),
$wgLang->formatNum( $offset + 1 ) ) );
// often disable 'next' link when we reach the
end
$atend = $num < $limit;
- $sl = wfViewPrevNext( $offset, $limit ,
- $wgContLang->specialPage( $sname ),
+ $sl = wfViewPrevNext( $offset, $limit,
SpecialPage::getTitleFor( 'CurrentEdits' ),
wfArrayToCGI( $this->linkParameters()
), $atend );
- $wgOut->addHTML( "<br />{$sl}</p>\n" );
+ $wgOut->addHTML( "<p>{$sl}</p>\n" );
}
if ( $num > 0 ) {
$s = array();
@@ -205,7 +204,7 @@
$this->order_queries[ $order_key ] = $msg;
} else {
# link all other orders
- $this->order_queries[ $order_key ] =
$skin->makeKnownLinkObj( $this->getTitle(), $msg , $action );
+ $this->order_queries[ $order_key ] =
$skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'CurrentEdits' ), $msg ,
$action );
}
}
}
@@ -270,7 +269,7 @@
if ( $this->order_key != EC_DEFAULT_ORDER_KEY ) {
$action .= '&order=' . $this->order_key;
}
- $session_close_link = $skin->makeKnownLinkObj(
$this->getTitle(), '※', $action, '', '', 'title="Close this session."' );
+ $session_close_link = $skin->makeKnownLinkObj(
SpecialPage::getTitleFor( 'CurrentEdits' ), '※', $action, '', '',
'title="Close this session."' );
return wfMsg( 'ec_list_order_' . $this->order_key, $title_link,
$user_page_link, htmlspecialchars( $user_weight ), htmlspecialchars(
$editing_time ), $session_close_link );
}
@@ -287,4 +286,4 @@
return $params;
}
-}
\ No newline at end of file
+}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs