r77059 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77058‎ | r77059 | r77060 >
Date:16:09, 20 November 2010
Author:mkroetzsch
Status:deferred
Tags:
Comment:
Thou shalt not set $wgTitle in vain!

(removed two assignments of $wgTitle that were not appropriate/safe)
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStoreLight.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStoreLight.php
@@ -405,11 +405,6 @@
406406 }
407407 $titles = Title::newFromIDs( $tids );
408408 foreach ( $titles as $title ) {
409 - // set $wgTitle, in case semantic data is set based
410 - // on values not originating from the page (such as
411 - // via the External Data extension)
412 - global $wgTitle;
413 - $wgTitle = $title;
414409 if ( ( $namespaces == false ) || ( in_array( $title->getNamespace(), $namespaces ) ) ) {
415410 $updatejobs[] = new SMWUpdateJob( $title );
416411 $emptyrange = false;
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
@@ -1502,12 +1502,6 @@
15031503 $titles = Title::newFromIDs( $tids );
15041504
15051505 foreach ( $titles as $title ) {
1506 - // Set $wgTitle, in case semantic data is set based
1507 - // on values not originating from the page (such as
1508 - // via the External Data extension).
1509 - global $wgTitle;
1510 - $wgTitle = $title;
1511 -
15121506 if ( ( $namespaces == false ) || ( in_array( $title->getNamespace(), $namespaces ) ) ) {
15131507 $updatejobs[] = new SMWUpdateJob( $title );
15141508 $emptyrange = false;

Status & tagging log