$mLinks = array(), # 2-D map of NS/DBK to ID for the links in the document. ID=zero for broken.
$mTemplates = array(), # 2-D map of NS/DBK to ID for the template references. ID=zero for broken.
$mTemplateIds = array(), # 2-D map of NS/DBK to rev ID for the template references. ID=zero for broken.
- $mDistantTemplates = array(), # 3-D map of WIKIID/NS/DBK to ID for the template references. ID=zero for broken.
- $mDistantTemplateIds = array(), # 3-D map of WIKIID/NS/DBK to rev ID for the template references. ID=zero for broken.
$mImages = array(), # DB keys of the images used, in the array key only
- $mImageTimeKeys = array(), # DB keys of the images used mapped to sha1 and MW timestamp
+ $mFileSearchOptions = array(), # DB keys of the images used mapped to sha1 and MW timestamp
$mExternalLinks = array(), # External link URLs, in the key only
$mInterwikiLinks = array(), # 2-D map of prefix/DBK (in keys only) for the inline interwiki links in the document.
$mNewSection = false, # Show a new section link?
return preg_replace_callback( ParserOutput::EDITSECTION_REGEX,
array( &$this, 'replaceEditSectionLinksCallback' ), $this->mText );
}
- return $this->mText;
+ return preg_replace( ParserOutput::EDITSECTION_REGEX, '', $this->mText );
}
/**
function getEditSectionTokens() { return $this->mEditSectionTokens; }
function &getLinks() { return $this->mLinks; }
function &getTemplates() { return $this->mTemplates; }
- function &getDistantTemplates() { return $this->mDistantTemplates; }
- function &getDistantTemplateIds() { return $this->mDistantTemplateIds; }
function &getTemplateIds() { return $this->mTemplateIds; }
function &getImages() { return $this->mImages; }
- function &getImageTimeKeys() { return $this->mImageTimeKeys; }
+ function &getFileSearchOptions() { return $this->mFileSearchOptions; }
function &getExternalLinks() { return $this->mExternalLinks; }
function getNoGallery() { return $this->mNoGallery; }
function getHeadItems() { return $this->mHeadItems; }
function addImage( $name, $timestamp = null, $sha1 = null ) {
$this->mImages[$name] = 1;
if ( $timestamp !== null && $sha1 !== null ) {
- $this->mImageTimeKeys[$name] = array( 'time' => $timestamp, 'sha1' => $sha1 );
+ $this->mFileSearchOptions[$name] = array( 'time' => $timestamp, 'sha1' => $sha1 );
}
}
$this->mTemplateIds[$ns][$dbk] = $rev_id; // For versioning
}
- function addDistantTemplate( $title, $page_id, $rev_id ) {
- $prefix = $title->getInterwiki();
- if ( $prefix !=='' ) {
- $ns = $title->getNamespace();
- $dbk = $title->getDBkey();
-
- if ( !isset( $this->mDistantTemplates[$prefix] ) ) {
- $this->mDistantTemplates[$prefix] = array();
- }
- if ( !isset( $this->mDistantTemplates[$prefix][$ns] ) ) {
- $this->mDistantTemplates[$prefix][$ns] = array();
- }
- $this->mDistantTemplates[$prefix][$ns][$dbk] = $page_id;
-
- // For versioning
- if ( !isset( $this->mDistantTemplateIds[$prefix] ) ) {
- $this->mDistantTemplateIds[$prefix] = array();
- }
- if ( !isset( $this->mDistantTemplateIds[$prefix][$ns] ) ) {
- $this->mDistantTemplateIds[$prefix][$ns] = array();
- }
- $this->mDistantTemplateIds[$prefix][$ns][$dbk] = $rev_id;
- }
- }
-
/**
* @param $title Title object, must be an interwiki link
* @throws MWException if given invalid input