summaryrefslogtreecommitdiff
path: root/includes/parser/ParserOptions.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/parser/ParserOptions.php')
-rw-r--r--includes/parser/ParserOptions.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php
index 330ec446..5b8cd3ee 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -13,6 +13,7 @@ class ParserOptions
var $mInterwikiMagic; # Interlanguage links are removed and returned in an array
var $mAllowExternalImages; # Allow external images inline
var $mAllowExternalImagesFrom; # If not, any exception?
+ var $mEnableImageWhitelist; # If not or it doesn't match, should we check an on-wiki whitelist?
var $mSkin; # Reference to the preferred skin
var $mDateFormat; # Date format index
var $mEditSection; # Create "edit section" links
@@ -29,6 +30,7 @@ class ParserOptions
var $mTemplateCallback; # Callback for template fetching
var $mEnableLimitReport; # Enable limit report in an HTML comment on output
var $mTimestamp; # Timestamp used for {{CURRENTDAY}} etc.
+ var $mExternalLinkTarget; # Target attribute for external links
var $mUser; # Stored user object, just used to initialise the skin
@@ -37,6 +39,7 @@ class ParserOptions
function getInterwikiMagic() { return $this->mInterwikiMagic; }
function getAllowExternalImages() { return $this->mAllowExternalImages; }
function getAllowExternalImagesFrom() { return $this->mAllowExternalImagesFrom; }
+ function getEnableImageWhitelist() { return $this->mEnableImageWhitelist; }
function getEditSection() { return $this->mEditSection; }
function getNumberHeadings() { return $this->mNumberHeadings; }
function getAllowSpecialInclusion() { return $this->mAllowSpecialInclusion; }
@@ -49,6 +52,8 @@ class ParserOptions
function getRemoveComments() { return $this->mRemoveComments; }
function getTemplateCallback() { return $this->mTemplateCallback; }
function getEnableLimitReport() { return $this->mEnableLimitReport; }
+ function getCleanSignatures() { return $this->mCleanSignatures; }
+ function getExternalLinkTarget() { return $this->mExternalLinkTarget; }
function getSkin() {
if ( !isset( $this->mSkin ) ) {
@@ -76,6 +81,7 @@ class ParserOptions
function setInterwikiMagic( $x ) { return wfSetVar( $this->mInterwikiMagic, $x ); }
function setAllowExternalImages( $x ) { return wfSetVar( $this->mAllowExternalImages, $x ); }
function setAllowExternalImagesFrom( $x ) { return wfSetVar( $this->mAllowExternalImagesFrom, $x ); }
+ function setEnableImageWhitelist( $x ) { return wfSetVar( $this->mEnableImageWhitelist, $x ); }
function setDateFormat( $x ) { return wfSetVar( $this->mDateFormat, $x ); }
function setEditSection( $x ) { return wfSetVar( $this->mEditSection, $x ); }
function setNumberHeadings( $x ) { return wfSetVar( $this->mNumberHeadings, $x ); }
@@ -91,6 +97,8 @@ class ParserOptions
function setTemplateCallback( $x ) { return wfSetVar( $this->mTemplateCallback, $x ); }
function enableLimitReport( $x = true ) { return wfSetVar( $this->mEnableLimitReport, $x ); }
function setTimestamp( $x ) { return wfSetVar( $this->mTimestamp, $x ); }
+ function setCleanSignatures( $x ) { return wfSetVar( $this->mCleanSignatures, $x ); }
+ function setExternalLinkTarget( $x ) { return wfSetVar( $this->mExternalLinkTarget, $x ); }
function __construct( $user = null ) {
$this->initialiseFromUser( $user );
@@ -107,8 +115,9 @@ class ParserOptions
/** Get user options */
function initialiseFromUser( $userInput ) {
global $wgUseTeX, $wgUseDynamicDates, $wgInterwikiMagic, $wgAllowExternalImages;
- global $wgAllowExternalImagesFrom, $wgAllowSpecialInclusion, $wgMaxArticleSize;
- global $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth;
+ global $wgAllowExternalImagesFrom, $wgEnableImageWhitelist, $wgAllowSpecialInclusion, $wgMaxArticleSize;
+ global $wgMaxPPNodeCount, $wgMaxTemplateDepth, $wgMaxPPExpandDepth, $wgCleanSignatures;
+ global $wgExternalLinkTarget;
$fname = 'ParserOptions::initialiseFromUser';
wfProfileIn( $fname );
if ( !$userInput ) {
@@ -129,6 +138,7 @@ class ParserOptions
$this->mInterwikiMagic = $wgInterwikiMagic;
$this->mAllowExternalImages = $wgAllowExternalImages;
$this->mAllowExternalImagesFrom = $wgAllowExternalImagesFrom;
+ $this->mEnableImageWhitelist = $wgEnableImageWhitelist;
$this->mSkin = null; # Deferred
$this->mDateFormat = null; # Deferred
$this->mEditSection = true;
@@ -144,6 +154,8 @@ class ParserOptions
$this->mRemoveComments = true;
$this->mTemplateCallback = array( 'Parser', 'statelessFetchTemplate' );
$this->mEnableLimitReport = false;
+ $this->mCleanSignatures = $wgCleanSignatures;
+ $this->mExternalLinkTarget = $wgExternalLinkTarget;
wfProfileOut( $fname );
}
}