Posted by CitizenKane on December 29, 2008 at 8:38pm
8 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | upload.module |
| Category: | task |
| Priority: | normal |
| Assigned: | CitizenKane |
| Status: | closed (fixed) |
Issue Summary
Parts of upload.module had not been converted to DB:TNG. Patch is attached which remedies that.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| upload-module-dbtng.patch | 2.92 KB | Idle | Unable to apply patch upload-module-dbtng.patch | View details |
Comments
#1
The $fields array for the insert query in the last hunk should be inline in the fields() method, to be consistent with the rest of core. That is:
<?phpdb_insert('upload')
->fields(array(
'fid' => $file->fid,
'nid' => $node->nid,
'vid' => $node->vid,
'list' => $file->list,
'description' => $file->description,
'weight' => $file->weight,
))
->execute();
?>
The same for the db_update() call right after it. Also, please break each method out to its own line as above, with each method indented two spaces from the first line. Otherwise this looks good.
#2
Re-rolled patch. Fixed style as per #1.
#3
Looks good to me. Tests still pass. RTBC.
#4
looks good to me too.
#5
It appears this patch has just been committed, and I was just about to chime in to say it looks good!
#6
Forgot to mark it as fixed. Thanks for the patch.
#7
Automatically closed -- issue fixed for two weeks with no activity.
#8
This patch broke upload permissions. :P
#371206: upload_file_download() Blocks Access to Files Upload Doesn't Own fixes the problem again.