return $retVal;
}
- /**
- * Get the stub threshold
- */
- function getStubThreshold() {
- if ( !isset( $this->stubThreshold ) ) {
- $this->stubThreshold = $this->parent->getUser()->getStubThreshold();
- }
- return $this->stubThreshold;
- }
-
/**
* FIXME: update documentation. makeLinkObj() is deprecated.
* Replace <!--LINK--> link placeholders with actual links, in the buffer
wfProfileIn( __METHOD__.'-check' );
$dbr = wfGetDB( DB_SLAVE );
$page = $dbr->tableName( 'page' );
- $threshold = $this->getStubThreshold();
+ $threshold = $this->parent->getOptions()->getStubThreshold();
# Sort by namespace
ksort( $this->internals );
$output = $this->parent->getOutput();
$linkCache = LinkCache::singleton();
$sk = $this->parent->getOptions()->getSkin( $this->parent->mTitle );
- $threshold = $this->getStubThreshold();
+ $threshold = $this->parent->getOptions()->getStubThreshold();
$titlesToBeConverted = '';
$titlesAttrs = array();
var $mNumberHeadings; # Automatically number headings
var $mMath; # User math preference (as integer)
var $mThumbSize; # Thumb size preferred by the user.
+ private $mStubThreshold; # Maximum article size of an article to be marked as "stub"
var $mUserLang; # Language code of the User language.
/**
return $this->mMath; }
function getThumbSize() { $this->optionUsed('thumbsize');
return $this->mThumbSize; }
+ function getStubThreshold() { $this->optionUsed('stubthreshold');
+ return $this->mStubThreshold; }
function getIsPreview() { return $this->mIsPreview; }
function getIsSectionPreview() { return $this->mIsSectionPreview; }
function setMath( $x ) { return wfSetVar( $this->mMath, $x ); }
function setUserLang( $x ) { return wfSetVar( $this->mUserLang, $x ); }
function setThumbSize( $x ) { return wfSetVar( $this->mThumbSize, $x ); }
+ function setStubThreshold( $x ) { return wfSetVar( $this->mStubThreshold, $x ); }
function setPreSaveTransform( $x ) { return wfSetVar( $this->mPreSaveTransform, $x ); }
function setIsPreview( $x ) { return wfSetVar( $this->mIsPreview, $x ); }
$this->mNumberHeadings = $user->getOption( 'numberheadings' );
$this->mMath = $user->getOption( 'math' );
$this->mThumbSize = $user->getOption( 'thumbsize' );
+ $this->mStubThreshold = $user->getStubThreshold();
$this->mUserLang = $wgLang->getCode();
wfProfileOut( __METHOD__ );
// Space assigned for the stubthreshold but unused
// since it disables the parser cache, its value will always
// be 0 when this function is called by parsercache.
- // The conditional is here to avoid a confusing 0
- if ( true || in_array( 'stubthreshold', $forOptions ) )
- $confstr .= '!0' ;
+ if ( in_array( 'stubthreshold', $forOptions ) )
+ $confstr .= '!' . $this->mStubThreshold;
else
$confstr .= '!*' ;