r87828 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87827‎ | r87828 | r87829 >
Date:17:35, 10 May 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
removing code that won't be needed after discussion with Markus
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php
@@ -277,46 +277,33 @@
278278 public function updateData( SMWSemanticData $data ) {
279279 wfRunHooks( 'SMWStore::updateDataBefore', array( $this, $data ) );
280280
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+ }
285286
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 );
292292
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+ );
299299
300 - HTMLFileCache::clearFileCache( $title );
301 - }
302 - }
 300+ HTMLFileCache::clearFileCache( $title );
 301+ }
303302
304303 $this->doDataUpdate( $data );
305304
306305 wfRunHooks( 'SMWStore::updateDataAfter', array( $this, $data ) );
307306 }
308307
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 -
321308 /**
322309 * Clear all semantic data specified for some page.
323310 *

Status & tagging log