r68700 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68699‎ | r68700 | r68701 >
Date:03:18, 29 June 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added check to handle sm_coords table only if Semantic Maps is installed
Modified paths:
  • /trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php
@@ -284,7 +284,11 @@
285285 $db->delete( 'smw_rels2', array( "(s_id IN $idsString) OR (o_id IN $idsString)" ), 'SIO::deleteRels2Data' );
286286 $db->delete( 'smw_atts2', array( "s_id IN $idsString" ), 'SIO::deleteAtts2Data' );
287287 $db->delete( 'smw_text2', array( "s_id IN $idsString" ), 'SIO::deleteText2Data' );
288 - $db->delete( 'sm_coords', array( "s_id IN $idsString" ), 'SIO::deleteCoordsData' );
 288+ // handle the sm_coords table only if the Semantic
 289+ // Maps extension is installed
 290+ if ( defined( 'SM_VERSION' ) ) {
 291+ $db->delete( 'sm_coords', array( "s_id IN $idsString" ), 'SIO::deleteCoordsData' );
 292+ }
289293 }
290294
291295 if ( count( $allRels2Inserts ) > 0 ) {

Status & tagging log