Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
system.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Dec 2008 at 01:55 UTC
Updated:
11 Nov 2009 at 06:09 UTC
Little bit optimizations -
function system_get_files_database(&$files, $type) {
// Extract current files from database.
$result = db_query("SELECT filename, name, type, status, throttle, schema_version FROM {system} WHERE type = '%s'", $type);
while ($file = db_fetch_object($result)) {
if (isset($files[$file->name]) && is_object($files[$file->name])) { //check if file on disk
$file->old_filename = $file->filename;
foreach ($file as $key => $value) {
- if (!isset($files[$file->name]) || !isset($files[$file->name]->$key)) { // first condition always FALSE because of parent if
+ if (!isset($files[$file->name]->$key)) {
$files[$file->name]->$key = $value;
}
}
}
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| system_files_D6.patch | 801 bytes | andypost | |
| system_files_D7.patch | 788 bytes | andypost |
Comments
Comment #2
sunI think this is fixed in #625744: Duplicate modules cause epic fail