From: Aaron Schulz Date: Mon, 7 Nov 2011 20:22:57 +0000 (+0000) Subject: * Use 'new self' instead of hard-coded class name X-Git-Tag: 1.31.0-rc.0~26654 X-Git-Url: http://git.cyclocoop.org/%27.parametre_url%28%20%20%20generer_action_auteur%28%27charger_plugin%27%2C%20%27update_flux%27%29%2C%27update_flux%27%2C%20%27oui%27%29.%27?a=commitdiff_plain;h=7f4a8c8a3564dd22e3f65a0d20f2663447d8a9a9;p=lhc%2Fweb%2Fwiklou.git * Use 'new self' instead of hard-coded class name * Added constructor comment --- diff --git a/includes/filerepo/UnregisteredLocalFile.php b/includes/filerepo/UnregisteredLocalFile.php index f0eeec0816..6a0e0979c9 100644 --- a/includes/filerepo/UnregisteredLocalFile.php +++ b/includes/filerepo/UnregisteredLocalFile.php @@ -32,7 +32,7 @@ class UnregisteredLocalFile extends File { * @return UnregisteredLocalFile */ static function newFromPath( $path, $mime ) { - return new UnregisteredLocalFile( false, false, $path, $mime ); + return new self( false, false, $path, $mime ); } /** @@ -41,10 +41,13 @@ class UnregisteredLocalFile extends File { * @return UnregisteredLocalFile */ static function newFromTitle( $title, $repo ) { - return new UnregisteredLocalFile( $title, $repo, false, false ); + return new self( $title, $repo, false, false ); } /** + * Create an UnregisteredLocalFile based on a path or a (title,repo) pair. + * A FileRepo object is not required here, unlike most other File classes. + * * @throws MWException * @param $title Title|false * @param $repo FSRepo