Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.604
diff -u -p -r1.604 system.module
--- modules/system/system.module	28 Jun 2008 12:37:52 -0000	1.604
+++ modules/system/system.module	30 Jun 2008 15:07:51 -0000
@@ -37,11 +37,6 @@ define('DRUPAL_MINIMUM_MYSQL',  '5.0');
 define('DRUPAL_MINIMUM_PGSQL',  '7.4');
 
 /**
- * Maximum age of temporary files in seconds.
- */
-define('DRUPAL_MAXIMUM_TEMP_FILE_AGE', 1440);
-
-/**
  * Implementation of hook_help().
  */
 function system_help($path, $arg) {
@@ -1391,8 +1386,8 @@ function system_cron() {
   // Cleanup the batch table.
   db_query('DELETE FROM {batch} WHERE timestamp < %d', time() - 864000);
 
-  // Remove temporary files that are older than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
-  $result = db_query('SELECT * FROM {files} WHERE status = %d and timestamp < %d', FILE_STATUS_TEMPORARY, time() - DRUPAL_MAXIMUM_TEMP_FILE_AGE);
+  // Remove temporary files that are older than maximum_temp_file_age variable.
+  $result = db_query('SELECT * FROM {files} WHERE status = %d and timestamp < %d', FILE_STATUS_TEMPORARY, time() - variable_get('maximum_temp_file_age', 1440));
   while ($file = db_fetch_object($result)) {
     if (file_exists($file->filepath)) {
       // If files that exist cannot be deleted, continue so the database remains
