Index: trunk/phase3/includes/Article.php |
— | — | @@ -1315,6 +1315,20 @@ |
1316 | 1316 | wfProfileOut( __METHOD__ ); |
1317 | 1317 | return false; |
1318 | 1318 | } |
| 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 | + } |
1319 | 1333 | |
1320 | 1334 | $revision = new Revision( array( |
1321 | 1335 | 'page' => $this->getId(), |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -632,7 +632,6 @@ |
633 | 633 | 'viewtalkpage' => 'View discussion', |
634 | 634 | 'otherlanguages' => 'In other languages', |
635 | 635 | 'redirectedfrom' => '(Redirected from $1)', |
636 | | -'autoredircomment' => 'Redirecting to [[$1]]', |
637 | 636 | 'redirectpagesub' => 'Redirect page', |
638 | 637 | 'lastmodifiedat' => 'This page was last modified $2, $1.', //$1 date, $2 time |
639 | 638 | 'viewcount' => 'This page has been accessed {{plural:$1|one time|$1 times}}.', |
— | — | @@ -2588,6 +2587,10 @@ |
2589 | 2588 | 'table_pager_limit_submit' => 'Go', |
2590 | 2589 | 'table_pager_empty' => 'No results', |
2591 | 2590 | |
| 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. |
2592 | 2595 | ); |
2593 | 2596 | |
2594 | 2597 | ?> |