function skinr_rebuild_skinset_data in Skinr 6.2
Rebuild, save, and return data about all currently available skinsets.
Return value
Array of all available skinsets and their data.
2 calls to skinr_rebuild_skinset_data()
- skinr_skinsets in ./
skinr.module - Helper function to process an array of skins or themes .info files.
- skinr_ui_skinsets_form in ./
skinr_ui.admin.inc - Menu callback; displays a listing of all non-theme skinsets.
2 string references to 'skinr_rebuild_skinset_data'
- skinr_flush_caches in ./
skinr.module - Implementation of hook_flush_caches().
- skinr_skinsets in ./
skinr.module - Helper function to process an array of skins or themes .info files.
File
- ./
skinr.module, line 958
Code
function skinr_rebuild_skinset_data() {
// Fix for update script.
if (defined('MAINTENANCE_MODE')) {
return array();
}
$skinsets = _skinr_skins_data();
skinr_get_files_database($skinsets);
db_query("DELETE FROM {skinr_skinsets}");
foreach ($skinsets as $skinset) {
db_query("INSERT INTO {skinr_skinsets} (filename, name, status, info) VALUES ('%s', '%s', '%s', '%s')", $skinset->filename, $skinset->name, isset($skinset->status) ? $skinset->status : 0, serialize($skinset->info));
}
variable_set('skinr_rebuild_skinset_data', FALSE);
return $skinsets;
}