Merge "(bug 47070) check content model namespace on import."
[lhc/web/wiklou.git] / includes / cache / LocalisationCache.php
index 55c4c58..cba2ba7 100644 (file)
@@ -923,7 +923,8 @@ class LocalisationCache {
                        $allData['list'][$key] = array_keys( $allData[$key] );
                }
                # Run hooks
-               wfRunHooks( 'LocalisationCacheRecache', array( $this, $code, &$allData ) );
+               $purgeBlobs = true;
+               wfRunHooks( 'LocalisationCacheRecache', array( $this, $code, &$allData, &$purgeBlobs ) );
 
                if ( is_null( $allData['namespaceNames'] ) ) {
                        wfProfileOut( __METHOD__ );
@@ -958,7 +959,7 @@ class LocalisationCache {
                # Clear out the MessageBlobStore
                # HACK: If using a null (i.e. disabled) storage backend, we
                # can't write to the MessageBlobStore either
-               if ( !$this->store instanceof LCStoreNull ) {
+               if ( $purgeBlobs && !$this->store instanceof LCStoreNull ) {
                        MessageBlobStore::clear();
                }
 
@@ -1231,9 +1232,16 @@ class LCStoreDB implements LCStore {
  * See Cdb.php and http://cr.yp.to/cdb.html
  */
 class LCStoreCDB implements LCStore {
+       /** @var CdbReader[] */
        private $readers;
+
+       /** @var CdbWriter */
        private $writer;
+
+       /** @var string Current language code */
        private $currentLang;
+
+       /** @var bool|string Cache directory. False if not set */
        private $directory;
 
        function __construct( $conf = array() ) {