wfProfileOut( __METHOD__ );
return false;
}
+
+ if (!$summary) {
+ #If they're blanking an article, note it in the summary.
+ if (/*$flags & EDIT_AUTOSUMMARY && */$oldtext!='' && $text=='') {
+ $summary = wfMsgForContent('autosumm-blank');
+ }
+
+ #Blanking and replacing with something short
+ if (strlen($oldtext) / strlen($text) > 10 && strlen($text) < 500) { #Removing more than 90% of the article
+ global $wgContLang;
+ $truncatedtext = $wgContLang->truncate($text, 200 - strlen(wfMsg('autosumm-replace')), '...');
+ $summary = wfMsgForContent('autosumm-replace', $truncatedtext);
+ }
+ }
$revision = new Revision( array(
'page' => $this->getId(),
'viewtalkpage' => 'View discussion',
'otherlanguages' => 'In other languages',
'redirectedfrom' => '(Redirected from $1)',
-'autoredircomment' => 'Redirecting to [[$1]]',
'redirectpagesub' => 'Redirect page',
'lastmodifiedat' => 'This page was last modified $2, $1.', //$1 date, $2 time
'viewcount' => 'This page has been accessed {{plural:$1|one time|$1 times}}.',
'table_pager_limit_submit' => 'Go',
'table_pager_empty' => 'No results',
+#Auto-summaries
+'autosumm-blank' => 'Blanking page',
+'autosumm-replace' => 'Replacing page with \'$1\'',
+'autoredircomment' => 'Redirecting to [[$1]]', #This should be changed to the new naming convention, but existed beforehand.
);
?>