function forward_update_3 in Forward 6
Same name and namespace in other branches
- 5 forward.install \forward_update_3()
- 7 forward.install \forward_update_3()
Changed forward_statistics to handle non-node paths
File
- ./
forward.install, line 105
Code
function forward_update_3() {
$ret = array();
db_add_field($ret, 'forward_log', 'path', array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '<front>',
));
db_add_index($ret, 'forward_log', 'forward_path', array(
'path',
));
$ret[] = update_sql("UPDATE {forward_log} SET path = CONCAT('node/',nid) WHERE nid != 0");
$ret[] = update_sql("UPDATE {forward_log} SET path = '<front>' WHERE nid = 0");
db_drop_index($ret, 'forward_log', 'forward_nid');
db_drop_field($ret, 'forward_log', 'nid');
return $ret;
}