function sweaver_drush_list_styles in Sweaver 6
Same name and namespace in other branches
- 7 drush/sweaver.drush.inc \sweaver_drush_list_styles()
Get the styles available in the system.
1 call to sweaver_drush_list_styles()
- sweaver_drush_style in drush/
sweaver.drush.inc - Edit a style via drush.
File
- drush/
sweaver.drush.inc, line 255 - Sweaver Drush functions.
Code
function sweaver_drush_list_styles() {
$styles = array();
if (module_exists('sweaver')) {
$i = 1;
// Draft versions.
$result = db_query("SELECT * FROM {sweaver_style_draft}");
while ($row = db_fetch_object($result)) {
$styles[$i] = $row;
$i++;
}
// Live versions.
$result = db_query("SELECT * FROM {sweaver_style} where active = 1");
while ($row = db_fetch_object($result)) {
$styles[$i] = $row;
$i++;
}
}
else {
drush_set_context("DRUSH_EXECUTION_COMPLETED", TRUE);
drush_print('Sweaver is not installed.');
exit;
}
return $styles;
}