*/
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='left'>
- <input type='text' maxlength='255' size='60' name='wpReason' id='wpReason' value=\"" . htmlspecialchars( $reason ) . "\" tabindex=\"1\" />
+ <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 );
$title->touchLinks();
$title->purgeSquid();
+ $title->deleteTitleProtection();
}
static function onArticleDelete( $title ) {