There are a few potential improvements for the file_entity_file_insert and file_entity_file_update functions.

1. The db_merge function is used to insert data into the file_metadata table, when a simple db_insert is sufficient.

2. There is duplicate code in the file_entity_file_update function.

3. The db_delete function in file_entity_file_update function doesn't get executed (which might be the reason for the db_merge).

Patch to come.

Comments

Schoonzie’s picture

Status: Active » Needs review
StatusFileSize
new1.96 KB
hefox’s picture

Working and seems good

sheldonkreger’s picture

dave reid’s picture

Status: Needs review » Fixed

I converted the db_insert() calls to a just one query with multiple inserts, and committed to 7.x-2.x.

Status: Fixed » Closed (fixed)

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