Replacing var keyword with private / public as we now require PHP5.
authorAntoine Musso <hashar@users.mediawiki.org>
Thu, 11 May 2006 19:10:41 +0000 (19:10 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Thu, 11 May 2006 19:10:41 +0000 (19:10 +0000)
30 files changed:
includes/Article.php
includes/Block.php
includes/CacheManager.php
includes/Database.php
includes/Exif.php
includes/HistoryBlob.php
includes/Image.php
includes/JobQueue.php
includes/LinkBatch.php
includes/LinkCache.php
includes/LinksUpdate.php
includes/LoadBalancer.php
includes/LogPage.php
includes/MagicWord.php
includes/MessageCache.php
includes/OutputPage.php
includes/Parser.php
includes/SearchUpdate.php
includes/SiteConfiguration.php
includes/SiteStatsUpdate.php
includes/Skin.php
includes/SpecialPage.php
includes/SquidUpdate.php
includes/Title.php
includes/User.php
includes/WatchedItem.php
includes/WebRequest.php
includes/Wiki.php
languages/Language.php
languages/Messages.php

index 945f5c5..4d479f1 100644 (file)
@@ -26,30 +26,32 @@ class Article {
        /**@{{
         * @private
         */
-       var $mComment;                  //!<
-       var $mContent;                  //!<
-       var $mContentLoaded;    //!<
-       var $mCounter;                  //!<
-       var $mFileCache;                //!<
-       var $mForUpdate;                //!<
-       var $mGoodAdjustment;   //!<
-       var $mId;                               //!<
-       var $mLatest;                   //!<
-       var $mMinorEdit;                //!<
-       var $mOldId;                    //!<
-       var $mRedirectedFrom;   //!<
-       var $mRedirectUrl;              //!<
-       var $mRevIdFetched;             //!<
-       var $mRevision;                 //!<
-       var $mTable;                    //!<
-       var $mTimestamp;                //!<
-       var $mTitle;                    //!<
-       var $mTotalAdjustment;  //!<
-       var $mTouched;                  //!<
-       var $mUser;                             //!<
-       var $mUserText;                 //!<
+       private $mComment;                      //!<
+       private $mContent;                      //!<
+       private $mContentLoaded;        //!<
+       private $mCounter;                      //!<
+       private $mFileCache;            //!<
+       private $mForUpdate;            //!<
+       private $mGoodAdjustment;       //!<
+       private $mId;                           //!<
+       private $mLatest;                       //!<
+       private $mMinorEdit;            //!<
+       private $mOldId;                        //!<
+       private $mRedirectedFrom;       //!<
+       private $mRedirectUrl;          //!<
+       private $mRevIdFetched;         //!<
+       private $mRevision;                     //!<
+       private $mTable;                        //!<
+       private $mTimestamp;            //!<
+       private $mTotalAdjustment;      //!<
+       private $mUser;                         //!<
+       private $mUserText;                     //!<
        /**@}}*/
 
+       public  $mTitle;                        //!<
+       public  $mTouched;                      //!<
+
+
        /**
         * Constructor and clear the article
         * @param $title Reference to a Title object.
index 42969b6..0a5f044 100644 (file)
@@ -24,9 +24,24 @@ define ( 'EB_RANGE_ONLY', 4 );
  */
 class Block
 {
-       /* public*/ var $mAddress, $mUser, $mBy, $mReason, $mTimestamp, $mAuto, $mId, $mExpiry,
-                           $mRangeStart, $mRangeEnd;
-       /* private */ var $mNetworkBits, $mIntegerAddr, $mForUpdate, $mFromMaster, $mByName;
+       public
+               $mAddress,
+               $mAuto,
+               $mBy,
+               $mExpiry,
+               $mId,
+               $mRangeEnd,
+               $mRangeStart,
+               $mReason,
+               $mTimestamp,
+               $mUser ;
+
+       private
+               $mByName,
+               $mForUpdate,
+               $mFromMaster,
+               $mIntegerAddr,
+               $mNetworkBits ;
 
        function Block( $address = '', $user = '', $by = 0, $reason = '',
                $timestamp = '' , $auto = 0, $expiry = '' )
index 0d116f7..98a16ae 100644 (file)
@@ -24,7 +24,9 @@ require_once( 'Title.php' );
  * @package MediaWiki
  */
 class CacheManager {
-       var $mTitle, $mFileCache;
+       private
+               $mTitle,
+               $mFileCache;
 
        function CacheManager( &$title ) {
                $this->mTitle =& $title;
index 8376f06..4ec9686 100644 (file)
@@ -25,7 +25,7 @@ define( 'DEADLOCK_DELAY_MIN', 500000 );
 define( 'DEADLOCK_DELAY_MAX', 1500000 );
 
 class DBObject {
-       var $mData;
+       private $mData;
 
        function DBObject($data) {
                $this->mData = $data;
@@ -52,17 +52,17 @@ class Database {
        /**#@+
         * @private
         */
-       var $mLastQuery = '';
+       private $mLastQuery = '';
 
-       var $mServer, $mUser, $mPassword, $mConn = null, $mDBname;
-       var $mOut, $mOpened = false;
+       private $mServer, $mUser, $mPassword, $mConn = null, $mDBname;
+       private $mOut, $mOpened = false;
 
-       var $mFailFunction;
-       var $mTablePrefix;
-       var $mFlags;
-       var $mTrxLevel = 0;
-       var $mErrorCount = 0;
-       var $mLBInfo = array();
+       private $mFailFunction;
+       private $mTablePrefix;
+       private $mFlags;
+       private $mTrxLevel = 0;
+       private $mErrorCount = 0;
+       private $mLBInfo = array();
        /**#@-*/
 
 #------------------------------------------------------------------------------
@@ -1795,7 +1795,7 @@ class DatabaseMysql extends Database {
  * @package MediaWiki
  */
 class ResultWrapper {
-       var $db, $result;
+       private $db, $result;
 
        /**
         * @todo document
index 1009688..d51a5f2 100644 (file)
@@ -55,29 +55,29 @@ class Exif {
         * is the value, in the case of more than one possible value type they are
         * seperated by commas.
         */
-       var $mExifTags;
+       private $mExifTags;
 
        /**
         * A one dimentional array of all Exif tags
         */
-       var $mFlatExifTags;
+       private $mFlatExifTags;
 
        /**
         * The raw Exif data returned by exif_read_data()
         */
-       var $mRawExifData;
+       private $mRawExifData;
 
        /**
         * A Filtered version of $mRawExifData that has been pruned of invalid
         * tags and tags that contain content they shouldn't contain according
         * to the Exif specification
         */
-       var $mFilteredExifData;
+       private $mFilteredExifData;
 
        /**
         * Filtered and formatted Exif data, see FormatExif::getFormattedData()
         */
-       var $mFormattedExifData;
+       private $mFormattedExifData;
 
        //@}
 
@@ -89,17 +89,17 @@ class Exif {
        /**
         * The file being processed
         */
-       var $file;
+       private $file;
 
        /**
         * The basename of the file being processed
         */
-       var $basename;
+       private $basename;
 
        /**
         * The private log to log to
         */
-       var $log = 'exif';
+       private $log = 'exif';
 
        //@}
 
@@ -605,7 +605,7 @@ class FormatExif {
         * @var array
         * @private
         */
-       var $mExif;
+       private $mExif;
 
        /**
         * Constructor
index 4dee4da..daa444c 100644 (file)
@@ -52,10 +52,14 @@ class HistoryBlob
  * The real object
  * @package MediaWiki
  */
-class ConcatenatedGzipHistoryBlob extends HistoryBlob
-{
-       /* private */ var $mVersion = 0, $mCompressed = false, $mItems = array(), $mDefaultHash = '';
-       /* private */ var $mFast = 0, $mSize = 0;
+class ConcatenatedGzipHistoryBlob extends HistoryBlob {
+       private
+               $mCompressed = false,
+               $mDefaultHash = '',
+               $mFast = 0,
+               $mItems = array(),
+               $mSize = 0,
+               $mVersion = 0 ;
 
        function ConcatenatedGzipHistoryBlob() {
                if ( !function_exists( 'gzdeflate' ) ) {
@@ -182,7 +186,10 @@ $wgBlobCache = array();
  * @package MediaWiki
  */
 class HistoryBlobStub {
-       var $mOldId, $mHash, $mRef;
+       private
+               $mHash,
+               $mOldId,
+               $mRef;
 
        /** @todo document */
        function HistoryBlobStub( $hash = '', $oldid = 0 ) {
@@ -278,7 +285,8 @@ class HistoryBlobStub {
  * @package MediaWiki
  */
 class HistoryBlobCurStub {
-       var $mCurId;
+       private
+               $mCurId;
 
        /** @todo document */
        function HistoryBlobCurStub( $curid = 0 ) {
index 4547a8c..2fcce3b 100644 (file)
@@ -32,7 +32,8 @@ class Image
        /**#@+
         * @private
         */
-       var     $name,          # name of the image (constructor)
+       private
+               $name,          # name of the image (constructor)
                $imagePath,     # Path of the image (loadFromXxx)
                $url,           # Image URL (accessor)
                $title,         # Title object for this image (constructor)
@@ -51,7 +52,6 @@ class Image
                $dataLoaded,    # Whether or not all this has been loaded from the database (loadFromXxx)
                $lastError;     # Error string associated with a thumbnail display error
 
-
        /**#@-*/
 
        /**
index d589d8c..ebb5d74 100644 (file)
@@ -5,7 +5,8 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 }
 
 class Job {
-       var $command,
+       private
+               $command,
                $title,
                $params,
                $id,
index e0f0f6f..e385ede 100644 (file)
@@ -10,8 +10,9 @@
 class LinkBatch {
        /**
         * 2-d array, first index namespace, second index dbkey, value arbitrary
+        * @todo FIXME should it really be public ?
         */
-       var $data = array();
+       public $data = array();
 
        function LinkBatch( $arr = array() ) {
                foreach( $arr as $item ) {
index 451b3f0..355f157 100644 (file)
 class LinkCache {
        // Increment $mClassVer whenever old serialized versions of this class
        // becomes incompatible with the new version.
-       /* private */ var $mClassVer = 3;
-
-       /* private */ var $mPageLinks;
-       /* private */ var $mGoodLinks, $mBadLinks;
-       /* private */ var $mForUpdate;
+       private
+               $mBadLinks,
+               $mClassVer = 3,
+               $mForUpdate,
+               $mGoodLinks,
+               $mPageLinks ;
 
        /**
         * Get an instance of this class
index bd09502..9375de6 100644 (file)
@@ -13,7 +13,8 @@ class LinksUpdate {
        /**@{{
         * @private
         */
-       var $mId,            //!< Page ID of the article linked from
+       private
+               $mId,            //!< Page ID of the article linked from
                $mTitle,         //!< Title object of the article linked from
                $mLinks,         //!< Map of title strings to IDs for the links in the document
                $mImages,        //!< DB keys of the images used, in the array key only
index 465f3b9..83c0299 100644 (file)
@@ -32,11 +32,23 @@ define( 'AVG_STATUS_POLL', 2000 );
  * @package MediaWiki
  */
 class LoadBalancer {
-       /* private */ var $mServers, $mConnections, $mLoads, $mGroupLoads;
-       /* private */ var $mFailFunction, $mErrorConnection;
-       /* private */ var $mForce, $mReadIndex, $mLastIndex, $mAllowLagged;
-       /* private */ var $mWaitForFile, $mWaitForPos, $mWaitTimeout;
-       /* private */ var $mLaggedSlaveMode, $mLastError = 'Unknown error';
+
+       private
+               $mAllowLagged,
+               $mConnections,
+               $mErrorConnection,
+               $mFailFunction,
+               $mForce,
+               $mGroupLoads,
+               $mLaggedSlaveMode,
+               $mLastError = 'Unknown error',
+               $mLastIndex,
+               $mLoads,
+               $mReadIndex,
+               $mServers,
+               $mWaitForFile,
+               $mWaitForPos,
+               $mWaitTimeout ;
 
        function LoadBalancer()
        {
index 5741e0c..e01ec0b 100644 (file)
@@ -33,9 +33,9 @@
  */
 class LogPage {
        /* @access private */
-       var $type, $action, $comment, $params, $target;
+       private $type, $action, $comment, $params, $target;
        /* @acess public */
-       var $updateRecentChanges;
+       public $updateRecentChanges;
 
        /**
          * Constructor
index 1dfadfe..5a42a7a 100644 (file)
@@ -152,11 +152,21 @@ class MagicWord {
        /**#@+
         * @access private
         */
-       var $mId, $mSynonyms, $mCaseSensitive, $mRegex;
-       var $mRegexStart, $mBaseRegex, $mVariableRegex;
-       var $mModified;
+       private
+               $mBaseRegex,
+               $mModified,
+               $mRegex,
+               $mRegexStart,
+               $mVariableRegex ;
        /**#@-*/
 
+       /** @todo FIXME should they really be public ? */
+       public
+               $mCaseSensitive,
+               $mId,
+               $mSynonyms ;
+
+
        function MagicWord($id = 0, $syn = '', $cs = false) {
                $this->mId = $id;
                $this->mSynonyms = (array)$syn;
index ea7ae52..df66cdd 100644 (file)
@@ -22,11 +22,18 @@ define( 'MSG_WAIT_TIMEOUT', 10);
  * @package MediaWiki
  */
 class MessageCache {
-       var $mCache, $mUseCache, $mDisable, $mExpiry;
-       var $mMemcKey, $mKeys, $mParserOptions, $mParser;
-       var $mExtensionMessages = array();
-       var $mInitialised = false;
-       var $mDeferred = true;
+       private
+               $mCache,
+               $mDeferred = true,
+               $mDisable,
+               $mExpiry,
+               $mExtensionMessages = array(),
+               $mInitialised = false,
+               $mKeys,
+               $mMemcKey,
+               $mParser,
+               $mParserOptions,
+               $mUseCache ;
 
        function initialise( &$memCached, $useDB, $expiry, $memcPrefix) {
                $fname = 'MessageCache::initialise';
index 4b3710d..cb918ac 100644 (file)
@@ -13,24 +13,30 @@ if ( $wgUseTeX )
  * @package MediaWiki
  */
 class OutputPage {
-       var $mHeaders, $mMetatags, $mKeywords;
-       var $mLinktags, $mPagetitle, $mBodytext, $mDebugtext;
-       var $mHTMLtitle, $mRobotpolicy, $mIsarticle, $mPrintable;
-       var $mSubtitle, $mRedirect, $mStatusCode;
-       var $mLastModified, $mETag, $mCategoryLinks;
-       var $mScripts, $mLinkColours, $mPageLinkTitle;
-
-       var $mSuppressQuickbar;
-       var $mOnloadHandler;
-       var $mDoNothing;
-       var $mContainsOldMagic, $mContainsNewMagic;
-       var $mIsArticleRelated;
-       var $mParserOptions;
-       var $mShowFeedLinks = false;
-       var $mEnableClientCache = true;
-       var $mArticleBodyOnly = false;
-       
-       var $mNewSectionLink = false;
+       private $mHeaders, $mMetatags, $mKeywords;
+       private $mLinktags, $mPagetitle;
+       private $mHTMLtitle, $mRobotpolicy, $mIsarticle, $mPrintable;
+       private $mSubtitle, $mRedirect, $mStatusCode;
+       private $mLastModified, $mETag ;
+       private $mScripts, $mLinkColours;
+       private $mSuppressQuickbar;
+       private $mOnloadHandler;
+       private $mDoNothing;
+       private $mContainsOldMagic, $mContainsNewMagic;
+       private $mIsArticleRelated;
+       private $mParserOptions;
+       private $mShowFeedLinks = false;
+       private $mEnableClientCache = true;
+       private $mArticleBodyOnly = false;
+       private $mNewSectionLink = false;
+
+       /** @todo FIXME shouldn't those be private ? */
+       public
+               $mPageLinkTitle,
+               $mCategoryLinks,
+               $mDebugtext,
+               $mBodytext
+       ;
 
        /**
         * Constructor
index 8976971..e07b236 100644 (file)
@@ -93,20 +93,33 @@ class Parser
         * @private
         */
        # Persistent:
-       var $mTagHooks, $mFunctionHooks;
+       private $mTagHooks, $mFunctionHooks;
 
        # Cleared with clearState():
-       var $mOutput, $mAutonumber, $mDTopen, $mStripState = array();
-       var $mVariables, $mIncludeCount, $mArgStack, $mLastSection, $mInPre;
-       var $mInterwikiLinkHolders, $mLinkHolders, $mUniqPrefix;
-       var $mTemplates,        // cache of already loaded templates, avoids
+       private
+               $mArgStack,
+               $mAutonumber,
+               $mDTopen,
+               $mIncludeCount,
+               $mInPre,
+               $mInterwikiLinkHolders,
+               $mLastSection,
+               $mLinkHolders,
+               $mOutput,
+               $mStripState = array(),
+               $mUniqPrefix,
+               $mVariables ;
+
+       private
+               $mTemplates,    // cache of already loaded templates, avoids
                                // multiple SQL queries for the same string
            $mTemplatePath;     // stores an unsorted hash of all the templates already loaded
                                // in this path. Used for loop detection.
 
        # Temporary
        # These are variables reset at least once per parse regardless of $clearState
-       var $mOptions,      // ParserOptions object
+       private
+               $mOptions,      // ParserOptions object
                $mTitle,        // Title context, used for self-link rendering and similar things
                $mOutputType,   // Output type, one of the OT_xxx constants
                $mRevisionId;   // ID to display in {{REVISIONID}} tags
@@ -4077,20 +4090,24 @@ class Parser
  */
 class ParserOutput
 {
-       var $mText,             # The output text
-               $mLanguageLinks,    # List of the full text of language links, in the order they appear
-               $mCategories,       # Map of category names to sort keys
-               $mContainsOldMagic, # Boolean variable indicating if the input contained variables like {{CURRENTDAY}}
+       private
                $mCacheTime,        # Time when this object was generated, or -1 for uncacheable. Used in ParserCache.
-               $mVersion,          # Compatibility check
-               $mTitleText,        # title text of the chosen language variant
-               $mLinks,            # 2-D map of NS/DBK to ID for the links in the document. ID=zero for broken.
-               $mTemplates,        # 2-D map of NS/DBK to ID for the template references. ID=zero for broken.
-               $mImages,           # DB keys of the images used, in the array key only
+               $mCategories,       # Map of category names to sort keys
                $mExternalLinks,    # External link URLs, in the key only
-               $mHTMLtitle,            # Display HTML title
+               $mImages,           # DB keys of the images used, in the array key only
+               $mLanguageLinks,    # List of the full text of language links, in the order they appear
+               $mLinks,            # 2-D map of NS/DBK to ID for the links in the document. ID=zero for broken.
+               $mNewSection,           # Show a new section link?
                $mSubtitle,                     # Additional subtitle
-               $mNewSection;           # Show a new section link?
+               $mTemplates,        # 2-D map of NS/DBK to ID for the template references. ID=zero for broken.
+               $mText,             # The output text
+               $mTitleText,        # title text of the chosen language variant
+               $mVersion ;         # Compatibility check
+
+       /** @todo FIXME should those be public ? */
+       public
+               $mContainsOldMagic, # Boolean variable indicating if the input contained variables like {{CURRENTDAY}}
+               $mHTMLtitle ;           # Display HTML title
 
        function ParserOutput( $text = '', $languageLinks = array(), $categoryLinks = array(),
                $containsOldMagic = false, $titletext = '' )
@@ -4187,18 +4204,19 @@ class ParserOutput
 class ParserOptions
 {
        # All variables are private
-       var $mUseTeX;                    # Use texvc to expand <math> tags
-       var $mUseDynamicDates;           # Use DateFormatter to format dates
-       var $mInterwikiMagic;            # Interlanguage links are removed and returned in an array
-       var $mAllowExternalImages;       # Allow external images inline
-       var $mAllowExternalImagesFrom;   # If not, any exception?
-       var $mSkin;                      # Reference to the preferred skin
-       var $mDateFormat;                # Date format index
-       var $mEditSection;               # Create "edit section" links
-       var $mNumberHeadings;            # Automatically number headings
-       var $mAllowSpecialInclusion;     # Allow inclusion of special pages
-       var $mTidy;                      # Ask for tidy cleanup
-       var $mInterfaceMessage;          # Which lang to call for PLURAL and GRAMMAR
+       private
+               $mAllowExternalImages,       # Allow external images inline
+               $mAllowExternalImagesFrom,   # If not, any exception?
+               $mAllowSpecialInclusion,     # Allow inclusion of special pages
+               $mDateFormat,                # Date format index
+               $mEditSection,               # Create "edit section" links
+               $mInterfaceMessage,          # Which lang to call for PLURAL and GRAMMAR
+               $mInterwikiMagic,            # Interlanguage links are removed and returned in an array
+               $mNumberHeadings,            # Automatically number headings
+               $mSkin,                      # Reference to the preferred skin
+               $mTidy,                      # Ask for tidy cleanup
+               $mUseDynamicDates,           # Use DateFormatter to format dates
+               $mUseTeX ;                   # Use texvc to expand <math> tags
 
        function getUseTeX()                        { return $this->mUseTeX; }
        function getUseDynamicDates()               { return $this->mUseDynamicDates; }
index 1f222b3..135d9f0 100644 (file)
  */
 class SearchUpdate {
 
-       /* private */ var $mId = 0, $mNamespace, $mTitle, $mText;
-       /* private */ var $mTitleWords;
+       private
+               $mId = 0,
+               $mNamespace,
+               $mTitle,
+               $mText,
+               $mTitleWords;
 
        function SearchUpdate( $id, $title, $text = false ) {
                $nt = Title::newFromText( $title );
index 8fd5d6b..293de95 100644 (file)
@@ -15,10 +15,10 @@ define('SITE_CONFIGURATION', 1);
 
 /** @package MediaWiki */
 class SiteConfiguration {
-       var $suffixes = array();
-       var $wikis = array();
-       var $settings = array();
-       var $localVHosts = array();
+       private $suffixes = array();
+       private $wikis = array();
+       private $settings = array();
+       private $localVHosts = array();
 
        /** */
        function get( $setting, $wiki, $suffix, $params = array() ) {
index 1b6d380..112ab2c 100644 (file)
@@ -11,7 +11,7 @@
  */
 class SiteStatsUpdate {
 
-       var $mViews, $mEdits, $mGood, $mPages, $mUsers;
+       private $mViews, $mEdits, $mGood, $mPages, $mUsers;
 
        function SiteStatsUpdate( $views, $edits, $good, $pages = 0, $users = 0 ) {
                $this->mViews = $views;
index d1be56e..eeffd3e 100644 (file)
@@ -39,10 +39,12 @@ class Skin extends Linker {
        /**#@+
         * @private
         */
-       var $lastdate, $lastline;
-       var $rc_cache ; # Cache for Enhanced Recent Changes
-       var $rcCacheIndex ; # Recent Changes Cache Counter for visibility toggle
-       var $rcMoveIndex;
+       private
+               $lastdate,
+               $lastline,
+               $rc_cache,     # Cache for Enhanced Recent Changes
+               $rcCacheIndex, # Recent Changes Cache Counter for visibility toggle
+               $rcMoveIndex;
        /**#@-*/
 
        /** Constructor, call parent constructor */
index bf6c745..b061598 100644 (file)
@@ -109,33 +109,32 @@ class SpecialPage
         * The name of the class, used in the URL.
         * Also used for the default <h1> heading, @see getDescription()
         */
-       var $mName;
+       private $mName;
        /**
         * Minimum user level required to access this page, or "" for anyone.
         * Also used to categorise the pages in Special:Specialpages
         */
-       var $mRestriction;
+       private $mRestriction;
        /**
         * Listed in Special:Specialpages?
         */
-       var $mListed;
+       private $mListed;
        /**
         * Function name called by the default execute()
         */
-       var $mFunction;
+       private $mFunction;
        /**
         * File which needs to be included before the function above can be called
         */
-       var $mFile;
+       private $mFile;
        /**
         * Whether or not this special page is being included from an article
         */
-       var $mIncluding;
+       private $mIncluding;
        /**
         * Whether the special page can be included in an article
         */
-       var $mIncludable;
-
+       private $mIncludable;
 
        /**#@-*/
 
index dba47c5..680b0f4 100644 (file)
@@ -9,7 +9,8 @@
  * @package MediaWiki
  */
 class SquidUpdate {
-       var $urlArr, $mMaxTitles;
+       public $urlArr;  // FIXME : is it really public ?
+       private $mMaxTitles;
 
        function SquidUpdate( $urlArr = Array(), $maxTitles = false ) {
                global $wgMaxSquidPurgeTitles;
index 3197b46..c23e0bf 100644 (file)
@@ -37,23 +37,24 @@ class Title {
         * @access private
         */
 
-       var $mTextform;           # Text form (spaces not underscores) of the main part
-       var $mUrlform;            # URL-encoded form of the main part
-       var $mDbkeyform;          # Main part with underscores
-       var $mNamespace;          # Namespace index, i.e. one of the NS_xxxx constants
-       var $mInterwiki;          # Interwiki prefix (or null string)
-       var $mFragment;           # Title fragment (i.e. the bit after the #)
-       var $mArticleID;          # Article ID, fetched from the link cache on demand
-       var $mLatestID;         # ID of most recent revision
-       var $mRestrictions;       # Array of groups allowed to edit this article
+       private $mTextform;           # Text form (spaces not underscores) of the main part
+       private $mUrlform;            # URL-encoded form of the main part
+       private $mDbkeyform;          # Main part with underscores
+       private $mNamespace;          # Namespace index, i.e. one of the NS_xxxx constants
+       private $mInterwiki;          # Interwiki prefix (or null string)
+       private $mFragment;           # Title fragment (i.e. the bit after the #)
+       private $mLatestID;         # ID of most recent revision
+       private $mRestrictions;       # Array of groups allowed to edit this article
                                # Only null or "sysop" are supported
-       var $mRestrictionsLoaded; # Boolean for initialisation on demand
-       var $mPrefixedText;       # Text form including namespace/interwiki, initialised on demand
-       var $mDefaultNamespace;   # Namespace index when there is no namespace
+       private $mPrefixedText;       # Text form including namespace/interwiki, initialised on demand
+       private $mDefaultNamespace;   # Namespace index when there is no namespace
                            # Zero except in {{transclusion}} tags
-       var $mWatched;      # Is $wgUser watching this page? NULL if unfilled, accessed through userIsWatching()
+       private $mWatched;      # Is $wgUser watching this page? NULL if unfilled, accessed through userIsWatching()
        /**#@-*/
 
+       /** @todo FIXME should those be public ? */
+       public  $mArticleID;          # Article ID, fetched from the link cache on demand
+       public  $mRestrictionsLoaded; # Boolean for initialisation on demand
 
        /**
         * Constructor
@@ -1242,6 +1243,23 @@ class Title {
                return (int)$n;
        }
 
+       /**
+        * Used to grab from the logging facility the date at wich the
+        * article got deleted. For special pages and article that never
+        * got deleted, return 0.
+        * @return date when the title got deleted
+        */
+       function getDeletedDate() {
+               $fname = 'Title::getLastDelete';
+               if( $this->getNamespace() < 0 or !$this->isDeleted() ) {
+                       $n = 0;
+               } else {
+                       $dbr =& wfGetDB( DB_SLAVE );
+                       $n = $dbr->selectField( 'logging', 'MAX(log_timestamp)', array( 'log_namespace' => $this->getNamespace(),
+                               'log_title' => $this->getDBkey() ), $fname );
+               }
+               return $n;
+       }
        /**
         * Get the article ID for this Title from the link cache,
         * adding it if necessary
index cb6a6de..5d6e2e8 100644 (file)
@@ -27,26 +27,26 @@ class User {
        /**@{{
         * @private
         */
-       var $mBlockedby;        //!<
-       var $mBlockreason;      //!<
-       var $mDataLoaded;       //!<
-       var $mEmail;            //!<
-       var $mEmailAuthenticated; //!<
-       var $mGroups;           //!<
-       var $mHash;                     //!<
-       var $mId;                       //!<
-       var $mName;                     //!<
-       var $mNewpassword;      //!<
-       var $mNewtalk;          //!<
-       var $mOptions;          //!<
-       var $mPassword;         //!<
-       var $mRealName;         //!<
-       var $mRegistration;     //!<
-       var $mRights;           //!<
-       var $mSkin;                     //!<
-       var $mToken;            //!<
-       var $mTouched;          //!<
-       var $mVersion;          //!< serialized version
+       private $mBlockedby;    //!<
+       private $mBlockreason;  //!<
+       private $mDataLoaded;   //!<
+       private $mEmail;                //!<
+       private $mEmailAuthenticated; //!<
+       private $mGroups;               //!<
+       private $mHash;                 //!<
+       private $mId;                   //!<
+       private $mName;                 //!<
+       private $mNewpassword;  //!<
+       private $mNewtalk;              //!<
+       private $mOptions;              //!<
+       private $mPassword;             //!<
+       private $mRealName;             //!<
+       private $mRegistration; //!<
+       private $mRights;               //!<
+       private $mSkin;                 //!<
+       private $mToken;                //!<
+       private $mTouched;              //!<
+       private $mVersion;              //!< serialized version
        /**@}} */
 
        /** Constructor using User:loadDefaults() */
index 3885bb9..2697a19 100644 (file)
@@ -9,7 +9,9 @@
  * @package MediaWiki
  */
 class WatchedItem {
-       var $mTitle, $mUser;
+       private
+               $mTitle,
+               $mUser;
 
        /**
         * Create a WatchedItem object with the given user and title
index 736e215..f4b0294 100644 (file)
@@ -445,8 +445,9 @@ class WebRequest {
  * @package MediaWiki
  */
 class FauxRequest extends WebRequest {
-       var $data = null;
-       var $wasPosted = false;
+       private
+               $data = null,
+               $wasPosted = false ;
 
        function FauxRequest( $data, $wasPosted = false ) {
                if( is_array( $data ) ) {
index be3a8b4..0938bd7 100644 (file)
@@ -5,8 +5,8 @@
 
 class MediaWiki {
 
-       var $GET; /* Stores the $_GET variables at time of creation, can be changed */
-       var $params = array();
+       public $GET; /* Stores the $_GET variables at time of creation, can be changed */
+       public $params = array();
        
        /**
         * Constructor
index 17b5d12..9f70456 100644 (file)
@@ -290,7 +290,7 @@ if (!$wgCachedMessageArrays) {
 
 /* a fake language converter */
 class fakeConverter {
-       var $mLang;
+       private $mLang;
        function fakeConverter($langobj) {$this->mLang = $langobj;}
        function convert($t, $i) {return $t;}
        function parserConvert($t, $p) {return $t;}
@@ -309,7 +309,7 @@ class fakeConverter {
 #--------------------------------------------------------------------------
 
 class Language {
-       var $mConverter;
+       private $mConverter;
        function Language() {
 
                # Copies any missing values in the specified arrays from En to the current language
index fa4908b..1f25938 100644 (file)
@@ -503,6 +503,8 @@ If you are here by mistake, just click your browser's '''back''' button.",
 'anontalkpagetext' => "----''This is the discussion page for an anonymous user who has not created an account yet or who does not use it. We therefore have to use the numerical [[IP address]] to identify him/her. Such an IP address can be shared by several users. If you are an anonymous user and feel that irrelevant comments have been directed at you, please [[Special:Userlogin|create an account or log in]] to avoid future confusion with other anonymous users.''",
 'noarticletext' => 'There is currently no text in this page, you can [[{{ns:special}}:Search/{{PAGENAME}}|search for this page title]] in other pages or [{{fullurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} edit this page].',
 'noarticletextanon' => '{{int:noarticletext}}',
+'noarticletextdeleted' => 'There is currently no text in this page, you can [[{{ns:special}}:Search/{{PAGENAME}}|search for this page title]] in other pages or [{{fullurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} edit this page].',
+'noarticletextdeletedanon' => '{{int:noarticletext}}',
 'clearyourcache' => "'''Note:''' After saving, you may have to bypass your browser's cache to see the changes. '''Mozilla / Firefox / Safari:''' hold down ''Shift'' while clicking ''Reload'', or press ''Ctrl-Shift-R'' (''Cmd-Shift-R'' on Apple Mac); '''IE:''' hold ''Ctrl'' while clicking ''Refresh'', or press ''Ctrl-F5''; '''Konqueror:''': simply click the ''Reload'' button, or press ''F5''; '''Opera''' users may need to completely clear their cache in ''Tools&rarr;Preferences''.",
 'usercssjsyoucanpreview' => '<strong>Tip:</strong> Use the \'Show preview\' button to test your new CSS/JS before saving.',
 'usercsspreview' => '\'\'\'Remember that you are only previewing your user CSS, it has not yet been saved!\'\'\'',