r79663 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79662‎ | r79663 | r79664 >
Date:20:28, 5 January 2011
Author:btongminh
Status:deferred
Tags:
Comment:
Allow drafts to be kept forever
Modified paths:
  • /trunk/extensions/Drafts/Drafts.classes.php (modified) (history)
  • /trunk/extensions/Drafts/Drafts.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Drafts/Drafts.classes.php
@@ -12,6 +12,10 @@
1313
1414 private static function getDraftAgeCutoff() {
1515 global $egDraftsLifeSpan;
 16+ if ( !$egDraftsLifeSpan ) {
 17+ // Drafts stay forever
 18+ return 0;
 19+ }
1620 return wfTimestamp( TS_UNIX ) - ( $egDraftsLifeSpan * 60 * 60 * 24 );
1721 }
1822
Index: trunk/extensions/Drafts/Drafts.php
@@ -48,7 +48,7 @@
4949 // Use the value 0 to disable autosave
5050 $egDraftsAutoSaveTimeout = 10;
5151
52 -// Days to keep drafts around before automatic deletion
 52+// Days to keep drafts around before automatic deletion. Set to 0 to keep forever.
5353 $egDraftsLifeSpan = 30;
5454
5555 // Ratio of times which a list of drafts requested and the list should be pruned

Status & tagging log