r88515 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88514‎ | r88515 | r88516 >
Date:13:21, 21 May 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
fix to make page work on wikis that use a db table prefix
Modified paths:
  • /trunk/extensions/CentralNotice/TemplatePager.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/TemplatePager.php
@@ -30,7 +30,8 @@
3131 * Sort the banner list by tmp_id
3232 */
3333 function getIndexField() {
34 - return 'cn_templates.tmp_id';
 34+ $dbr = wfGetDB( DB_SLAVE );
 35+ return $dbr->tableName( 'cn_templates' ) . '.tmp_id';
3536 }
3637
3738 /**

Status & tagging log