r69436 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69435‎ | r69436 | r69437 >
Date:20:05, 16 July 2010
Author:yaron
Status:deferred
Tags:
Comment:
Simplified, with another possible fix for the incorrect-namespaces bug
Modified paths:
  • /trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php
@@ -35,6 +35,10 @@
3636 public function getName() {
3737 return $this->mMainTitle->getDBkey() . '#' . $this->mIndex;
3838 }
 39+
 40+ public function getNamespace() {
 41+ return $this->mMainTitle->getNamespace();
 42+ }
3943 }
4044
4145 /**
@@ -114,9 +118,8 @@
115119 return $ids;
116120 }
117121
118 - function getStorageSQL( $mainPageName, $namespace, $internalObject ) {
119 - $mainPageID = $this->makeSMWPageID( $mainPageName, $namespace, '' );
120 - $ioID = $this->makeSMWPageID( $internalObject->getName(), $namespace, '' );
 122+ function getStorageSQL( $internalObject ) {
 123+ $ioID = $this->makeSMWPageID( $internalObject->getName(), $internalObject->getNamespace(), '' );
121124 $upRels2 = array();
122125 $upAtts2 = array();
123126 $upText2 = array();
@@ -297,7 +300,7 @@
298301 $allText2Inserts = array();
299302 $allCoordsInserts = array();
300303 foreach ( self::$mInternalObjects as $internalObject ) {
301 - list( $upRels2, $upAtts2, $upText2, $upCoords ) = $sioSQLStore->getStorageSQL( $pageName, $namespace, $internalObject );
 304+ list( $upRels2, $upAtts2, $upText2, $upCoords ) = $sioSQLStore->getStorageSQL( $internalObject );
302305 $allRels2Inserts = array_merge( $allRels2Inserts, $upRels2 );
303306 $allAtts2Inserts = array_merge( $allAtts2Inserts, $upAtts2 );
304307 $allText2Inserts = array_merge( $allText2Inserts, $upText2 );

Status & tagging log