r65354 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65353‎ | r65354 | r65355 >
Date:02:37, 21 April 2010
Author:nad
Status:deferred
Tags:
Comment:
must name the count(0) row
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -827,8 +827,8 @@
828828 $tbl = $dbr->tableName( 'templatelinks' );
829829 $ty = $dbr->addQuotes( $type );
830830 if ( $count ) {
831 - $row = $dbr->selectRow( $tbl, 'count(0)', "tl_namespace = 10 AND tl_title = $ty", __METHOD__ );
832 - $records = $row[0];
 831+ $row = $dbr->selectRow( $tbl, 'count(0) as count', "tl_namespace = 10 AND tl_title = $ty", __METHOD__ );
 832+ $records = $row->count;
833833 } else {
834834 $res = $dbr->select( $tbl, 'tl_from', "tl_namespace = 10 AND tl_title = $ty", __METHOD__ );
835835 while ( $row = $dbr->fetchRow( $res ) ) $records[] = Title::newFromID( $row[0] );

Status & tagging log