system_get_files_database
modules/system/system.module, строка 748
- Версии
- 5 – 6
system_get_files_database(&$files, $type)
Retrieves the current status of an array of files in the system table.
Параметры
$files
An array of files to check.
$type
The type of the files.
Код
<?php
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])) {
$file->old_filename = $file->filename;
foreach ($file as $key => $value) {
if (!isset($files[$file->name]) || !isset($files[$file->name]->$key)) {
$files[$file->name]->$key = $value;
}
}
}
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии