You are here

function skinr_get_files_database in Skinr 6.2

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

Parameters

$files: An array of files to check.

1 call to skinr_get_files_database()
skinr_rebuild_skinset_data in ./skinr.module
Rebuild, save, and return data about all currently available skinsets.

File

./skinr.module, line 991

Code

function skinr_get_files_database(&$files) {

  // Extract current files from database.
  $result = db_query("SELECT filename, name, status FROM {skinr_skinsets}");
  while ($file = db_fetch_object($result)) {
    if (isset($files[$file->name]) && is_object($files[$file->name])) {
      $file->uri = $file->filename;
      foreach ($file as $key => $value) {
        if (!isset($files[$file->name]) || !isset($files[$file->name]->{$key})) {
          $files[$file->name]->{$key} = $value;
        }
      }
    }
  }
}