Page MenuHomePhabricator

patch_1644_CVS.txt

Authored By
bzimport
Nov 21 2014, 7:42 PM
Size
1 KB
Subscribers
None

patch_1644_CVS.txt

Index: SpecialLog.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/SpecialLog.php,v
retrieving revision 1.20
diff -u -r1.20 SpecialLog.php
--- SpecialLog.php 3 Apr 2005 15:18:51 -0000 1.20
+++ SpecialLog.php 19 Apr 2005 19:57:28 -0000
@@ -44,6 +44,7 @@
class LogReader {
var $db, $joinClauses, $whereClauses;
var $type = '', $user = '', $title = null;
+ var $numResults = 0;
/**
* @param WebRequest $request For internal use use a FauxRequest object to pass arbitrary parameters.
@@ -233,6 +234,7 @@
function showList( &$out ) {
global $wgLinkCache;
$result = $this->reader->getRows();
+ $this->numResults = 0;
// Fetch results and form a batch link existence query
$batch = new LinkBatch;
@@ -247,14 +249,17 @@
$title = Title::newFromText( $paramArray[0] );
$batch->addObj( $title );
}
+ $this->numResults++;
}
$batch->execute( $wgLinkCache );
// Rewind result pointer and go through it again, making the HTML
- $result->seek( 0 );
$html = "\n<ul>\n";
- while( $s = $result->fetchObject() ) {
- $html .= $this->logLine( $s );
+ if ($this->numResults > 0) {
+ $result->seek( 0 );
+ while( $s = $result->fetchObject() ) {
+ $html .= $this->logLine( $s );
+ }
}
$result->free();
$html .= "\n</ul>\n";
@@ -382,7 +387,7 @@
$html = wfViewPrevNext( $offset, $limit,
$wgContLang->specialpage( 'Log' ),
$bits,
- false);
+ $this->numResults < $limit);
$out->addHTML( '<p>' . $html . '</p>' );
}
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1510
Default Alt Text
patch_1644_CVS.txt (1 KB)

Event Timeline