drupal_get_installed_schema_version

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 drupal_get_installed_schema_version($module, $reset = FALSE, $array = FALSE)

Returns the currently installed schema version for a module.

Übergabeparameter

$module A module name.

$reset Set to TRUE after modifying the system table.

$array Set to TRUE if you want to get information about all modules in the system.

Rückgabewert

The currently installed schema version.

▾ 6 functions call drupal_get_installed_schema_version()

drupal_load_updates in includes/install.inc
Initialize the update system by loading all installed module's .install files.
system_modules_submit in modules/system/system.admin.inc
Submit callback; handles modules form submission.
system_requirements in modules/system/system.install
Test and report Drupal installation requirements.
update_fix_d6_requirements in ./update.php
Perform Drupal 5.x to 6.x updates that are required for update.php to function properly.
update_script_selection_form in ./update.php
_drupal_install_module in includes/install.inc
Callback to install an individual profile module.

Code

includes/install.inc, line 72

<?php
function drupal_get_installed_schema_version($module, $reset = FALSE, $array = FALSE) {
  static $versions = array();

  if ($reset) {
    $versions = array();
  }

  if (!$versions) {
    $versions = array();
    $result = db_query("SELECT name, schema_version FROM {system} WHERE type = '%s'", 'module');
    while ($row = db_fetch_object($result)) {
      $versions[$row->name] = $row->schema_version;
    }
  }

  return $array ? $versions : $versions[$module];
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen