Projet

Général

Profil

Révision fcc9430f

Ajouté par Assos Assos il y a plus de 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/votingapi/votingapi.admin.inc
9 9
 * Administrative settings for VotingAPI.
10 10
 */
11 11
function votingapi_settings_form($form_state) {
12
  $period = array(0 => t('Immediately')) + drupal_map_assoc(array(300, 900, 1800, 3600, 10800, 21600, 32400, 43200, 86400, 172800, 345600, 604800), 'format_interval') + array(-1 => t('Never'));
12
  $period = array(0 => t('Immediately')) + drupal_map_assoc(array(
13
      300,
14
      900,
15
      1800,
16
      3600,
17
      10800,
18
      21600,
19
      32400,
20
      43200,
21
      86400,
22
      172800,
23
      345600,
24
      604800,
25
    ), 'format_interval') + array(-1 => t('Never'));
13 26

  
14 27
  $form['votingapi_anonymous_window'] = array(
15 28
    '#type' => 'select',
16 29
    '#title' => t('Anonymous vote rollover'),
17 30
    '#description' => t('The amount of time that must pass before two anonymous votes from the same computer are considered unique. Setting this to \'never\' will eliminate most double-voting, but will make it impossible for multiple anonymous on the same computer (like internet cafe customers) from casting votes.'),
18 31
    '#default_value' => variable_get('votingapi_anonymous_window', 86400),
19
    '#options' => $period
32
    '#options' => $period,
20 33
  );
21 34

  
22 35
  $form['votingapi_user_window'] = array(
......
24 37
    '#title' => t('Registered user vote rollover'),
25 38
    '#description' => t('The amount of time that must pass before two registered user votes from the same user ID are considered unique. Setting this to \'never\' will eliminate most double-voting for registered users.'),
26 39
    '#default_value' => variable_get('votingapi_user_window', -1),
27
    '#options' => $period
40
    '#options' => $period,
28 41
  );
29 42

  
30 43
  $form['votingapi_calculation_schedule'] = array(
......
35 48
    '#options' => array(
36 49
      'immediate' => t('Tally results whenever a vote is cast'),
37 50
      'cron' => t('Tally results at cron-time'),
38
      'manual' => t('Do not tally results automatically: I am using a module that manages its own vote results.')
51
      'manual' => t('Do not tally results automatically: I am using a module that manages its own vote results.'),
39 52
    ),
40 53
  );
41 54

  

Formats disponibles : Unified diff