r69654 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69653‎ | r69654 | r69655 >
Date:03:33, 21 July 2010
Author:yaron
Status:ok
Tags:
Comment:
Added 'smwDeleteSemanticData' hook to be called even if function exits early, so that SIO will work on new pages as well
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
@@ -2261,7 +2261,11 @@
22622262 $fname = 'SMW::deleteSemanticData';
22632263 $id = $this->getSMWPageID( $subject->getDBkey(), $subject->getNamespace(), $subject->getInterwiki(), false );
22642264
2265 - if ( $id == 0 ) return; // not (directly) used anywhere yet, maybe a redirect but we do not care here
 2265+ if ( $id == 0 ) {
 2266+ // not (directly) used anywhere yet, may be a redirect but we do not care here
 2267+ wfRunHooks( 'smwDeleteSemanticData', array( $subject ) );
 2268+ return;
 2269+ }
22662270
22672271 foreach ( self::getPropertyTables() as $proptable ) {
22682272 if ( $proptable->idsubject ) {
@@ -2472,4 +2476,4 @@
24732477 return self::$prop_tables;
24742478 }
24752479
2476 -}
\ No newline at end of file
 2480+}

Status & tagging log