- if ( is_null( $title ) ) {
- $title = Title::newFromText( $this->getTitleText() );
- }
-
- if ( count( $this->mSecondaryDataUpdates ) !== $this->mCustomDataUpdateCount ) {
- // NOTE: This happens when mSecondaryDataUpdates are lost during serialization
- // (see __sleep below). After (un)serialization, getSecondaryDataUpdates()
- // has no defined behavior in that case, and should throw an exception.
- throw new MWException( 'getSecondaryDataUpdates() must not be called on ParserOutput restored from serialization.' );
- }
-
- // NOTE: ApiStashEdit knows about this "magic" update object. If this goes away,
- // ApiStashEdit::buildStashValue needs to be adjusted.
- $linksUpdate = new LinksUpdate( $title, $this, $recursive );
-
- return array_merge( $this->mSecondaryDataUpdates, array( $linksUpdate ) );