'page_id',
'page_namespace',
'page_title',
- 'page_key',
'page_restrictions',
'page_counter',
'page_is_redirect',
'page_random',
'page_touched',
'page_latest',
- 'page_len' ) ;
- wfRunHooks( 'ArticlePageDataBefore', array( &$this , &$fields ) ) ;
- $row = $dbr->selectRow( 'page',
+ 'page_len',
+ );
+ wfRunHooks( 'ArticlePageDataBefore', array( &$this, &$fields ) );
+ $row = $dbr->selectRow(
+ 'page',
$fields,
$conditions,
- 'Article::pageData' );
- wfRunHooks( 'ArticlePageDataAfter', array( &$this , &$row ) ) ;
+ __METHOD__
+ );
+ wfRunHooks( 'ArticlePageDataAfter', array( &$this, &$row ) );
return $row ;
}
* @private
*/
function insertOn( $dbw ) {
- global $wgContLang;
wfProfileIn( __METHOD__ );
$page_id = $dbw->nextSequenceValue( 'page_page_id_seq' );
'page_id' => $page_id,
'page_namespace' => $this->mTitle->getNamespace(),
'page_title' => $this->mTitle->getDBkey(),
- 'page_key' => $wgContLang->caseFold($this->mTitle->getDBkey()),
'page_counter' => 0,
'page_restrictions' => '',
'page_is_redirect' => 0, # Will set this shortly...
}
}
- $this->doRedirect( $this->isRedirect( $text ), $sectionanchor );
+ $extraq = ''; // Give extensions a chance to modify URL query on update
+ wfRunHooks( 'ArticleUpdateBeforeRedirect', array( $this, &$sectionanchor, &$extraq ) );
+
+ $this->doRedirect( $this->isRedirect( $text ), $sectionanchor, $extraq );
}
return $good;
}
* @param boolean $noRedir Add redirect=no
* @param string $sectionAnchor section to redirect to, including "#"
*/
- function doRedirect( $noRedir = false, $sectionAnchor = '' ) {
+ function doRedirect( $noRedir = false, $sectionAnchor = '', $extraq = '' ) {
global $wgOut;
if ( $noRedir ) {
$query = 'redirect=no';
+ if( $extraq )
+ $query .= "&$query";
} else {
- $query = '';
+ $query = $extraq;
}
$wgOut->redirect( $this->mTitle->getFullURL( $query ) . $sectionAnchor );
}
'ar_text' => '\'\'', // Be explicit to appease
'ar_flags' => '\'\'', // MySQL's "strict mode"...
'ar_len' => 'rev_len',
- 'ar_page' => $id
+ 'ar_page_id' => 'page_id',
), array(
'page_id' => $id,
'page_id = rev_page'
$wgOut->setPagetitle( $page->getPrefixedText() );
$wgOut->setPageTitleActionText( wfMsg( 'info_short' ) );
- $wgOut->setSubtitle( wfMsg( 'infosubtitle' ));
-
- # first, see if the page exists at all.
- $exists = $page->getArticleId() != 0;
- if( !$exists ) {
- if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
- $wgOut->addHTML(wfMsgWeirdKey ( $this->mTitle->getText() ) );
+ $wgOut->setSubtitle( wfMsg( 'infosubtitle' ) );
+
+ if( !$this->mTitle->exists() ) {
+ $wgOut->addHtml( '<div class="noarticletext">' );
+ if( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
+ // This doesn't quite make sense; the user is asking for
+ // information about the _page_, not the message... -- RC
+ $wgOut->addHtml( htmlspecialchars( wfMsgWeirdKey( $this->mTitle->getText() ) ) );
} else {
- $wgOut->addHTML(wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' ) );
+ $msg = $wgUser->isLoggedIn()
+ ? 'noarticletext'
+ : 'noarticletextanon';
+ $wgOut->addHtml( wfMsgExt( $msg, 'parse' ) );
}
+ $wgOut->addHtml( '</div>' );
} else {
$dbr = wfGetDB( DB_SLAVE );
$wl_clause = array(