function advpoll_update_7000 in Advanced Poll 7.3
Removes Show votes option.
File
- ./
advpoll.install, line 811 - Install file for Advanced Poll.
Code
function advpoll_update_7000() {
db_delete('field_data_advpoll_options')
->condition('advpoll_options_value', 'showvotes')
->execute();
// Fetch the t function for use in install.
$t = get_t();
/* Remove options that are no longer valid from initial build and replace
* only with valid options.
*/
$field = array(
'field_name' => 'advpoll_options',
'settings' => array(
'allowed_values' => array(
'writein' => $t('Allow users to cast write-in votes'),
'electoral' => $t('Restrict voting to electoral list'),
'block' => $t('Generate a block for this poll'),
),
'allowed_values_function' => '',
),
);
field_update_field($field);
}