Index: trunk/phase3/includes/LocalisationCache.php |
— | — | @@ -827,6 +827,10 @@ |
828 | 828 | "directory \"{$this->directory}\"" ); |
829 | 829 | } |
830 | 830 | } |
| 831 | + // Close reader to stop permission errors on write |
| 832 | + if( !empty($this->readers[$code]) ) { |
| 833 | + $this->readers[$code]->close(); |
| 834 | + } |
831 | 835 | $this->writer = CdbWriter::open( $this->getFileName( $code ) ); |
832 | 836 | $this->currentLang = $code; |
833 | 837 | } |
— | — | @@ -836,7 +840,7 @@ |
837 | 841 | $this->writer->close(); |
838 | 842 | $this->writer = null; |
839 | 843 | |
840 | | - // Reopen the reader |
| 844 | + // Close and remove the reader |
841 | 845 | if ( !empty( $this->readers[$this->currentLang] ) ) { |
842 | 846 | $this->readers[$this->currentLang]->close(); |
843 | 847 | } |