1 system.module 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 ('module', 'theme', 'layout').


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


function system_get_files_database(&$files, $type) {
  // Extract current files from database.
  $result = db_query("SELECT filename, name, type, status, schema_version, weight FROM {system} WHERE type = :type", array(':type' => $type));
  foreach ($result as $file) {
    if (isset($files[$file->name]) && is_object($files[$file->name])) {
      $file->uri = $file->filename;
      foreach ($file as $key => $value) {
        if (!isset($files[$file->name]->$key)) {
          $files[$file->name]->$key = $value;