You are here

function upgrade_assist_block_view in Upgrade Status 6

Implements hook_block_view().

File

upgrade_assist/upgrade_assist.module, line 392
Assists in upgrading Drupal.

Code

function upgrade_assist_block_view($delta) {
  $block = array();
  switch ($delta) {
    case 'tasks':
      $core = variable_get('upgrade_assist_core', NULL);
      $tasks = upgrade_assist_states(TRUE);
      $block['subject'] = t('Upgrade tasks');
      switch ($core) {
        case 6:
          $block['content'] = theme('item_list', $tasks, NULL, 'ol', array(
            'class' => 'task-list',
          ));
          break;
        case 7:
          $block['content'] = theme('item_list', array(
            'items' => $tasks,
            'type' => 'ol',
            'attributes' => array(
              'class' => array(
                'task-list',
              ),
            ),
          ));
          break;
      }
      break;
  }
  return $block;
}