dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Special:Watchlist: Don't try to render empty row
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialWatchlist.php
diff --git
a/includes/specials/SpecialWatchlist.php
b/includes/specials/SpecialWatchlist.php
index
2aec8df
..
9c28d06
100644
(file)
--- a/
includes/specials/SpecialWatchlist.php
+++ b/
includes/specials/SpecialWatchlist.php
@@
-331,6
+331,14
@@
class SpecialWatchlist extends ChangesListSpecialPage {
$output->showLagWarning( $lag );
}
$output->showLagWarning( $lag );
}
+ # If no rows to display, show message before try to render the list
+ if ( $rows->numRows() == 0 ) {
+ $output->wrapWikiMsg(
+ "<div class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
+ );
+ return;
+ }
+
$dbr->dataSeek( $rows, 0 );
$list = ChangesList::newFromContext( $this->getContext() );
$dbr->dataSeek( $rows, 0 );
$list = ChangesList::newFromContext( $this->getContext() );
@@
-370,13
+378,7
@@
class SpecialWatchlist extends ChangesListSpecialPage {
}
$s .= $list->endRecentChangesList();
}
$s .= $list->endRecentChangesList();
- if ( $rows->numRows() == 0 ) {
- $output->wrapWikiMsg(
- "<div class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
- );
- } else {
- $output->addHTML( $s );
- }
+ $output->addHTML( $s );
}
/**
}
/**