r58087 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58086‎ | r58087 | r58088 >
Date:13:47, 24 October 2009
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* (bug 3480) MediaWiki:Historywarning now has a parameter that contains the number of revisions in the history
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2599,7 +2599,8 @@
26002600 // If the page has a history, insert a warning
26012601 if( $hasHistory && !$confirm ) {
26022602 $skin = $wgUser->getSkin();
2603 - $wgOut->addHTML( '<strong>' . wfMsgExt( 'historywarning', array( 'parseinline' ) ) . ' ' . $skin->historyLink() . '</strong>' );
 2603+ $revisions = $this->estimateRevisionCount();
 2604+ $wgOut->addHTML( '<strong>' . wfMsgExt( 'historywarning', array( 'parseinline' ), $revisions ) . ' ' . $skin->historyLink() . '</strong>' );
26042605 if( $bigHistory ) {
26052606 global $wgLang, $wgDeleteRevisionsLimit;
26062607 $wgOut->wrapWikiMsg( "<div class='error'>\n$1</div>\n",
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2676,7 +2676,7 @@
26772677 'delete-confirm' => 'Delete "$1"',
26782678 'delete-backlink' => '← $1', # only translate this message to other languages if you have to change it
26792679 'delete-legend' => 'Delete',
2680 -'historywarning' => "'''Warning:''' The page you are about to delete has a history:",
 2680+'historywarning' => "'''Warning:''' The page you are about to delete has a history with $1 {{PLURAL:$1|revision|revisions}}:",
26812681 'confirmdeletetext' => 'You are about to delete a page along with all of its history.
26822682 Please confirm that you intend to do this, that you understand the consequences, and that you are doing this in accordance with [[{{MediaWiki:Policy-url}}|the policy]].',
26832683 'actioncomplete' => 'Action complete',
Index: trunk/phase3/RELEASE-NOTES
@@ -259,6 +259,8 @@
260260 an own 'mw-error-cannotdelete' class
261261 * New hook AbortNewAccountAuto, called before account creation from AuthPlugin-
262262 or ExtUser-driven requests.
 263+* (bug 3480) The warning saying that the page has a history when deleting it now
 264+ contains the number of revisions in the history
263265
264266 === Bug fixes in 1.16 ===
265267

Follow-up revisions

RevisionCommit summaryAuthorDate
r58088Follow-up r58087: formatNum the number of revisions...raymond14:56, 24 October 2009
r60303Fix for r58087, the revision count obtained this way might not be at all accu...tstarling04:55, 23 December 2009

Comments

#Comment by Nikerabbit (talk | contribs)   14:45, 24 October 2009

Mmm lego, and not even documented at twn.

Status & tagging log