Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php |
— | — | @@ -718,7 +718,11 @@ |
719 | 719 | wfProfileIn( 'SMWSQLStore2::deleteSubject (SMW)' ); |
720 | 720 | wfRunHooks( 'SMWSQLStore2::deleteSubjectBefore', array( $this, $subject ) ); |
721 | 721 | |
722 | | - $this->deleteSemanticData( SMWWikiPageValue::makePageFromTitle( $subject ) ); |
| 722 | + $this->deleteSemanticData( new SMWDIWikiPage( |
| 723 | + $subject->getDBkey(), |
| 724 | + $subject->getNamespace(), |
| 725 | + $subject->getInterwiki() |
| 726 | + ) ); |
723 | 727 | $this->updateRedirects( $subject->getDBkey(), $subject->getNamespace() ); // also delete redirects, may trigger update jobs! |
724 | 728 | |
725 | 729 | if ( $subject->getNamespace() == SMW_NS_CONCEPT ) { // make sure to clear caches |
— | — | @@ -965,7 +969,12 @@ |
966 | 970 | /// which will hopefully be done to fix the double redirect. |
967 | 971 | } else { // general move method that should be correct in all cases (equality support respected when updating redirects) |
968 | 972 | // Delete any existing data from new title: |
969 | | - $this->deleteSemanticData( SMWWikiPageValue::makePageFromTitle( $newtitle ) ); // $newtitle should not have data, but let's be sure |
| 973 | + // $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 | 979 | $this->updateRedirects( $newtitle->getDBkey(), $newtitle->getNamespace() ); // may trigger update jobs! |
971 | 980 | |
972 | 981 | // Move all data of old title to new position: |
— | — | @@ -1483,9 +1492,9 @@ |
1484 | 1493 | foreach ( $res as $row ) { |
1485 | 1494 | $emptyrange = false; // note this even if no jobs were created |
1486 | 1495 | |
1487 | | - if ( ( $namespaces != false ) && ( !in_array( $row->smw_namespace, $namespaces ) ) ) continue; |
| 1496 | + if ( $namespaces && !in_array( $row->smw_namespace, $namespaces ) ) continue; |
1488 | 1497 | |
1489 | | - if ( ( $row->smw_iw == '' ) || ( $row->smw_iw == SMW_SQL2_SMWREDIIW ) ) { // objects representing pages in the wiki, even special pages |
| 1498 | + if ( $row->smw_iw == '' || $row->smw_iw == SMW_SQL2_SMWREDIIW ) { // objects representing pages in the wiki, even special pages |
1490 | 1499 | // TODO: special treament of redirects needed, since the store will not act on redirects that did not change according to its records |
1491 | 1500 | $title = Title::makeTitle( $row->smw_namespace, $row->smw_title ); |
1492 | 1501 | |
— | — | @@ -1493,7 +1502,9 @@ |
1494 | 1503 | $updatejobs[] = new SMWUpdateJob( $title ); |
1495 | 1504 | } |
1496 | 1505 | } elseif ( $row->smw_iw { 0 } != ':' ) { // refresh all "normal" interwiki pages by just clearing their content |
1497 | | - $this->deleteSemanticData( SMWWikiPageValue::makePage( $row->smw_namespace, $row->smw_title, '', $row->smw_iw ) ); |
| 1506 | + $this->deleteSemanticData( |
| 1507 | + new SMWDIWikiPage( $row->smw_namespace, $row->smw_title, $row->smw_iw ) |
| 1508 | + ); |
1498 | 1509 | } |
1499 | 1510 | } |
1500 | 1511 | $db->freeResult( $res ); |