system_get_files_database

Versions
4.6 – 7
system_get_files_database(&$files, $type)

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

▾ 2 functions call system_get_files_database()

system_module_listing in modules/system.module
Generate a list of all the available modules, as well as update the system list.
system_theme_data in modules/system.module
Collect data about all currently available themes

Code

modules/system.module, line 296

<?php
function system_get_files_database(&$files, $type) {
  // Extract current files from database.
  $result = db_query("SELECT name, type, status, throttle FROM {system} WHERE type = '%s'", $type);
  while ($file = db_fetch_object($result)) {
    if (is_object($files[$file->name])) {
      foreach ($file as $key => $value) {
        if (!$files[$file->name]->$key) {
          $files[$file->name]->$key = $value;
        }
      }
    }
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.