On this page
public function ModuleUpdater::getSchemaUpdates
public ModuleUpdater::getSchemaUpdates()
Return available database schema updates one a new version is installed.
File
- modules/system/system.updater.inc, line 54
- Subclasses of the Updater class to update Drupal core knows how to update. At this time, only modules and themes are supported.
Class
- ModuleUpdater
- Class for updating modules using FileTransfer classes via authorize.php.
Code
public function getSchemaUpdates() {
require_once DRUPAL_ROOT . '/includes/install.inc';
require_once DRUPAL_ROOT . '/includes/update.inc';
if (_update_get_project_type($project) != 'module') {
return array();
}
module_load_include('install', $project);
if (!$updates = drupal_get_schema_versions($project)) {
return array();
}
$updates_to_run = array();
$modules_with_updates = update_get_update_list();
if ($updates = $modules_with_updates[$project]) {
if ($updates['start']) {
return $updates['pending'];
}
}
return array();
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.updater.inc/function/ModuleUpdater::getSchemaUpdates/7.x