r102977 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102976‎ | r102977 | r102978 >
Date:13:02, 14 November 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixes suggested by Nikerabbit
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_PageLister.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_PageLister.php
@@ -61,7 +61,7 @@
6262 $resultCount = count( $this->mDiWikiPages );
6363 $beyondLimit = ( $resultCount > $this->mLimit );
6464
65 - if ( $this->mUntil !== '' ) {
 65+ if ( !is_null( $this->mUntil ) && $this->mUntil !== '' ) {
6666 if ( $beyondLimit ) {
6767 $first = smwfGetStore()->getWikiPageSortKey( $this->mDiWikiPages[1] );
6868 } else {
@@ -69,7 +69,7 @@
7070 }
7171
7272 $last = $this->mUntil;
73 - } elseif ( $beyondLimit || ( $this->mFrom !== '' ) ) {
 73+ } elseif ( $beyondLimit || ( !is_null( $this->mFrom ) && $this->mFrom !== '' ) ) {
7474 $first = $this->mFrom;
7575
7676 if ( $beyondLimit ) {
@@ -100,7 +100,7 @@
101101 * @return string
102102 */
103103 protected function makeSelfLink( Title $title, $linkText, array $parameters ) {
104 - return smwfGetLinker()->makeLinkObj( $title, $linkText, wfArrayToCGI( $parameters ) );
 104+ return smwfGetLinker()->makeKnownLinkObj( $title, $linkText, wfArrayToCGI( $parameters ) );
105105 }
106106
107107 /**