function taxonomy_defaults_install in Taxonomy Defaults 6.2
Same name and namespace in other branches
- 5 taxonomy_defaults.install \taxonomy_defaults_install()
- 6 taxonomy_defaults.install \taxonomy_defaults_install()
- 7 taxonomy_defaults.install \taxonomy_defaults_install()
Hook sets taxonomy_defaults 'weight' so that it runs after taxonomy
File
- ./
taxonomy_defaults.install, line 13 - Install, update and uninstall functions for the taxonomy_defaults module.
Code
function taxonomy_defaults_install() {
$ret = array();
$weight = 0;
$query = "SELECT weight FROM {system} WHERE type = 'module' AND status = 1 and name = 'taxonomy'";
$result = db_query($query);
if ($row = db_fetch_object($result)) {
$weight = $row->weight;
}
$weight = $weight + 1;
$ret[] = db_query("UPDATE {system} SET weight = " . $weight . " WHERE name = 'taxonomy_defaults'");
return $ret;
}