Follow-up for: #1681904: Ability to configure a url to redirect to in site configuration.
The redirection field has changed from an int to a varchar.
Sites that have not been edited recently can still have a '1' value, letting the site redirect to http://1/.
I think this update hook will fix the issue, but I'll try t verify in the coming week.
/**
* Fixup redirection data after table change in hosting_alias_update_6203()
*/
function hosting_alias_update_6204() {
$ret = array();
$result = db_query("SELECT `nid` FROM {hosting_site_alias} WHERE `redirection`=1");
while ($obj = db_fetch_object($result)) {
$node = node_load($obj->nid);
if (is_object($node)) {
$node->redirection = $node->title;
hosting_alias_update($node);
}
}
return $ret;
}
Comments
Comment #1
helmo commentedTested on another system, and added:
Comment #2
anarcat commentedgo go go.
Comment #3
anarcat commentedactually, i just pushed this already.