Last modified: 2013-06-18 16:57:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T20834, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18834 - Show estimate of number of edits to be reverted in rollback link
Show estimate of number of edits to be reverted in rollback link
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
unspecified
All All
: Low enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: plural SWMT
  Show dependency treegraph
 
Reported: 2009-05-18 13:41 UTC by Joshua C. Lerner
Modified: 2013-06-18 16:57 UTC (History)
9 users (show)

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


Attachments
Patch against Linker.php r50720 - approximate number of edits in rollback (1.86 KB, patch)
2009-05-18 13:41 UTC, Joshua C. Lerner
Details
Don't show a rollback link when set to false (735 bytes, patch)
2009-05-18 14:29 UTC, Joshua C. Lerner
Details
Approximate number of edits in rollback (1.84 KB, patch)
2009-05-18 17:00 UTC, Joshua C. Lerner
Details
Add "rollbacklinkcount" to messages.inc (315 bytes, patch)
2009-05-18 19:06 UTC, Joshua C. Lerner
Details
Patch for the new Linker function (5.24 KB, patch)
2009-05-19 16:19 UTC, Jan Luca
Details

Description Joshua C. Lerner 2009-05-18 13:41:28 UTC
Created attachment 6128 [details]
Patch against Linker.php r50720 - approximate number of edits in rollback

It's not particularly clear what the difference is between rollback and undo, as shown at http://lists.wikimedia.org/pipermail/wikitech-l/2009-May/042946.html, and I've chosen the wrong link myself before.

Perhaps it would be better if the link text read "rollback 3 edits | undo" - instead of "rollback | undo". The estimated number of edits could be anything from 1 to (literally) 10+. This should be enough to disambiguate the functionality.

If this code would run too slow on heavy traffic wikis, perhaps we could make it optional.

Somewhat related to the discussion at bug #10531.
Comment 1 Jan Luca 2009-05-18 14:21:39 UTC
Patch commited in r50721
Comment 2 Joshua C. Lerner 2009-05-18 14:28:09 UTC
OK cool - then two other things:

* Need to change "rollbacklink" in language files to "rollback {{PLURAL:$1|1
edit|$1 edits}}", right?
* Since function buildRollbackLink() now may return false, we need to account
for that in PageHistory.php (will attach another diff).
Comment 3 Joshua C. Lerner 2009-05-18 14:29:40 UTC
Created attachment 6130 [details]
Don't show a rollback link when set to false
Comment 4 Joshua C. Lerner 2009-05-18 16:18:27 UTC
Comment on attachment 6130 [details]
Don't show a rollback link when set to false

No longer needed.
Comment 5 Joshua C. Lerner 2009-05-18 17:00:39 UTC
Created attachment 6131 [details]
Approximate number of edits in rollback

Addresses most of http://www.mediawiki.org/wiki/Special:Code/MediaWiki/50721
Comment 6 Joshua C. Lerner 2009-05-18 17:01:31 UTC
Reopening as it seems more debate is needed.
Comment 7 Jan Luca 2009-05-18 18:25:27 UTC
Fixed in 50727
Comment 8 Jan Luca 2009-05-18 18:32:01 UTC
Fixed in r50727
Comment 9 Brion Vibber 2009-05-18 18:50:15 UTC
Reverted in r50732; patch fails to set default values, has some other potential issues per notes in CR, and the commit is wrapped up with what appear to be unrelated changes making code review extra confusing.
Comment 10 Joshua C. Lerner 2009-05-18 18:59:22 UTC
Suggest enabling this feature by default. It should be useful on most sites and not too expensive except for the largest ones.

For DefaultSettings.php:

/**
 * Show rollback link as "rollback 3 edits" instead of just "rollback", to 
 * differentiate it from the "undo" link with which it appears. Set to false
 * if too expensive for larger wikis.
 */
$wgShowRollbackEditCount = true;
Comment 11 Joshua C. Lerner 2009-05-18 19:06:03 UTC
Created attachment 6132 [details]
Add "rollbacklinkcount" to messages.inc
Comment 12 Joshua C. Lerner 2009-05-18 19:18:42 UTC
Should the number listed be exact or approximate?

If exact, the query is going to more expensive.

If approximate, then how to reflect that the count is an estimate? Setting the count to "10+" may break localization and apparently breaks {{PLURAL:}}.
Comment 13 Jan Luca 2009-05-19 16:19:43 UTC
Created attachment 6135 [details]
Patch for the new Linker function

All changes needed to add the function as patch. Please controll it because in my commited changes was bug.
Comment 14 p858snake 2011-04-30 00:09:29 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 15 Sumana Harihareswara 2011-11-10 06:04:49 UTC
Adding the need-review keyword to indicate that these patches are awaiting review.  Joshua, Jan, could you mark any obsolete patches as obsolete to clarify what needs review currently?  Thanks for your patches, and sorry for the wait.
Comment 16 Sam Reed (reedy) 2011-11-13 22:46:08 UTC
Comment on attachment 6132 [details]
Add "rollbacklinkcount" to messages.inc

Marking as obsolete. No "rollbacklinkcount" message in MessageEn.php as of trunk
Comment 17 Sumana Harihareswara 2012-01-10 22:19:02 UTC
Comment on attachment 6131 [details]
Approximate number of edits in rollback

This patch no longer applies to trunk per Rusty Burchfield's automated testing
https://docs.google.com/spreadsheet/ccc?key=0Ah_71HHl7qa7dGtvSms3TGpHQU9NU2Y1VmNzUEUteWc
.
Comment 18 Sumana Harihareswara 2012-01-10 22:19:27 UTC
Comment on attachment 6135 [details]
Patch for the new Linker function

This patch no longer cleanly applies to trunk per Rusty Burchfield's automated testing
https://docs.google.com/spreadsheet/ccc?key=0Ah_71HHl7qa7dGtvSms3TGpHQU9NU2Y1VmNzUEUteWc
.
Comment 19 Sumana Harihareswara 2012-01-10 22:21:07 UTC
I've removed the "patch" and "need-review" keywords since there's no applicable patch to be reviewed.  Jan Luca, Josh Lerner, is one of you interested in revising and attaching the patch, if still desired?
Comment 20 Jan Luca 2012-07-29 21:26:03 UTC
New patch created and uploaded to Gerrit for review: https://gerrit.wikimedia.org/r/#/c/16932/
Comment 21 Jan Luca 2012-08-04 15:49:05 UTC
Feature merged to core in https://gerrit.wikimedia.org/r/#/c/16932 + https://gerrit.wikimedia.org/r/#/c/17335/
Comment 22 Derk-Jan Hartman 2012-08-14 12:08:12 UTC
For future reference. In $wgMiserMode (enabled by default on WMF servers) the rollback count for Special:RecentChanges and Special:Watchlist is disabled.
Comment 23 David Levy 2012-08-18 22:12:26 UTC
Can we please insert a colon ("rollback: 1 edit")?  "Rollback" is a noun (not a verb), so the current formatting is grammatically incorrect.
Comment 24 Jan Luca 2012-08-19 14:44:11 UTC
There is the verb "to rollback".

Quote from http://oxforddictionaries.com/definition/english/rollback?q=rollback:

...
verb
[with object] Computing
restore (a database) to a previously defined state.
Comment 25 David Levy 2012-08-19 19:49:45 UTC
Thanks for bringing that to my attention.  But the verb form describes a specific situation in computing (restoring a database to a previously defined state).

In the relevant context (reverting to an earlier revision of a wiki page, with subsequent edits retained in the database and history), "rollback" means "act or instance of rolling back".

http://dictionary.reference.com/browse/rollback
http://www.merriam-webster.com/dictionary/rollback

Is the addition of a colon ("rollback: 2 edits") technically feasible?
Comment 26 Jan Luca 2012-08-19 22:08:10 UTC
There is no problem on the technical side (change of < 10 code line) but I prefer the current version. 

If there are more support for your version I could change the code.
Comment 27 David Levy 2012-08-20 05:17:34 UTC
Can you recommend an appropriate forum in which to discuss the matter?  This bug is unlikely to generate much additional traffic.
Comment 28 Jan Luca 2012-08-20 14:26:57 UTC
I created a discussion on translatewiki.net: MediaWiki:Rollbacklinkcount/en]]_and_[[MediaWiki:Rollbacklinkcount-morethan/en]]_26448">https://translatewiki.net/wiki/Translating_talk:MediaWiki#About_[[MediaWiki:Rollbacklinkcount/en]]_and_[[MediaWiki:Rollbacklinkcount-morethan/en]]_26448

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


Navigation
Links