function update_main

8.0.x update_6.inc update_main()
8.0.x update.inc update_main()
8.0.x update_7.inc update_main()
6.x update_6.inc update_main()
6.x update.inc update_main()
6.x update_7.inc update_main()
7.x update_6.inc update_main()
7.x update.inc update_main()
7.x update_7.inc update_main()
3.x update_6.inc update_main()
3.x update_5.inc update_main()
3.x update_7.inc update_main()
4.x update_6.inc update_main()
4.x update.inc update_main()
4.x update_5.inc update_main()
5.x update_6.inc update_main()
5.x update.inc update_main()
5.x update_7.inc update_main()
master update.inc update_main()
master update_7.inc update_main()
1 call to update_main()
drush_core_updatedb in commands/core/core.drush.inc
Command handler. Execute update.php code from drush.

File

commands/core/drupal/update_7.inc, line 224
Update.php for provisioned sites. This file is a derivative of the standard drupal update.php, which has been modified to allow being run from the command line.

Code

function update_main() {
  update_main_prepare();

  list($pending, $start) = updatedb_status();
  if ($pending) {
    // @todo get table header working.
    // $headers = array(dt('Module'), dt('ID'), dt('Description'));
    drush_print_table($pending);
    if (!drush_confirm(dt('Do you wish to run all pending updates?'))) {
      return drush_user_abort();
    }
    drush_update_batch($start);
  }
  else {
    drush_log(dt("No database updates required"), LogLevel::SUCCESS);
  }

  return count($pending);
}