From 3fdc7709914125e2dc5cc1b5acb0898e6e3dd080 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 10 Feb 2015 16:31:26 -0800 Subject: [PATCH] registration: Remove unused ExtensionRegistry::loadInfoFromFile() Nothing calls this, I think it was left over from an earlier implementation that did. Change-Id: I6dd41066e040d90c8f2baa1eaf3ac3aef14b6385 --- includes/registration/ExtensionRegistry.php | 25 --------------------- 1 file changed, 25 deletions(-) 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; - } } -- 2.20.1