var $mId, $mTable;
var $mForUpdate;
var $mOldId;
+ var $mRevIdFetched;
/**#@-*/
/**
$this->mTouched = '19700101000000';
$this->mForUpdate = false;
$this->mIsRedirect = false;
+ $this->mRevIdFetched = false;
}
/**
$this->mComment = $revision->getComment();
$this->mTimestamp = wfTimestamp( TS_MW, $revision->getTimestamp() );
+ $this->mRevIdFetched = $revision->getID();
$this->mContentLoaded = true;
+
return $this->mContent;
}
function isRedirect( $text = false ) {
if ( $text === false ) {
$this->loadContent();
- $titleObj = Title::newFromRedirect( $this->mText );
+ $titleObj = Title::newFromRedirect( $this->fetchRevisionText() );
} else {
$titleObj = Title::newFromRedirect( $text );
}
$this->loadLastEdit();
return $this->mMinorEdit;
}
+
+ function getRevIdFetched() {
+ $this->loadLastEdit();
+ return $this->mRevIdFetched;
+ }
function getContributors($limit = 0, $offset = 0) {
$fname = 'Article::getContributors';
* Best if all done inside a transaction.
*
* @param Database $dbw
- * @return int The newly created page_id key
+ * @param string $restrictions
+ * @return int The newly created page_id key
* @access private
*/
- function insertOn( &$dbw ) {
+ function insertOn( &$dbw, $restrictions = '' ) {
$fname = 'Article::insertOn';
wfProfileIn( $fname );
'page_namespace' => $this->mTitle->getNamespace(),
'page_title' => $this->mTitle->getDBkey(),
'page_counter' => 0,
- 'page_restrictions' => '',
+ 'page_restrictions' => $restrictions,
'page_is_redirect' => 0, # Will set this shortly...
'page_is_new' => 1,
'page_random' => wfRandom(),
* errors at some point.
* @private
*/
- function insertNewArticle( $text, $summary, $isminor, $watchthis ) {
+ function insertNewArticle( $text, $summary, $isminor, $watchthis, $suppressRC=false ) {
global $wgOut, $wgUser;
global $wgUseSquid, $wgDeferredUpdateList, $wgInternalServer;
$this->updateRevisionOn( $dbw, $revision, 0 );
Article::onArticleCreate( $this->mTitle );
- RecentChange::notifyNew( $now, $this->mTitle, $isminor, $wgUser, $summary );
+ if(!$suppressRC) {
+ RecentChange::notifyNew( $now, $this->mTitle, $isminor, $wgUser, $summary );
+ }
if ($watchthis) {
if(!$this->mTitle->userIsWatching()) $this->watch();
include_once ( "SpecialValidate.php" ) ; # The "Validation" class
$v = new Validation ;
- $t = $v->validatePageForm ( $this , $revision ) ;
+ if ( $wgRequest->getVal ( "mode" , "" ) == "list" )
+ $t = $v->showList ( $this ) ;
+ else
+ $t = $v->validatePageForm ( $this , $revision ) ;
$wgOut->addHTML ( $t ) ;
}
<td align='left'>
<input type='text' size='60' name='wpReasonProtect' id='wpReasonProtect' value=\"" . htmlspecialchars( $reason ) . "\" />
</td>
- </tr>
- <tr>
- <td> </td>
</tr>" );
if($moveonly != '') {
$wgOut->AddHTML( "
<td align='right'>
<input type='checkbox' name='wpMoveOnly' value='1' id='wpMoveOnly' />
</td>
- <td>
+ <td align='left'>
<label for='wpMoveOnly'>{$moveonly}</label>
</td>
</tr> " );
</tr>
</table>
<input type='hidden' name='wpEditToken' value=\"{$token}\" />
-</form>\n" );
+</form>" );
$wgOut->returnToMain( false );
}
<input type='text' size='60' name='wpReason' id='wpReason' value=\"" . htmlspecialchars( $reason ) . "\" />
</td>
</tr>
- <tr>
- <td> </td>
- </tr>
<tr>
<td> </td>
<td>