function cas_update_6304 in CAS 6.3
Same name and namespace in other branches
- 7 cas.install \cas_update_6304()
Add destination parameter to CAS Login / CAS Logout menu links.
File
- ./
cas.install, line 328 - Installation hooks for the CAS module.
Code
function cas_update_6304() {
// Load and save each link to 'cas' or 'caslogout' so that the 'alter' option
// is enabled. This allows us to append the destination parameter to the
// links at runtime. Since the menu items 'cas' and 'caslogout' are not
// functional without the destination parameter, we do this for all menu
// links, even custom defined ones (i.e., those with module = 'menu').
$link_paths = array(
'cas',
'cas_logout',
);
$result = db_query("SELECT mlid FROM {menu_links} WHERE link_path IN (" . db_placeholders($link_paths, 'varchar') . ")", $link_paths);
while ($record = db_fetch_object($result)) {
$link = menu_link_load($record->mlid);
menu_link_save($link);
}
return array();
}