r29791 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29790‎ | r29791 | r29792 >
Date:15:02, 15 January 2008
Author:simetrical
Status:old
Tags:
Comment:
Adjust some function definitions for abstract classes to stop annoying PHP strict warnings. Also moved some @public notices to the public keyword.
Modified paths:
  • /trunk/phase3/includes/filerepo/File.php (modified) (history)
  • /trunk/phase3/includes/media/Generic.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/File.php
@@ -135,15 +135,13 @@
136136
137137 /**
138138 * Return the associated title object
139 - * @public
140139 */
141 - function getTitle() { return $this->title; }
 140+ public function getTitle() { return $this->title; }
142141
143142 /**
144143 * Return the URL of the file
145 - * @public
146144 */
147 - function getUrl() {
 145+ public function getUrl() {
148146 if ( !isset( $this->url ) ) {
149147 $this->url = $this->repo->getZoneUrl( 'public' ) . '/' . $this->getUrlRel();
150148 }
@@ -188,10 +186,8 @@
189187 * or in hashed paths like /images/3/3c.
190188 *
191189 * May return false if the file is not locally accessible.
192 - *
193 - * @public
194190 */
195 - function getPath() {
 191+ public function getPath() {
196192 if ( !isset( $this->path ) ) {
197193 $this->path = $this->repo->getZonePath('public') . '/' . $this->getRel();
198194 }
@@ -200,9 +196,8 @@
201197
202198 /**
203199 * Alias for getPath()
204 - * @public
205200 */
206 - function getFullPath() {
 201+ public function getFullPath() {
207202 return $this->getPath();
208203 }
209204
@@ -600,7 +595,7 @@
601596 * STUB
602597 * Overridden by LocalFile
603598 */
604 - function purgeCache( $archiveFiles = array() ) {}
 599+ function purgeCache() {}
605600
606601 /**
607602 * Purge the file description page, but don't go after
@@ -902,7 +897,7 @@
903898 * STUB
904899 * Overridden by LocalFile
905900 */
906 - function delete( $reason, $suppress=false ) {
 901+ function delete( $reason ) {
907902 $this->readOnlyError();
908903 }
909904
Index: trunk/phase3/includes/media/Generic.php
@@ -191,7 +191,7 @@
192192 * to do things like visual indication of grouped and chained streams
193193 * in ogg container files.
194194 */
195 - function formatMetadata( $image, $metadata ) {
 195+ function formatMetadata( $image ) {
196196 return false;
197197 }
198198
@@ -224,7 +224,7 @@
225225 return wfMsg( 'file-info', $sk->formatSize( $file->getSize() ), $file->getMimeType() );
226226 }
227227
228 - function getDimensionsString() {
 228+ function getDimensionsString( $file ) {
229229 return '';
230230 }
231231

Status & tagging log