function heartbeat_activity_stream_clone_submit in Heartbeat 6.4
Submit functon to clone a stream.
File
- ./
heartbeat.admin.inc, line 509 - Admnistration tasks for heartbeat.
Code
function heartbeat_activity_stream_clone_submit($form, $form_state) {
$used = variable_get('heartbeat_access_types', array());
$base = drupal_strtolower($form_state['values']['stream_base']);
$key = str_replace(array(
'_',
'-',
' ',
), array(
'',
'',
'',
), drupal_strtolower($form_state['values']['stream_name']));
$stream_data = heartbeat_stream_load($base);
$stream_data['name_original'] = $stream_data['name'];
$stream_data['realname'] = $key;
//$stream_data['class'] = $key;
$stream_data['status'] = 'clone';
$stream_data['name'] = $form_state['values']['stream_name'];
$used[$key] = $stream_data;
variable_set('heartbeat_access_types', $used);
}