r104719 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104718‎ | r104719 | r104720 >
Date:19:18, 30 November 2011
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r104541 - abandoning the whole getTitle() idea, and just going with $wgTitle
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormLinker.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormLinker.php
@@ -267,18 +267,11 @@
268268 global $sfgRedLinksCheckOnlyLocalProps;
269269 if ( $sfgRedLinksCheckOnlyLocalProps ) {
270270 $incoming_properties = array();
271 - if ( $linker instanceof DummyLinker ) {
272 - global $wgTitle;
273 - $curTitle = $wgTitle;
274 - } elseif ( is_callable( array( $linker, 'getContext' ) ) ) {
275 - $curTitle = $linker->getContext()->getTitle();
276 - } else {
277 - $curTitle = $linker->getTitle();
278 - }
 271+ global $wgTitle;
279272 // If this is called from the command line, $wgTitle
280273 // might not have been set.
281 - if ( !is_null( $curTitle ) ) {
282 - self::getPagePropertiesOfPage( $curTitle );
 274+ if ( !is_null( $wgTitle ) ) {
 275+ self::getPagePropertiesOfPage( $wgTitle );
283276 $targetName = $target->getText();
284277 if ( array_key_exists( $targetName, self::$mLinkedPages ) ) {
285278 $incoming_properties = self::$mLinkedPages[$targetName];

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104541Added support for MW 1.18+ (?), where Linker::getTitle() was replaced with Li...yaron04:30, 29 November 2011