Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php |
— | — | @@ -277,46 +277,33 @@ |
278 | 278 | public function updateData( SMWSemanticData $data ) { |
279 | 279 | wfRunHooks( 'SMWStore::updateDataBefore', array( $this, $data ) ); |
280 | 280 | |
281 | | - global $smwgCheckChangesBeforeUpdate; |
282 | | - if ( $smwgCheckChangesBeforeUpdate && $data->hasVisibleProperties() ) { |
283 | | - $this->removeNotChangedProperties( $data ); |
284 | | - } |
| 281 | + global $smwgCheckChangesBeforeUpdate; |
| 282 | + if ( $smwgCheckChangesBeforeUpdate && $data->hasVisibleProperties() ) { |
| 283 | + // TODO |
| 284 | + // wfRunHooks( 'SWLGroupNotify', array( ) ); |
| 285 | + } |
285 | 286 | |
286 | | - if ( true /* TODO: something changed */ ) { |
287 | | - // Invalidate the page, so data stored on it gets displayed immediately in queries. |
288 | | - global $smwgAutoRefreshSubject; |
289 | | - if ( $smwgAutoRefreshSubject && !wfReadOnly() ) { |
290 | | - $title = Title::makeTitle( $data->getSubject()->getNamespace(), $data->getSubject()->getDBkey() ); |
291 | | - $dbw = wfGetDB( DB_MASTER ); |
| 287 | + // Invalidate the page, so data stored on it gets displayed immediately in queries. |
| 288 | + global $smwgAutoRefreshSubject; |
| 289 | + if ( $smwgAutoRefreshSubject && !wfReadOnly() ) { |
| 290 | + $title = Title::makeTitle( $data->getSubject()->getNamespace(), $data->getSubject()->getDBkey() ); |
| 291 | + $dbw = wfGetDB( DB_MASTER ); |
292 | 292 | |
293 | | - $dbw->update( |
294 | | - 'page', |
295 | | - array( 'page_touched' => $dbw->timestamp( time() + 9001 ) ), |
296 | | - $title->pageCond(), |
297 | | - __METHOD__ |
298 | | - ); |
| 293 | + $dbw->update( |
| 294 | + 'page', |
| 295 | + array( 'page_touched' => $dbw->timestamp( time() + 9001 ) ), |
| 296 | + $title->pageCond(), |
| 297 | + __METHOD__ |
| 298 | + ); |
299 | 299 | |
300 | | - HTMLFileCache::clearFileCache( $title ); |
301 | | - } |
302 | | - } |
| 300 | + HTMLFileCache::clearFileCache( $title ); |
| 301 | + } |
303 | 302 | |
304 | 303 | $this->doDataUpdate( $data ); |
305 | 304 | |
306 | 305 | wfRunHooks( 'SMWStore::updateDataAfter', array( $this, $data ) ); |
307 | 306 | } |
308 | 307 | |
309 | | - protected function removeNotChangedProperties( SMWSemanticData &$data ) { |
310 | | - //$storedValues = $this->getStoredValues( $data ); |
311 | | - |
312 | | - // TODO: remove data that has not changed |
313 | | - |
314 | | - if ( false /* TODO: something changed */ ) { |
315 | | - wfRunHooks( 'SMWStore::dataChanged', array( $this, $data ) ); |
316 | | - } |
317 | | - } |
318 | | - |
319 | | - //protected abstract function getStoredValues( SMWSemanticData $data ); |
320 | | - |
321 | 308 | /** |
322 | 309 | * Clear all semantic data specified for some page. |
323 | 310 | * |