Index: trunk/phase3/includes/LocalisationCache.php |
— | — | @@ -710,31 +710,9 @@ |
711 | 711 | $this->loadedItems[$code][$key] = true; |
712 | 712 | } |
713 | 713 | |
714 | | - # Write data to the persistant store |
715 | | - $this->saveLangInStore( $code, $data ); |
716 | | - |
717 | | - wfProfileOut( __METHOD__ ); |
718 | | - } |
719 | | - |
720 | | - /** |
721 | | - * Helper for recache() this is not mean to be called outside of recache() |
722 | | - * When the localisation store is null (LCStore_Null), method does nothing. |
723 | | - * |
724 | | - * @param $code String: language code to save data for |
725 | | - * @param $data Array: language data forged by recache() |
726 | | - */ |
727 | | - protected function saveLangInStore( $code, $data ) { |
728 | | - wfProfileIn( __METHOD__ ); |
729 | | - |
730 | | - if( $this->store instanceof LCStore_Null ) { |
731 | | - # No point in saving data to /dev/null |
732 | | - wfProfileOut( __METHOD__ ); |
733 | | - return; |
734 | | - } |
735 | | - |
736 | 714 | # Save to the persistent cache |
737 | 715 | $this->store->startWrite( $code ); |
738 | | - foreach ( $data as $key => $value ) { |
| 716 | + foreach ( $allData as $key => $value ) { |
739 | 717 | if ( in_array( $key, self::$splitKeys ) ) { |
740 | 718 | foreach ( $value as $subkey => $subvalue ) { |
741 | 719 | $this->store->set( "$key:$subkey", $subvalue ); |
— | — | @@ -746,7 +724,11 @@ |
747 | 725 | $this->store->finishWrite(); |
748 | 726 | |
749 | 727 | # Clear out the MessageBlobStore |
750 | | - MessageBlobStore::clear(); |
| 728 | + # HACK: If using a null (i.e. disabled) storage backend, we |
| 729 | + # can't write to the MessageBlobStore either |
| 730 | + if ( !$this->store instanceof LCStore_Null ) { |
| 731 | + MessageBlobStore::clear(); |
| 732 | + } |
751 | 733 | |
752 | 734 | wfProfileOut( __METHOD__ ); |
753 | 735 | } |
— | — | @@ -1204,4 +1186,4 @@ |
1205 | 1187 | $this->unload( $code ); |
1206 | 1188 | } |
1207 | 1189 | } |
1208 | | -} |
| 1190 | +} |
\ No newline at end of file |