From 9170073b758d326ad8a4765adf285d61f4b345fd Mon Sep 17 00:00:00 2001 From: "Mr. E23" Date: Sat, 24 Jan 2004 16:12:23 +0000 Subject: [PATCH] Only allow identified users to mark edits as minor --- includes/Article.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 3a7cdf47b4..d496e39503 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -390,6 +390,7 @@ class Article { $won = wfInvertTimestamp( $now ); wfSeedRandom(); $rand = number_format( mt_rand() / mt_getrandmax(), 12, ".", "" ); + $isminor = ( $isminor && $wgUser->getID() ) ? 1 : 0; $sql = "INSERT INTO cur (cur_namespace,cur_title,cur_text," . "cur_comment,cur_user,cur_timestamp,cur_minor_edit,cur_counter," . "cur_restrictions,cur_user_text,cur_is_redirect," . @@ -397,7 +398,7 @@ class Article { wfStrencode( $text ) . "', '" . wfStrencode( $summary ) . "', '" . $wgUser->getID() . "', '{$now}', " . - ( $isminor ? 1 : 0 ) . ", 0, '', '" . + $isminor . ", 0, '', '" . wfStrencode( $wgUser->getName() ) . "', $redir, 1, $rand, '{$now}', '{$won}')"; $res = wfQuery( $sql, DB_WRITE, $fname ); @@ -447,7 +448,7 @@ class Article { } } if ( $this->mMinorEdit ) { $me1 = 1; } else { $me1 = 0; } - if ( $minor ) { $me2 = 1; } else { $me2 = 0; } + if ( $minor && $wgUser->getID() ) { $me2 = 1; } else { $me2 = 0; } if ( preg_match( "/^((" . $wgMwRedir->getBaseRegex() . ")[^\\n]+)/i", $text, $m ) ) { $redir = 1; $text = $m[1] . "\n"; # Remove all content but redirect -- 2.20.1