You are here

function patch_manager_command_list in Patch manager 6

Same name and namespace in other branches
  1. 7 patch_manager.drush.inc \patch_manager_command_list()

Patch manager command: list patches

1 string reference to 'patch_manager_command_list'
patch_manager_drush_command in ./patch_manager.drush.inc
Implementation of hook_drush_command().

File

./patch_manager.drush.inc, line 37

Code

function patch_manager_command_list() {
  $res = db_query('SELECT nid, title FROM {node} WHERE type="patch"');
  $rows = array();
  while ($node = db_fetch_object($res)) {
    $rows[] = array(
      $node->nid,
      $node->title,
    );
  }
  $header = array(
    t('#'),
    t('Title'),
  );
  $tbl = new Console_Table(CONSOLE_TABLE_ALIGN_LEFT, '');
  $out = $tbl
    ->fromArray($header, $rows);
  drush_print($out);
}