http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73777
Revision: 73777
Author: yaron
Date: 2010-09-26 15:37:46 +0000 (Sun, 26 Sep 2010)
Log Message:
-----------
SIO data updating changed to use 'SMWSQLStore2::updateDataAfter' hook, instead
of 'smwDeleteSemanticData', so that SIO data is always saved after SMW data,
avoiding duplicate rows
Modified Paths:
--------------
trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php
trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php
Modified: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php
===================================================================
--- trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php
2010-09-26 15:26:19 UTC (rev 73776)
+++ trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php
2010-09-26 15:37:46 UTC (rev 73777)
@@ -9,7 +9,7 @@
if ( !defined( 'MEDIAWIKI' ) ) die();
-define( 'SIO_VERSION', '0.6' );
+define( 'SIO_VERSION', '0.6.1' );
$wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' :
'parserhook'][] = array(
'path' => __FILE__,
@@ -23,7 +23,7 @@
$wgHooks['ParserFirstCallInit'][] = 'siofRegisterParserFunctions';
$wgHooks['LanguageGetMagic'][] = 'siofLanguageGetMagic';
$wgHooks['ParserClearState'][] = 'SIOHandler::clearState';
-$wgHooks['smwDeleteSemanticData'][] = 'SIOHandler::updateData';
+$wgHooks['SMWSQLStore2::updateDataAfter'][] = 'SIOHandler::updateData';
$wgHooks['smwUpdatePropertySubjects'][] =
'SIOHandler::handleUpdatingOfInternalObjects';
$wgHooks['smwRefreshDataJobs'][] =
'SIOHandler::handleRefreshingOfInternalObjects';
$wgHooks['smwAddToRDFExport'][] = 'SIOSQLStore::createRDF';
Modified:
trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php
===================================================================
--- trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php
2010-09-26 15:26:19 UTC (rev 73776)
+++ trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php
2010-09-26 15:37:46 UTC (rev 73777)
@@ -310,13 +310,14 @@
}
}
- public static function updateData( $subject ) {
+ public static function updateData( $sqlStore, $data ) {
$sioSQLStore = new SIOSQLStore();
// Find all "pages" in the SMW IDs table that are internal
// objects for this page, and delete their properties from
// the SMW tables.
// Then save the current contents of the $mInternalObjects
// array.
+ $subject = $data->getSubject();
$pageName = $subject->getDBKey();
$namespace = $subject->getNamespace();
$idsForDeletion = SIOSQLStore::getIDsForDeletion( $pageName,
$namespace );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs