You are here

function db_maintenance_block in DB Maintenance 5

Same name and namespace in other branches
  1. 5.2 db_maintenance.module \db_maintenance_block()

Implementation of hook_block().

Parameters

string $op:

integer $delta:

Return value

string or array

File

./db_maintenance.module, line 218
Optimizes database tables during cron runs.

Code

function db_maintenance_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      $blocks[0]['info'] = 'Database size';
      return $blocks;
      break;
    case 'configure':
    case 'save':
      break;
    case 'view':
      if (user_access('access content')) {
        return array(
          'content' => theme('db_maintenance_block'),
        );
      }
      break;
  }
}