From: Kunal Mehta Date: Wed, 11 Feb 2015 00:31:26 +0000 (-0800) Subject: registration: Remove unused ExtensionRegistry::loadInfoFromFile() X-Git-Tag: 1.31.0-rc.0~12457^2 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=3fdc7709914125e2dc5cc1b5acb0898e6e3dd080;p=lhc%2Fweb%2Fwiklou.git registration: Remove unused ExtensionRegistry::loadInfoFromFile() Nothing calls this, I think it was left over from an earlier implementation that did. Change-Id: I6dd41066e040d90c8f2baa1eaf3ac3aef14b6385 --- diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php index 44855d8ef4..4605ca52a5 100644 --- a/includes/registration/ExtensionRegistry.php +++ b/includes/registration/ExtensionRegistry.php @@ -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; - } }