in extensions/CreateBox/CreateBox.php [54:83]
function actionCreate( $action, $article ) {
if( $action != 'create' ) {
return true;
}
global $wgRequest;
$prefix = $wgRequest->getVal( 'prefix' );
$text = $wgRequest->getVal( 'title' );
if( $prefix && strpos( $text, $prefix ) !== 0 ) {
$title = Title::newFromText( $prefix . $text );
if( is_null( $title ) ) {
global $wgTitle;
$wgTitle = SpecialPage::getTitleFor( 'Badtitle' );
throw new ErrorPageError( 'badtitle', 'badtitletext' );
} elseif( $title->getArticleID() == 0 ) {
acRedirect( $title, 'edit' );
} else {
acRedirect( $title, 'create' );
}
} elseif( $wgRequest->getVal( 'section' ) == 'new' || $article->getID() == 0 ) {
acRedirect( $article->getTitle(), 'edit' );
} else {
global $wgOut;
$text = $article->getTitle()->getPrefixedText();
$wgOut->setPageTitle( $text );
$wgOut->setHTMLTitle( wfMsg( 'pagetitle', $text . ' - ' . wfMsg( 'createbox-create' ) ) );
$wgOut->addWikiMsg( 'createbox-exists' );
}
return false;
}