summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/simpletest/tests/file.test2
-rw-r--r--modules/system/system.test4
-rw-r--r--modules/upload/upload.module2
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/simpletest/tests/file.test b/modules/simpletest/tests/file.test
index 861cbdc17..dc9f08f61 100644
--- a/modules/simpletest/tests/file.test
+++ b/modules/simpletest/tests/file.test
@@ -86,7 +86,7 @@ class FileTestCase extends DrupalWebTestCase {
$file->uid = 1;
$file->timestamp = REQUEST_TIME;
$file->filesize = filesize($file->filepath);
- $file->status = FILE_STATUS_TEMPORARY;
+ $file->status = 0;
$this->assertNotIdentical(drupal_write_record('files', $file), FALSE, t('The file was added to the database.'));
return $file;
diff --git a/modules/system/system.test b/modules/system/system.test
index c751bcdc8..3773af13c 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -263,12 +263,12 @@ class CronRunTestCase extends DrupalWebTestCase {
// Temporary file that is older than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
$temp_old = file_save_data('');
- db_query('UPDATE {files} SET status = :status, timestamp = :timestamp WHERE fid = :fid', array(':status' => FILE_STATUS_TEMPORARY, ':timestamp' => 1, ':fid' => $temp_old->fid));
+ db_query('UPDATE {files} SET status = :status, timestamp = :timestamp WHERE fid = :fid', array(':status' => 0, ':timestamp' => 1, ':fid' => $temp_old->fid));
$this->assertTrue(file_exists($temp_old->filepath), t('Old temp file was created correctly.'));
// Temporary file that is less than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
$temp_new = file_save_data('');
- db_query('UPDATE {files} SET status = :status WHERE fid = :fid', array(':status' => FILE_STATUS_TEMPORARY, ':fid' => $temp_new->fid));
+ db_query('UPDATE {files} SET status = :status WHERE fid = :fid', array(':status' => 0, ':fid' => $temp_new->fid));
$this->assertTrue(file_exists($temp_new->filepath), t('New temp file was created correctly.'));
// Permanent file that is older than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 3b9a87b6b..4a3ed59f6 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -528,7 +528,7 @@ function upload_save(&$node) {
->condition('vid', $node->vid, '=')
->execute();
}
- $file->status &= FILE_STATUS_PERMANENT;
+ $file->status |= FILE_STATUS_PERMANENT;
$file = file_save($file);
}
}