Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/88765
Change subject: Remove deprecated parameter from MimeMagic::guessMimeType() ...................................................................... Remove deprecated parameter from MimeMagic::guessMimeType() All callers in git specify false, which is what we want. Only one extension in SVN used it with true, but that extension never worked anyway. Change-Id: If62ec88c783bfe25af82288f23e7f3008c585e23 --- M includes/MimeMagic.php 1 file changed, 2 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/65/88765/1 diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php index 8220e92..ef4b4e3 100644 --- a/includes/MimeMagic.php +++ b/includes/MimeMagic.php @@ -537,18 +537,9 @@ * based formats like OPC/ODF files). * * @param string $file the file to check - * @param $ext Mixed: the file extension, or true (default) to extract it from the filename. - * Set it to false to ignore the extension. DEPRECATED! Set to false, use - * improveTypeFromExtension($mime, $ext) later to improve mime type. - * * @return string the mime type of $file */ - public function guessMimeType( $file, $ext = true ) { - if ( $ext ) { // TODO: make $ext default to false. Or better, remove it. - wfDebug( __METHOD__ . ": WARNING: use of the \$ext parameter is deprecated. " . - "Use improveTypeFromExtension(\$mime, \$ext) instead.\n" ); - } - + public function guessMimeType( $file ) { $mime = $this->doGuessMimeType( $file, $ext ); if ( !$mime ) { @@ -568,10 +559,9 @@ * Guess the mime type from the file contents. * * @param string $file - * @param mixed $ext * @return bool|string */ - private function doGuessMimeType( $file, $ext ) { // TODO: remove $ext param + private function doGuessMimeType( $file ) { // Read a chunk of the file wfSuppressWarnings(); // @todo FIXME: Shouldn't this be rb? -- To view, visit https://gerrit.wikimedia.org/r/88765 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If62ec88c783bfe25af82288f23e7f3008c585e23 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad <ch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits