# Persistent:
var $mTagHooks, $mTransparentTagHooks, $mFunctionHooks, $mFunctionSynonyms, $mVariables,
$mImageParams, $mImageParamsMagicArray, $mStripList, $mMarkerSuffix,
- $mExtLinkBracketedRegex, $mPreprocessor;
-
+ $mExtLinkBracketedRegex, $mPreprocessor, $mDefaultStripList;
+
+
# Cleared with clearState():
var $mOutput, $mAutonumber, $mDTopen, $mStripState;
var $mIncludeCount, $mArgStack, $mLastSection, $mInPre;
$this->mTransparentTagHooks = array();
$this->mFunctionHooks = array();
$this->mFunctionSynonyms = array( 0 => array(), 1 => array() );
- $this->mStripList = array( 'nowiki', 'gallery' );
+ $this->mDefaultStripList = $this->mStripList = array( 'nowiki', 'gallery' );
$this->mMarkerSuffix = "-QINU\x7f";
$this->mExtLinkBracketedRegex = '/\[(\b(' . wfUrlProtocols() . ')'.
'[^][<>"\\x00-\\x20\\x7F]+) *([^\]\\x0a\\x0d]*?)\]/S';
return $oldVal;
}
+ /**
+ * Remove all tag hooks
+ */
+ function clearTagHooks() {
+ $this->mTagHooks = array();
+ $this->mStripList = $this->mDefaultStripList;
+ }
+
/**
* Create a function, e.g. {{sum:1|2|3}}
* The callback function should have the form:
$wgUser->setOption('math', MW_MATH_SOURCE);
# Don't generate extension images (e.g. Timeline)
- $wgParser->mTagHooks = array();
+ $wgParser->clearTagHooks();
# Don't generate thumbnail images
$wgUseImageResize = false;
<?php
/**
- * @todo document
* @addtogroup Maintenance
*/
if( isset( $options['help'] ) ) {
echo <<<TEXT
-usage: php refreshLinks.php start [-e end] [-m maxlag] [--help] [possibly other
- stuff]
+Usage: php refreshLinks.php [<start>] [-e <end>] [-m <maxlag>] [--help]
--help : This help message
- --dfn-only : ???
- -m <number> : Specifies max replication lag? Does it abort or wait if this
- is exceeded?
- start : First page id to refresh? Doesn't work with --dfn-only set?
- -e <number> : Last page id to refresh?
-
-This uses wfGetDB() to get the database, it seems not to accept a database ar-
-gument on the command line. So I don't know if you can use it for non-default
-configuration.
-
-Todo: Real documentation.
+ --dfn-only : Delete links from nonexistent articles only
+ -m <number> : Maximum replication lag
+ <start> : First page id to refresh
+ -e <number> : Last page id to refresh
TEXT;
exit(0);
error_reporting( E_ALL & (~E_NOTICE) );
if ( !$options['dfn-only'] ) {
- if ($args[0]) {
+ if ( isset( $args[0] ) ) {
$start = (int)$args[0];
} else {
$start = 1;