r54968 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54967‎ | r54968 | r54969 >
Date:20:55, 13 August 2009
Author:aaron
Status:ok
Tags:
Comment:
Fixed 'permission denied' cdb fatals (on windows at least)
Modified paths:
  • /trunk/phase3/includes/LocalisationCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/LocalisationCache.php
@@ -827,6 +827,10 @@
828828 "directory \"{$this->directory}\"" );
829829 }
830830 }
 831+ // Close reader to stop permission errors on write
 832+ if( !empty($this->readers[$code]) ) {
 833+ $this->readers[$code]->close();
 834+ }
831835 $this->writer = CdbWriter::open( $this->getFileName( $code ) );
832836 $this->currentLang = $code;
833837 }
@@ -836,7 +840,7 @@
837841 $this->writer->close();
838842 $this->writer = null;
839843
840 - // Reopen the reader
 844+ // Close and remove the reader
841845 if ( !empty( $this->readers[$this->currentLang] ) ) {
842846 $this->readers[$this->currentLang]->close();
843847 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r54973Follow-up r54968: this close() should be redundant nowaaron21:32, 13 August 2009

Status & tagging log