E_STRICT fixlets: properly mark some static methods as static
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 2 May 2007 15:36:17 +0000 (15:36 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 2 May 2007 15:36:17 +0000 (15:36 +0000)
Also removed a few obsolete object references

includes/Image.php
includes/SquidUpdate.php
includes/WatchedItem.php

index 417d2a8..274661a 100644 (file)
@@ -732,9 +732,8 @@ class Image
         * @param boolean $fromSharedDirectory  Should this be in $wgSharedUploadPath?
         * @return string URL of $name image
         * @public
-        * @static
         */
-       function imageUrl( $name, $fromSharedDirectory = false ) {
+       static function imageUrl( $name, $fromSharedDirectory = false ) {
                global $wgUploadPath,$wgUploadBaseUrl,$wgSharedUploadPath;
                if($fromSharedDirectory) {
                        $base = '';
@@ -1210,7 +1209,6 @@ class Image
 
        /**
         * @return bool
-        * @static
         */
        public static function isHashed( $shared ) {
                global $wgHashedUploadDirectory, $wgHashedSharedUploadDirectory;
index 700fc8e..78cac61 100644 (file)
@@ -22,7 +22,7 @@ class SquidUpdate {
                $this->urlArr = $urlArr;
        }
 
-       /* static */ function newFromLinksTo( &$title ) {
+       static function newFromLinksTo( &$title ) {
                $fname = 'SquidUpdate::newFromLinksTo';
                wfProfileIn( $fname );
 
@@ -49,7 +49,7 @@ class SquidUpdate {
                return new SquidUpdate( $blurlArr );
        }
 
-       /* static */ function newFromTitles( &$titles, $urlArr = array() ) {
+       static function newFromTitles( &$titles, $urlArr = array() ) {
                global $wgMaxSquidPurgeTitles;
                if ( count( $titles ) > $wgMaxSquidPurgeTitles ) {
                        $titles = array_slice( $titles, 0, $wgMaxSquidPurgeTitles );
@@ -60,7 +60,7 @@ class SquidUpdate {
                return new SquidUpdate( $urlArr );
        }
 
-       /* static */ function newSimplePurge( &$title ) {
+       static function newSimplePurge( &$title ) {
                $urlArr = $title->getSquidURLs();
                return new SquidUpdate( $urlArr );
        }
@@ -74,7 +74,7 @@ class SquidUpdate {
        (example: $urlArr[] = 'http://my.host/something')
        XXX report broken Squids per mail or log */
 
-       /* static */ function purge( $urlArr ) {
+       static function purge( $urlArr ) {
                global $wgSquidServers, $wgHTCPMulticastAddress, $wgHTCPPort;
 
                /*if ( (@$wgSquidServers[0]) == 'echo' ) {
@@ -189,7 +189,7 @@ class SquidUpdate {
                wfProfileOut( $fname );
        }
 
-       /* static */ function HTCPPurge( $urlArr ) {
+       static function HTCPPurge( $urlArr ) {
                global $wgHTCPMulticastAddress, $wgHTCPMulticastTTL, $wgHTCPPort;
                $fname = 'SquidUpdate::HTCPPurge';
                wfProfileIn( $fname );
index b0376e3..77b9642 100644 (file)
@@ -14,10 +14,10 @@ class WatchedItem {
         * @todo document
         * @access private
         */
-       function &fromUserTitle( &$user, &$title ) {
+       static function fromUserTitle( $user, $title ) {
                $wl = new WatchedItem;
-               $wl->mUser =& $user;
-               $wl->mTitle =& $title;
+               $wl->mUser = $user;
+               $wl->mTitle = $title;
                $wl->id = $user->getId();
 # Patch (also) for email notification on page changes T.Gries/M.Arndt 11.09.2004
 # TG patch: here we do not consider pages and their talk pages equivalent - why should we ?
@@ -116,18 +116,13 @@ class WatchedItem {
         *
         * @param Title $ot Page title to duplicate entries from, if present
         * @param Title $nt Page title to add watches on
-        * @static
         */
-       function duplicateEntries( $ot, $nt ) {
+       static function duplicateEntries( $ot, $nt ) {
                WatchedItem::doDuplicateEntries( $ot->getSubjectPage(), $nt->getSubjectPage() );
                WatchedItem::doDuplicateEntries( $ot->getTalkPage(), $nt->getTalkPage() );
        }
 
-       /**
-        * @static
-        * @access private
-        */
-       function doDuplicateEntries( $ot, $nt ) {
+       private static function doDuplicateEntries( $ot, $nt ) {
                $fname = "WatchedItem::duplicateEntries";
                $oldnamespace = $ot->getNamespace();
                $newnamespace = $nt->getNamespace();