Show *how many* prior revisions exist when deleting an article
Closed, ResolvedPublic

Assigned To
None
Priority
Normal
Author
Tsor
Subscribers
Tsor, Mr.Z-man, IAlex, wikibugs-l
Projects
Reference
bz3480
Description

If an administrator deletes an article with versions he gets a hint: "Be
carful, there are versions".

In many cases it would be helpful if he gets the infomation HOW MANY versions
exist.

Example:

A user creates a nonsense article with contents "aabbccdd". Another user edits
this article to vote for deletion. Now this article has 2 versions.

If I want to delete this article and I get the info "2 versions", I can hit
the "ok-button". If there are more than 2 versions I must look into the history
because a previous version may have excellent contents.

Without the info about the number of versions I always must chck the history.


Version: unspecified
Severity: enhancement

bzimport added a project: MediaWiki-Interface.Via ConduitNov 21 2014, 8:48 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz3480.
Tsor created this task.Via LegacySep 16 2005, 1:39 PM
bzimport added a comment.Via ConduitSep 16 2005, 7:01 PM

rowan.collins wrote:

One problem with this from a technical point of view would be the database load
required to count all the edits an article has had if there are many. Perhaps it
could be "2", "3", "more than 3" or similar...

[PS: Please try to summarise the bug/request in the "summary" field, not just
the activity it relates to]

Tsor added a comment.Via ConduitSep 16 2005, 8:46 PM

Ok, to reduce the database load it would be sufficient to tell me if
there are more than 2 versions or not.

bzimport added a comment.Via ConduitOct 24 2008, 4:03 AM

jaymac407 wrote:

patch

Attached: my.patch

bzimport added a comment.Via ConduitOct 24 2008, 4:04 AM

jaymac407 wrote:

attached my first ever patch. I'm so proud. xD

bzimport added a comment.Via ConduitOct 24 2008, 4:20 AM

jaymac407 wrote:

Comment on attachment 5456
patch

Index: includes/Article.php

  • includes/Article.php (revision 42453)

+++ includes/Article.php (working copy)
@@ -2146,6 +2146,7 @@

  1. Hack for big sites $bigHistory = $this->isBigDeletion();

+ $revisions = $this->estimateRevisionCount();

		if( $bigHistory && !$this->mTitle->userCan( 'bigdelete' ) ) {
			global $wgLang, $wgDeleteRevisionsLimit;
			$wgOut->wrapWikiMsg( "<div class='error'>\n$1</div>\n",

@@ -2177,6 +2178,9 @@

					array( 'delete-warning-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ) );
			}
		}

+ if( $revisions > 3 && !$confirm ) {
+ $wgOut->wrapWikiMsg(''.wfMsg('revdelete-count', $revisions).'');
+ }

		return $this->confirmDelete( $reason );
	}

Index: languages/messages/MessagesEn.php

  • languages/messages/MessagesEn.php (revision 42453)

+++ languages/messages/MessagesEn.php (working copy)
@@ -1314,6 +1314,7 @@
'revdelete-unhid' => 'unhid $1',
'revdelete-log-message' => '$1 for $2 {{PLURAL:$2|revision|revisions}}',
'logdelete-log-message' => '$1 for $2 {{PLURAL:$2|event|events}}',
+'revdelete-count' => 'The article currently has $1 edits worth of history, deleting the article will also remove that history.',

  1. Suppression log 'suppressionlog' => 'Suppression log',
IAlex added a comment.Via ConduitOct 24 2009, 1:49 PM

Fixed in r58087 by adding the count in MediaWiki:Historywarning.

Add Comment