registration: Remove unused ExtensionRegistry::loadInfoFromFile()
authorKunal Mehta <legoktm@gmail.com>
Wed, 11 Feb 2015 00:31:26 +0000 (16:31 -0800)
committerKunal Mehta <legoktm@gmail.com>
Wed, 11 Feb 2015 00:31:26 +0000 (16:31 -0800)
Nothing calls this, I think it was left over from an earlier implementation
that did.

Change-Id: I6dd41066e040d90c8f2baa1eaf3ac3aef14b6385

includes/registration/ExtensionRegistry.php

index 44855d8..4605ca5 100644 (file)
@@ -232,29 +232,4 @@ class ExtensionRegistry {
                        return array();
                }
        }
-
-       /**
-        * @param string $filename absolute path to the JSON file
-        * @param int $mtime modified time of the file
-        * @return array
-        */
-       protected function loadInfoFromFile( $filename, $mtime ) {
-               $key = wfMemcKey( 'registry', md5( $filename ) );
-               $cached = $this->cache->get( $key );
-               if ( isset( $cached['mtime'] ) && $cached['mtime'] === $mtime ) {
-                       return $cached['info'];
-               }
-
-               $contents = file_get_contents( $filename );
-               $json = json_decode( $contents, /* $assoc = */ true );
-               if ( is_array( $json ) ) {
-                       $this->cache->set( $key, array( 'mtime' => $mtime, 'info' => $json ) );
-               } else {
-                       // Don't throw an error here, but don't cache it either.
-                       // @todo log somewhere?
-                       $json = array();
-               }
-
-               return $json;
-       }
 }