Parts of upload.module had not been converted to DB:TNG. Patch is attached which remedies that.

Comments

Crell’s picture

Status: Needs review » Needs work

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:

db_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.

theflowimmemorial’s picture

Status: Needs work » Needs review
StatusFileSize
new3.03 KB

Re-rolled patch. Fixed style as per #1.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Tests still pass. RTBC.

drewish’s picture

looks good to me too.

Anonymous’s picture

It appears this patch has just been committed, and I was just about to chime in to say it looks good!

dries’s picture

Status: Reviewed & tested by the community » Fixed

Forgot to mark it as fixed. Thanks for the patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

quicksketch’s picture

This patch broke upload permissions. :P

#371206: upload_file_download() Blocks Access to Files Upload Doesn't Own fixes the problem again.