[HOME PAGE] [STORES] [CLASSICISTRANIERI.COM] [FOTO] [YOUTUBE CHANNEL]


Bug 3480 – Show *how many* prior revisions exist when deleting an article

Last modified: 2009-10-24 13:49:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 3480 - Show *how many* prior revisions exist when deleting an article
Show *how many* prior revisions exist when deleting an article
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-16 13:39 UTC by tsor
Modified: 2009-10-24 13:49 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
patch (1.38 KB, patch)
2008-10-24 04:03 UTC, Jay MacDonald
Details

Description tsor 2005-09-16 13:39:34 UTC
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.
Comment 1 Rowan Collins [IMSoP] 2005-09-16 19:01:40 UTC
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]
Comment 2 tsor 2005-09-16 20:46:52 UTC
Ok, to reduce the database load it would be sufficient to tell me if 
there are more than 2 versions or not.
Comment 3 Jay MacDonald 2008-10-24 04:03:59 UTC
Created attachment 5456 [details]
patch
Comment 4 Jay MacDonald 2008-10-24 04:04:44 UTC
attached my first ever patch. I'm so proud. xD
Comment 5 Jay MacDonald 2008-10-24 04:20:03 UTC
Comment on attachment 5456 [details]
patch

Index: includes/Article.php
===================================================================
--- includes/Article.php	(revision 42453)
+++ includes/Article.php	(working copy)
@@ -2146,6 +2146,7 @@
 
 		# 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.',
 
 # Suppression log
 'suppressionlog'     => 'Suppression log',
Comment 6 Alexandre Emsenhuber [IAlex] 2009-10-24 13:49:09 UTC
Fixed in r58087 by adding the count in MediaWiki:Historywarning.

Note You need to log in before you can comment on or make changes to this bug.


Contents Listing Alphabetical by Author:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Unknown Other

Contents Listing Alphabetical by Title:
# A B C D E F G H I J K L M N O P Q R S T U V W Y Z Other

Medical Encyclopedia

Browse by first letter of topic:


A-Ag Ah-Ap Aq-Az B-Bk Bl-Bz C-Cg Ch-Co
Cp-Cz D-Di Dj-Dz E-Ep Eq-Ez F G
H-Hf Hg-Hz I-In Io-Iz J K L-Ln
Lo-Lz M-Mf Mg-Mz N O P-Pl Pm-Pz
Q R S-Sh Si-Sp Sq-Sz T-Tn To-Tz
U V W X Y Z 0-9

Biblioteca - SPANISH

Biblioteca Solidaria - SPANISH

Bugzilla

Ebooks Gratuits

Encyclopaedia Britannica 1911 - PDF

Project Gutenberg: DVD-ROM 2007

Project Gutenberg ENGLISH Selection

Project Gutenberg SPANISH Selection

Standard E-books

Wikipedia Articles Indexes

Wikipedia for Schools - ENGLISH

Wikipedia for Schools - FRENCH

Wikipedia for Schools - SPANISH

Wikipedia for Schools - PORTUGUESE

Wikipedia 2016 - FRENCH

Wikipedia HTML - CATALAN

Wikipedia Picture of the Year 2006

Wikipedia Picture of the Year 2007

Wikipedia Picture of the Year 2008

Wikipedia Picture of the Year 2009

Wikipedia Picture of the Year 2010

Wikipedia Picture of the Year 2011