r86319 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86318‎ | r86319 | r86320 >
Date:16:36, 18 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixes to clearData after recent DV/DI changes
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php
@@ -251,7 +251,7 @@
252252 if ( $processSemantics ) {
253253 smwfGetStore()->updateData( $semdata );
254254 } else {
255 - smwfGetStore()->clearData( $semdata->getSubject()->getTitle() );
 255+ smwfGetStore()->clearData( $semdata->getSubject() );
256256 }
257257
258258 // Finally trigger relevant Updatejobs if necessary
@@ -390,7 +390,11 @@
391391 $output = self::$mPrevOutput;
392392
393393 if ( !isset( $output ) ) {
394 - smwfGetStore()->clearData( $links_update->mTitle, SMWFactbox::isNewArticle() );
 394+ smwfGetStore()->clearData( new SMWDIWikiPage(
 395+ $links_update->mTitle->getDbKey(),
 396+ $links_update->mTitle->getNamespace(),
 397+ $links_update->mTitle->getInterwiki()
 398+ ) );
395399 return true;
396400 }
397401 }
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php
@@ -264,10 +264,11 @@
265265
266266 /**
267267 * Clear all semantic data specified for some page.
 268+ *
 269+ * @param SMWDIWikiPage $di
268270 */
269 - public function clearData( Title $subject ) {
270 - $emptydata = new SMWSemanticData( new SMWDIWikiPage( $subject->getDbKey(), $subject->getNamespace(), $subject->getInterwiki() ) );
271 - $this->updateData( $emptydata );
 271+ public function clearData( SMWDIWikiPage $di ) {
 272+ $this->updateData( new SMWSemanticData( $di ) );
272273 }
273274
274275 /**

Status & tagging log