r86606 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86605‎ | r86606 | r86607 >
Date:09:01, 21 April 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
fixed order of parameters
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
@@ -718,11 +718,7 @@
719719 wfProfileIn( 'SMWSQLStore2::deleteSubject (SMW)' );
720720 wfRunHooks( 'SMWSQLStore2::deleteSubjectBefore', array( $this, $subject ) );
721721
722 - $this->deleteSemanticData( new SMWDIWikiPage(
723 - $subject->getDBkey(),
724 - $subject->getNamespace(),
725 - $subject->getInterwiki()
726 - ) );
 722+ $this->deleteSemanticData( SMWDIWikiPage::newFromTitle( $subject );
727723 $this->updateRedirects( $subject->getDBkey(), $subject->getNamespace() ); // also delete redirects, may trigger update jobs!
728724
729725 if ( $subject->getNamespace() == SMW_NS_CONCEPT ) { // make sure to clear caches
@@ -970,11 +966,7 @@
971967 } else { // general move method that should be correct in all cases (equality support respected when updating redirects)
972968 // Delete any existing data from new title:
973969 // $newtitle should not have data, but let's be sure
974 - $this->deleteSemanticData( new SMWDIWikiPage(
975 - $newtitle->getDBkey(),
976 - $newtitle->getNamespace(),
977 - $subject->getInterwiki()
978 - ) );
 970+ $this->deleteSemanticData( SMWDIWikiPage::newFromTitle( $newtitle );
979971 $this->updateRedirects( $newtitle->getDBkey(), $newtitle->getNamespace() ); // may trigger update jobs!
980972
981973 // Move all data of old title to new position:
@@ -1503,7 +1495,7 @@
15041496 }
15051497 } elseif ( $row->smw_iw { 0 } != ':' ) { // refresh all "normal" interwiki pages by just clearing their content
15061498 $this->deleteSemanticData(
1507 - new SMWDIWikiPage( $row->smw_namespace, $row->smw_title, $row->smw_iw )
 1499+ new SMWDIWikiPage( $row->smw_title, $row->smw_namespace, $row->smw_iw )
15081500 );
15091501 }
15101502 }

Status & tagging log