/**#@+
* @private
*/
- var $mOldid, $mNewid, $mTitle;
- var $mOldtitle, $mNewtitle, $mPagetitle;
- var $mOldtext, $mNewtext;
- var $mOldPage, $mNewPage;
- var $mRcidMarkPatrolled;
- var $mOldRev, $mNewRev;
- var $mRevisionsLoaded = false; // Have the revisions been loaded
- var $mTextLoaded = 0; // How many text blobs have been loaded, 0, 1 or 2?
+ private
+ $mNewid,
+ $mNewPage,
+ $mNewRev,
+ $mNewtext,
+ $mNewtitle,
+
+ $mOldid,
+ $mOldPage,
+ $mOldRev,
+ $mOldtext,
+ $mOldtitle,
+
+ $mPagetitle,
+ $mRcidMarkPatrolled,
+ $mRevisionsLoaded = false, // Have the revisions been loaded
+ $mTextLoaded = 0, // How many text blobs have been loaded, 0, 1 or 2?
+ $mTitle;
/**#@-*/
/**
* @subpackage DifferenceEngine
*/
class _DiffOp {
- var $type;
- var $orig;
- var $closing;
+ private
+ $closing,
+ $orig,
+ $type;
function reverse() {
trigger_error('pure virtual', E_USER_ERROR);
* @subpackage DifferenceEngine
*/
class _DiffOp_Copy extends _DiffOp {
- var $type = 'copy';
+ public
+ $type = 'copy';
function _DiffOp_Copy ($orig, $closing = false) {
if (!is_array($closing))
* @subpackage DifferenceEngine
*/
class _DiffOp_Delete extends _DiffOp {
- var $type = 'delete';
+ public $type = 'delete';
function _DiffOp_Delete ($lines) {
$this->orig = $lines;
* @subpackage DifferenceEngine
*/
class _DiffOp_Add extends _DiffOp {
- var $type = 'add';
+ public $type = 'add';
function _DiffOp_Add ($lines) {
$this->closing = $lines;
* @subpackage DifferenceEngine
*/
class _DiffOp_Change extends _DiffOp {
- var $type = 'change';
+ private
+ $type = 'change';
function _DiffOp_Change ($orig, $closing) {
$this->orig = $orig;
*/
class Diff
{
- var $edits;
+ public $edits;
/**
* Constructor.
* This should be left at zero for this class, but subclasses
* may want to set this to other values.
*/
- var $leading_context_lines = 0;
+ public $leading_context_lines = 0;
/**
* Number of trailing context "lines" to preserve.
* This should be left at zero for this class, but subclasses
* may want to set this to other values.
*/
- var $trailing_context_lines = 0;
+ public $trailing_context_lines = 0;
/**
* Format a diff.
*/
class EditPage {
- var $mArticle;
- var $mTitle;
- var $mMetaData = '';
- var $isConflict = false;
- var $isCssJsSubpage = false;
- var $deletedSinceEdit = false;
- var $formtype;
- var $firsttime;
- var $lastDelete;
- var $mTokenOk = true;
- var $tooBig = false;
- var $kblength = false;
- var $missingComment = false;
- var $missingSummary = false;
- var $allowBlankSummary = false;
- var $autoSumm = '';
- var $hookError = '';
+ private
+ $allowBlankSummary = false,
+ $autoSumm = '',
+ $deletedSinceEdit = false,
+ $firsttime,
+ $formtype,
+ $hookError = '',
+ $isConflict = false,
+ $isCssJsSubpage = false,
+ $kblength = false,
+ $lastDelete,
+ $mArticle,
+ $missingComment = false,
+ $missingSummary = false,
+ $mMetaData = '',
+ $mTitle,
+ $mTokenOk = true,
+ $tooBig = false ;
# Form values
- var $save = false, $preview = false, $diff = false;
- var $minoredit = false, $watchthis = false, $recreate = false;
- var $textbox1 = '', $textbox2 = '', $summary = '';
- var $edittime = '', $section = '', $starttime = '';
- var $oldid = 0, $editintro = '', $scrolltop = null;
+ private
+ $diff = false,
+ $editintro = '',
+ $edittime = '',
+ $minoredit = false,
+ $oldid = 0,
+ $preview = false,
+ $recreate = false,
+ $save = false,
+ $scrolltop = null,
+ $section = '',
+ $starttime = '',
+ $summary = '',
+ $textbox1 = '',
+ $textbox2 = '',
+ $watchthis = false ;
/**
* @todo document
$this->watchthis = $request->getCheck( 'wpWatchthis' );
# Don't force edit summaries when a user is editing their own user or talk page
- if( ( $this->mTitle->mNamespace == NS_USER || $this->mTitle->mNamespace == NS_USER_TALK ) && $this->mTitle->getText() == $wgUser->getName() ) {
+ if( ( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) && $this->mTitle->getText() == $wgUser->getName() ) {
$this->allowBlankSummary = true;
} else {
$this->allowBlankSummary = $request->getBool( 'wpIgnoreBlankSummary' );
/**
* @static
*/
- function validTypes() {
+ static function validTypes() {
static $types = array( '', 'block', 'protect', 'rights', 'delete', 'upload', 'move' );
wfRunHooks( 'LogPageValidTypes', array( &$types ) );
return $types;
}
/**
+ * @param $type
* @static
*/
- function isLogType( $type ) {
+ static function isLogType( $type ) {
return in_array( $type, LogPage::validTypes() );
}
/**
+ * @param $type
* @static
*/
- function logName( $type ) {
+ static function logName( $type ) {
static $typeText = array(
'' => 'log',
'block' => 'blocklogpage',
/**
* @static
*/
- function logHeader( $type ) {
+ static function logHeader( $type ) {
static $headerText = array(
'' => 'alllogstext',
'block' => 'blocklogtext',
}
/**
+ * @param $type
+ * @param $action
+ * @param $title (Default: NULL)
+ * @param $skin (Default: NULL)
+ * @param $params (Default: array() )
+ * @param $filterWikilinks (Default: false)
+ * @param $translate (Default: false)
* @static
*/
- function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false, $translate=false ) {
+ static function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false, $translate=false ) {
global $wgLang, $wgContLang;
static $actions = array(
'block/block' => 'blocklogentry',
/**
* Create a blob from a parameter array
+ * @param $params Need documentation.
* @static
*/
- function makeParamBlob( $params ) {
+ static function makeParamBlob( $params ) {
return implode( "\n", $params );
}
* Extract a parameter array from a blob
* @static
*/
- function extractParams( $blob ) {
+ static function extractParams( $blob ) {
if ( $blob === '' ) {
return array();
} else {
private $mDoNothing;
private $mContainsOldMagic, $mContainsNewMagic;
private $mIsArticleRelated;
- private $mParserOptions;
private $mShowFeedLinks = false;
private $mEnableClientCache = true;
private $mArticleBodyOnly = false;
$mPageLinkTitle,
$mCategoryLinks,
$mDebugtext,
- $mBodytext
+ $mBodytext,
+ $mParserOptions // Called in SkinTemplate when using Special::UserLogin
;
/**
*/
class PageHistory {
- var $mArticle, $mTitle, $mSkin;
- var $lastdate;
- var $linesonpage;
- var $mNotificationTimestamp;
- var $mLatestId = null;
+ private
+ $lastdate,
+ $linesonpage,
+ $mArticle,
+ $mLatestId = null,
+ $mNotificationTimestamp,
+ $mSkin,
+ $mTitle ;
/**
* Construct a new PageHistory.
$mNewSection, # Show a new section link?
$mSubtitle, # Additional subtitle
$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
+ $mHTMLtitle, # Display HTML title
+ $mText ; # The output text // public cause its used in ParserCache::save
function ParserOutput( $text = '', $languageLinks = array(), $categoryLinks = array(),
$containsOldMagic = false, $titletext = '' )
// Save the timestamp so that we don't have to load the revision row on view
$parserOutput->mTimestamp = $article->getTimestamp();
-
+
+ #Â FIXME : attempt to access private parserOutput::mText ?
$parserOutput->mText .= "\n<!-- Saved in parser cache with key $key and timestamp $now -->\n";
wfDebug( "Saved in parser cache with key $key and timestamp $now\n" );
*
* @var bool
*/
- var $listoutput = false;
+ private $listoutput = false;
/**
* The offset and limit in use, as passed to the query() function
*
* @var integer
*/
- var $offset = 0;
- var $limit = 0;
+ protected $offset = 0;
+ protected $limit = 0;
/**
* A mutator for $this->listoutput;
* @return string
* @private
*/
- function armorLinksCallback( $matches ) {
+ private static function armorLinksCallback( $matches ) {
return str_replace( ':', ':', $matches[1] );
}
}
class SpecialAllpages {
- var $maxPerPage=960;
- var $topLevelMax=50;
- var $name='Allpages';
- # Determines, which message describes the input field 'nsfrom' (->SpecialPrefixindex.php)
- var $nsfromMsg='allpagesfrom';
+ private
+ $maxPerPage = 960,
+ $name = 'Allpages',
+ # Determines, which message describes the input field 'nsfrom' (->SpecialPrefixindex.php)
+ $nsfromMsg = 'allpagesfrom',
+ $topLevelMax = 50;
/**
* HTML for the top form
* @subpackage SpecialPage
*/
class IPBlockForm {
- var $BlockAddress, $BlockExpiry, $BlockReason;
+ private
+ $BlockAddress,
+ $BlockExpiry,
+ $BlockReason;
function IPBlockForm( $par ) {
global $wgRequest;
/** @package MediaWiki */
class contribs_finder {
- var $username, $offset, $limit, $namespace;
- var $dbr;
+ private
+ $dbr,
+ $limit,
+ $namespace,
+ $offset,
+ $username;
function contribs_finder($username) {
$this->username = $username;
return $rows[count($rows) - 1]->rev_timestamp;
}
- /* private */ function make_sql() {
+ private function make_sql() {
$userCond = $condition = $index = $offsetQuery = '';
extract($this->dbr->tableNames('page', 'revision'));
* @subpackage SpecialPage
*/
class LogReader {
- var $db, $joinClauses, $whereClauses;
- var $type = '', $user = '', $title = null;
+ private
+ $db,
+ $joinClauses,
+ $title = null,
+ $type = '',
+ $user = '',
+ $whereClauses ;
/**
* @param WebRequest $request For internal use use a FauxRequest object to pass arbitrary parameters.
/**
* @var LogReader $reader
*/
- var $reader;
- var $numResults = 0;
+ private
+ $numResults = 0,
+ $reader ;
/**
* @param LogReader &$reader where to get our data from
* @subpackage SpecialPage
*/
class NewPagesPage extends QueryPage {
- var $namespace;
+ private
+ $namespace;
function NewPagesPage( $namespace = NS_MAIN ) {
$this->namespace = $namespace;
* @subpackage SpecialPage
*/
class PreferencesForm {
- var $mQuickbar, $mOldpass, $mNewpass, $mRetypePass, $mStubs;
- var $mRows, $mCols, $mSkin, $mMath, $mDate, $mUserEmail, $mEmailFlag, $mNick;
- var $mUserLanguage, $mUserVariant;
- var $mSearch, $mRecent, $mHourDiff, $mSearchLines, $mSearchChars, $mAction;
- var $mReset, $mPosted, $mToggles, $mSearchNs, $mRealName, $mImageSize;
- var $mUnderline, $mWatchlistEdits;
+
+ private
+ $mAction,
+ $mCols,
+ $mDate,
+ $mEmailFlag,
+ $mHourDiff,
+ $mImageSize,
+ $mMath,
+ $mNewpass,
+ $mNick,
+ $mOldpass,
+ $mPosted,
+ $mQuickbar,
+ $mRealName,
+ $mRecent,
+ $mReset,
+ $mRetypePass,
+ $mRows,
+ $mSearch,
+ $mSearchChars,
+ $mSearchLines,
+ $mSearchNs,
+ $mSkin,
+ $mStubs,
+ $mToggles,
+ $mUnderline,
+ $mUserEmail,
+ $mUserLanguage,
+ $mUserVariant,
+ $mWatchlistEdits ;
/**
* Constructor
* @subpackage SpecialPage
*/
class LoginForm {
- var $mName, $mPassword, $mRetype, $mReturnTo, $mCookieCheck, $mPosted;
- var $mAction, $mCreateaccount, $mCreateaccountMail, $mMailmypassword;
- var $mLoginattempt, $mRemember, $mEmail, $mDomain;
+ private
+ $mAction,
+ $mCookieCheck,
+ $mCreateaccount,
+ $mCreateaccountMail,
+ $mDomain,
+ $mEmail, // Entered user email ??
+ $mLoginattempt,
+ $mMailmypassword,
+ $mName, // Entered username
+ $mPassword, // Entered user password
+ $mPosted,
+ $mRemember, // bool, if user want to be remembered
+ $mReturnTo, // article to return to once logged in
+ $mRetype ;
/**
* Constructor
* @subpackage SpecialPage
*/
class WantedPagesPage extends QueryPage {
- var $nlinks;
+ private $nlinks;
function WantedPagesPage( $inc = false, $nlinks = true ) {
$this->setListoutput( $inc );
* @static
* @access public
*/
- function newFromText( $text, $defaultNamespace = NS_MAIN ) {
+ public static function newFromText( $text, $defaultNamespace = NS_MAIN ) {
global $wgTitleCache;
$fname = 'Title::newFromText';
* @static
* @access public
*/
- function newFromURL( $url ) {
+ public static function newFromURL( $url ) {
global $wgLegalTitleChars;
$t = new Title();
* @return integer|null Database user id (null: if non existent
* @static
*/
- function idFromName( $name ) {
+ public static function idFromName( $name ) {
$fname = "User::idFromName";
$nt = Title::newFromText( $name );