*
* @param $text String Text with possible redirect
* @return Array of Titles, with the destination last
+ * @todo: migrate this logic into WikitextContent!
*/
public static function newFromRedirectArray( $text ) {
global $wgMaxRedirects;
# so the regex has to be fairly general
$newText = preg_replace( '/ \[ \[ [^\]]* \] \] /x',
'[[' . $newTitle->getFullText() . ']]',
- $text, 1 );
+ $text, 1 ); #FIXME: need a way to do this via ContentHandler!
if ( $newText === $text ) {
$this->setLastError( 'Text unchanged???' );
$title = Title::makeTitleSafe( NS_PROJECT, $page ); # Show list in content language
if( is_object( $title ) && $title->exists() ) {
$rev = Revision::newFromTitle( $title );
- $this->getOutput()->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $rev->getText() ) );
+ $this->getOutput()->addWikiText( str_replace( 'MAGICNUMBER', $this->isbn, $rev->getText() ) ); #FIXME: need a way to do this via ContentHandler (or enforce flat text-based content)
return true;
}
$rev = Revision::newFromTitle( $title );
$currentRevId = $rev->getId();
+ //FIXME: LinkFilter needs to handle Content objects! Or rather, ContentHandler needs to provide the appropriate LinkFilter.
while ( $rev && ( $rev->isDeleted( Revision::DELETED_TEXT ) || LinkFilter::matchEntry( $rev->getText() , $domain ) ) ) {
$rev = $rev->getPrevious();
}