From bbbbb2a90a557638872b686f790ac20c83e5af66 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Thu, 11 May 2006 21:07:41 +0000 Subject: [PATCH] last round of PHP5 stuff for now. --- includes/SpecialBooksources.php | 2 +- includes/SpecialImport.php | 26 ++++++++++++++------------ includes/SpecialListusers.php | 6 ++++-- includes/SpecialUndelete.php | 14 +++++++++++--- includes/User.php | 2 +- 5 files changed, 31 insertions(+), 19 deletions(-) diff --git a/includes/SpecialBooksources.php b/includes/SpecialBooksources.php index 960f622469..a4a899f261 100644 --- a/includes/SpecialBooksources.php +++ b/includes/SpecialBooksources.php @@ -29,7 +29,7 @@ function wfSpecialBooksources( $par ) { * @subpackage SpecialPage */ class BookSourceList { - var $mIsbn; + private $mIsbn; function BookSourceList( $isbn ) { $this->mIsbn = $isbn; diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index 91abcea260..d61b35135c 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -121,14 +121,15 @@ function wfSpecialImport( $page = '' ) { * @subpackage SpecialPage */ class WikiRevision { - var $title = NULL; - var $id = 0; - var $timestamp = "20010115000000"; - var $user = 0; - var $user_text = ""; - var $text = ""; - var $comment = ""; - var $minor = false; + private + $comment = '', + $id = 0, + $minor = false, + $text = '', + $timestamp = '20010115000000', + $title = NULL, + $user = 0, + $user_text = '' ; function setTitle( $text ) { $this->title = Title::newFromText( $text ); @@ -248,10 +249,11 @@ class WikiRevision { * @subpackage SpecialPage */ class WikiImporter { - var $mSource = null; - var $mPageCallback = null; - var $mRevisionCallback = null; - var $lastfield; + private + $lastfield, + $mPageCallback = null, + $mRevisionCallback = null, + $mSource = null ; function WikiImporter( $source ) { $this->setRevisionCallback( array( &$this, "importRevision" ) ); diff --git a/includes/SpecialListusers.php b/includes/SpecialListusers.php index 028665c1b0..a3db1a7f20 100644 --- a/includes/SpecialListusers.php +++ b/includes/SpecialListusers.php @@ -41,8 +41,10 @@ require_once('QueryPage.php'); * @subpackage SpecialPage */ class ListUsersPage extends QueryPage { - var $requestedGroup = ''; - var $requestedUser = ''; + // Variables used by constructor + public + $requestedGroup = '', + $requestedUser = '' ; function getName() { return 'Listusers'; diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index 541d7aac4a..feaaef4481 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -27,7 +27,8 @@ function wfSpecialUndelete( $par ) { * @subpackage SpecialPage */ class PageArchive { - var $title; + public + $title; function PageArchive( &$title ) { if( is_null( $title ) ) { @@ -308,8 +309,15 @@ class PageArchive { * @subpackage SpecialPage */ class UndeleteForm { - var $mAction, $mTarget, $mTimestamp, $mRestore, $mTargetObj; - var $mTargetTimestamp, $mAllowed, $mComment; + private + $mAction, + $mAllowed, + $mComment, + $mRestore, + $mTarget, + $mTargetObj, + $mTargetTimestamp, + $mTimestamp ; function UndeleteForm( &$request, $par = "" ) { global $wgUser; diff --git a/includes/User.php b/includes/User.php index 5879a7e7a9..c6e2252d97 100644 --- a/includes/User.php +++ b/includes/User.php @@ -61,7 +61,7 @@ class User { * @return User * @static */ - function newFromName( $name ) { + static function newFromName( $name ) { # Force usernames to capital global $wgContLang; $name = $wgContLang->ucfirst( $name ); -- 2.20.1