*/
var $mId, //!< Page ID of the article linked from
$mTitle, //!< Title object of the article linked from
+ $mParserOutput, //!< Parser output
$mLinks, //!< Map of title strings to IDs for the links in the document
$mImages, //!< DB keys of the images used, in the array key only
$mTemplates, //!< Map of title strings to IDs for the template references, including broken ones
$this->mDb = wfGetDB( DB_MASTER );
if ( !is_object( $title ) ) {
- throw new MWException( "The calling convention to LinksUpdate::LinksUpdate() has changed. " .
- "Please see Article::editUpdates() for an invocation example.\n" );
+ throw new MWException( "The calling convention to LinksUpdate::__construct() has changed. " .
+ "Please see WikiPage::doEditUpdates() for an invocation example.\n" );
}
$this->mTitle = $title;
$this->mId = $title->getArticleID();
$arr = array();
$diffs = array_diff_key( $this->mExternals, $existing );
foreach( $diffs as $url => $dummy ) {
- $arr[] = array(
- 'el_from' => $this->mId,
- 'el_to' => $url,
- 'el_index' => wfMakeUrlIndex( $url ),
- );
+ foreach( wfMakeUrlIndexes( $url ) as $index ) {
+ $arr[] = array(
+ 'el_from' => $this->mId,
+ 'el_to' => $url,
+ 'el_index' => $index,
+ );
+ }
}
return $arr;
}
return $this->mTitle;
}
+ /**
+ * Returns parser output
+ * @since 1.19
+ * @return ParserOutput
+ */
+ public function getParserOutput() {
+ return $this->mParserOutput;
+ }
+
/**
* Return the list of images used as generated by the parser
* @return array