You are here

function skinr_skinset_statuses in Skinr 6.2

Return an array of statuses of each skin in a skinset for each theme.

Parameters

$skinset_name: The name of the skinset of which to load the statuses.

$refresh: Whether to reload the list of statuses for a skin from the database or not.

Return value

Array of statuses for individual skins in a skinset.

1 call to skinr_skinset_statuses()
skinr_skinsets in ./skinr.module
Helper function to process an array of skins or themes .info files.

File

./skinr.module, line 935

Code

function skinr_skinset_statuses($skinset_name, $refresh = FALSE) {
  static $statuses = array();
  if (isset($refresh)) {
    $statuses[$skinset_name] = array();
  }
  if (empty($statuses[$skinset_name])) {
    $result = db_query("SELECT * FROM {skinr_skins} WHERE name = '%s'", $skinset_name);
    while ($skinr_skin = db_fetch_object($result)) {
      $statuses[$skinset_name][$skinr_skin->skin] = unserialize($skinr_skin->status);
    }
  }
  return $statuses[$skinset_name];
}