http://www.mediawiki.org/wiki/Special:Code/MediaWiki/65354

Revision: 65354
Author:   nad
Date:     2010-04-21 02:37:08 +0000 (Wed, 21 Apr 2010)

Log Message:
-----------
must name the count(0) row

Modified Paths:
--------------
    trunk/extensions/RecordAdmin/RecordAdmin_body.php

Modified: trunk/extensions/RecordAdmin/RecordAdmin_body.php
===================================================================
--- trunk/extensions/RecordAdmin/RecordAdmin_body.php   2010-04-21 02:29:59 UTC 
(rev 65353)
+++ trunk/extensions/RecordAdmin/RecordAdmin_body.php   2010-04-21 02:37:08 UTC 
(rev 65354)
@@ -827,8 +827,8 @@
                $tbl  = $dbr->tableName( 'templatelinks' );
                $ty   = $dbr->addQuotes( $type );
                if ( $count ) {
-                       $row = $dbr->selectRow( $tbl, 'count(0)', "tl_namespace 
= 10 AND tl_title = $ty", __METHOD__ );
-                       $records = $row[0];
+                       $row = $dbr->selectRow( $tbl, 'count(0) as count', 
"tl_namespace = 10 AND tl_title = $ty", __METHOD__ );
+                       $records = $row->count;
                } else {
                        $res  = $dbr->select( $tbl, 'tl_from', "tl_namespace = 
10 AND tl_title = $ty", __METHOD__ );
                        while ( $row = $dbr->fetchRow( $res ) ) $records[] = 
Title::newFromID( $row[0] );



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to