function i18n_menu_node_install in Menu translation - Node 7
Implementation of hook_install().
File
- ./
i18n_menu_node.install, line 14 - Installation file for the Menu translation (Node) module.
Code
function i18n_menu_node_install() {
global $i18n_menu_node_install;
$i18n_menu_node_install = TRUE;
$result = db_select('system', 's')
->fields('s', array(
'weight',
))
->condition('name', 'i18n_menu')
->execute()
->fetchAssoc();
if ($result) {
$weight = $result['weight'] + 1;
db_update('system')
->fields(array(
'weight' => $weight,
))
->condition('name', 'i18n_menu_node')
->execute();
}
}