r62138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62137‎ | r62138 | r62139 >
Date:21:35, 8 February 2010
Author:werdna
Status:deferred
Tags:
Comment:
LiquidThreads: Fix issues encountered with getUserLqtOverride on replicated setups, because it (brain-dead-ly), re-retrieves the page record from the DB. The method now accepts a title, not an article or article-id. The one caller has been updated.
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/Dispatch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/Dispatch.php
@@ -107,7 +107,7 @@
108108 in_array( $title->getPrefixedText(), $wgLqtPages );
109109
110110 if ( $title->exists() ) {
111 - $override = self::getUserLqtOverride( $title->getArticleId() );
 111+ $override = self::getUserLqtOverride( $title );
112112 } else {
113113 $override = null;
114114 }
@@ -122,13 +122,12 @@
123123 return $isTalkPage;
124124 }
125125
126 - static function getUserLqtOverride( $article ) {
127 - if ( !is_object( $article ) ) {
128 - $article = Article::newFromId( $article );
 126+ static function getUserLqtOverride( $title ) {
 127+ if ( ! is_object($title) ) {
 128+ return null;
129129 }
130130
131 - $title = $article->getTitle();
132 - $articleid = $article->getId();
 131+ $articleid = $title->getArticleId();
133132
134133 global $wgLiquidThreadsAllowUserControlNamespaces;
135134 global $wgLiquidThreadsAllowUserControl;

Follow-up revisions

RevisionCommit summaryAuthorDate
r62202Merge r62138werdna21:58, 9 February 2010

Status & tagging log