r17609 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17608‎ | r17609 | r17610 >
Date:11:08, 13 November 2006
Author:werdna
Status:old
Tags:
Comment:
Bloody hell, not another pretend feature
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1315,6 +1315,20 @@
13161316 wfProfileOut( __METHOD__ );
13171317 return false;
13181318 }
 1319+
 1320+ if (!$summary) {
 1321+ #If they're blanking an article, note it in the summary.
 1322+ if (/*$flags & EDIT_AUTOSUMMARY && */$oldtext!='' && $text=='') {
 1323+ $summary = wfMsgForContent('autosumm-blank');
 1324+ }
 1325+
 1326+ #Blanking and replacing with something short
 1327+ if (strlen($oldtext) / strlen($text) > 10 && strlen($text) < 500) { #Removing more than 90% of the article
 1328+ global $wgContLang;
 1329+ $truncatedtext = $wgContLang->truncate($text, 200 - strlen(wfMsg('autosumm-replace')), '...');
 1330+ $summary = wfMsgForContent('autosumm-replace', $truncatedtext);
 1331+ }
 1332+ }
13191333
13201334 $revision = new Revision( array(
13211335 'page' => $this->getId(),
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -632,7 +632,6 @@
633633 'viewtalkpage' => 'View discussion',
634634 'otherlanguages' => 'In other languages',
635635 'redirectedfrom' => '(Redirected from $1)',
636 -'autoredircomment' => 'Redirecting to [[$1]]',
637636 'redirectpagesub' => 'Redirect page',
638637 'lastmodifiedat' => 'This page was last modified $2, $1.', //$1 date, $2 time
639638 'viewcount' => 'This page has been accessed {{plural:$1|one time|$1 times}}.',
@@ -2588,6 +2587,10 @@
25892588 'table_pager_limit_submit' => 'Go',
25902589 'table_pager_empty' => 'No results',
25912590
 2591+#Auto-summaries
 2592+'autosumm-blank' => 'Blanking page',
 2593+'autosumm-replace' => 'Replacing page with \'$1\'',
 2594+'autoredircomment' => 'Redirecting to [[$1]]', #This should be changed to the new naming convention, but existed beforehand.
25922595 );
25932596
25942597 ?>

Follow-up revisions

RevisionCommit summaryAuthorDate
r17696wfMsg -> wfMsgForContent for code added in r17609werdna06:46, 15 November 2006