From 36dad703d605b534a452767f0fc760ba73dd37fa Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Tue, 15 Jan 2008 15:02:36 +0000 Subject: [PATCH] Adjust some function definitions for abstract classes to stop annoying PHP strict warnings. Also moved some @public notices to the public keyword. --- includes/filerepo/File.php | 17 ++++++----------- includes/media/Generic.php | 4 ++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/includes/filerepo/File.php b/includes/filerepo/File.php index 7e222a0846..ba522ee6c1 100644 --- a/includes/filerepo/File.php +++ b/includes/filerepo/File.php @@ -135,15 +135,13 @@ abstract class File { /** * Return the associated title object - * @public */ - function getTitle() { return $this->title; } + public function getTitle() { return $this->title; } /** * Return the URL of the file - * @public */ - function getUrl() { + public function getUrl() { if ( !isset( $this->url ) ) { $this->url = $this->repo->getZoneUrl( 'public' ) . '/' . $this->getUrlRel(); } @@ -188,10 +186,8 @@ abstract class File { * or in hashed paths like /images/3/3c. * * May return false if the file is not locally accessible. - * - * @public */ - function getPath() { + public function getPath() { if ( !isset( $this->path ) ) { $this->path = $this->repo->getZonePath('public') . '/' . $this->getRel(); } @@ -200,9 +196,8 @@ abstract class File { /** * Alias for getPath() - * @public */ - function getFullPath() { + public function getFullPath() { return $this->getPath(); } @@ -600,7 +595,7 @@ abstract class File { * STUB * Overridden by LocalFile */ - function purgeCache( $archiveFiles = array() ) {} + function purgeCache() {} /** * Purge the file description page, but don't go after @@ -902,7 +897,7 @@ abstract class File { * STUB * Overridden by LocalFile */ - function delete( $reason, $suppress=false ) { + function delete( $reason ) { $this->readOnlyError(); } diff --git a/includes/media/Generic.php b/includes/media/Generic.php index 59506f95ef..b804422e90 100644 --- a/includes/media/Generic.php +++ b/includes/media/Generic.php @@ -191,7 +191,7 @@ abstract class MediaHandler { * to do things like visual indication of grouped and chained streams * in ogg container files. */ - function formatMetadata( $image, $metadata ) { + function formatMetadata( $image ) { return false; } @@ -224,7 +224,7 @@ abstract class MediaHandler { return wfMsg( 'file-info', $sk->formatSize( $file->getSize() ), $file->getMimeType() ); } - function getDimensionsString() { + function getDimensionsString( $file ) { return ''; } -- 2.20.1