You are here

function system_get_files_database in Drupal 4

Same name and namespace in other branches
  1. 5 modules/system/system.module \system_get_files_database()
  2. 6 modules/system/system.module \system_get_files_database()
  3. 7 modules/system/system.module \system_get_files_database()

Retrieves the current status of an array of files in the system table.

2 calls to system_get_files_database()
system_modules in modules/system.module
Menu callback; displays a listing of all modules.
system_theme_data in modules/system.module
Collect data about all currently available themes

File

modules/system.module, line 531
Configuration system that lets administrators modify the workings of the site.

Code

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;
        }
      }
    }
  }
}