# If we have been passed an &rcid= parameter, we want to give the user a
# chance to mark this new article as patrolled.
- if (!is_null( $rcid ) && $rcid != 0 && $wgUser->isAllowed( 'patrol' ) ) {
+ if( !is_null( $rcid ) && $rcid != 0 && $wgUser->isAllowed( 'patrol' ) && $this->mTitle->exists() ) {
$wgOut->addHTML(
"<div class='patrollink'>" .
wfMsgHtml( 'markaspatrolledlink',
global $wgUser, $wgRestrictionTypes, $wgContLang;
$id = $this->mTitle->getArticleID();
- if( !$wgUser->isAllowed( 'protect' ) || wfReadOnly() || $id == 0 ) {
+ if( array() != $this->mTitle->getUserPermissionsErrors( 'protect', $wgUser ) || wfReadOnly() || $id == 0 ) {
return false;
}
*/
function delete() {
global $wgUser, $wgOut, $wgRequest;
+
$confirm = $wgRequest->wasPosted() &&
- $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
- $this->DeleteReasonList = $wgRequest->getText( 'wpDeleteReasonList' );
+ $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
+
+ $this->DeleteReasonList = $wgRequest->getText( 'wpDeleteReasonList', 'other' );
$this->DeleteReason = $wgRequest->getText( 'wpReason' );
+
$reason = $this->DeleteReasonList;
+
if ( $reason != 'other' && $this->DeleteReason != '') {
// Entry from drop down menu + additional comment
$reason .= ': ' . $this->DeleteReason;
$wgOut->addHTML( "
<form id='deleteconfirm' method='post' action=\"{$formaction}\">
<table border='0'>
- <tr>
+ <tr id=\"wpDeleteReasonListRow\" name=\"wpDeleteReasonListRow\">
<td align='right'>
$delcom:
</td>
<td align='left'>
- <select tabindex='2' id='wpDeleteReasonList' name=\"wpDeleteReasonList\">
+ <select tabindex='1' id='wpDeleteReasonList' name=\"wpDeleteReasonList\">
$deleteReasonList
</select>
</td>
</tr>
- <tr>
+ <tr id=\"wpDeleteReasonRow\" name=\"wpDeleteReasonRow\">
<td>
$mDeletereasonother
</td>
- <td align='right'>
- <input type='text' maxlength='255' size='60' name='wpReason' id='wpReason' value=\"" . htmlspecialchars( $reason ) . "\" tabindex=\"1\" />
+ <td align='left'>
+ <input type='text' maxlength='255' size='60' name='wpReason' id='wpReason' value=\"" . htmlspecialchars( $reason ) . "\" tabindex=\"2\" />
</td>
</tr>
<tr>
$summary = wfMsgForContent( 'revertpage', $target->getUserText(), $from );
# Save
- $flags = EDIT_UPDATE | EDIT_MINOR;
+ $flags = EDIT_UPDATE;
+
+ if ($wgUser->isAllowed('minoredit'))
+ $flags |= EDIT_MINOR;
+
if( $bot )
$flags |= EDIT_FORCE_BOT;
$this->doEdit( $target->getText(), $summary, $flags );
$edit->pst = $this->preSaveTransform( $text );
$options = new ParserOptions;
$options->setTidy( true );
+ $options->enableLimitReport();
$edit->output = $wgParser->parse( $edit->pst, $this->mTitle, $options, true, true, $revid );
$edit->oldText = $this->getContent();
$this->mPreparedEdit = $edit;
$title->touchLinks();
$title->purgeSquid();
+ $title->deleteTitleProtection();
}
static function onArticleDelete( $title ) {
$popts = $wgOut->parserOptions();
$popts->setTidy(true);
+ $popts->enableLimitReport();
$parserOutput = $wgParser->parse( $text, $this->mTitle,
$popts, true, true, $this->getRevIdFetched() );
$popts->setTidy(false);
+ $popts->enableLimitReport( false );
if ( $cache && $this && $parserOutput->getCacheTime() != -1 ) {
$parserCache =& ParserCache::singleton();
$parserCache->save( $parserOutput, $this, $wgUser );