Module is exactly what I needed for managing my guild's loot priority list. Thanks. :D

There seems to be an issue with the infinite queue size. It doesn't allow me to add users when I've set the size to 0 (infinite).

Comments

xmattus’s picture

Good catch - I realize now that I neglected to add special logic to ignore the queue length check if the length is 0. I'll fix that in the 6.x-1.1 version.

nicholasthompson’s picture

Status: Active » Needs review

The fix is on line 465..

if (count($form_state['values']['users']) >= $form['#max_size']) {

to

if ($form['#max_size'] > 0 && count($form_state['values']['users']) >= $form['#max_size']) {

cheers,
Nick

mrf’s picture

Version: 6.x-1.0 » 6.x-1.1

Still seeing this on the 1.1 version.

notice: Undefined index: users in /home/mrf/Sites/drupal6/sites/all/modules/userqueue/userqueue.module on line 465.
No additional users are allowed in this queue.

tinny’s picture

I've set the queue to unlimited size and it works but every time I edit the settings form it doesnt set the default value to 0 so i have to keep resetting it.

This is because empty() returns false if the value is 0.

I added $queue->size == 0 to check for this

function userqueue_edit_form($form, &$form_state, $queue) {
  $form['size'] = array(
    '#type' => 'textfield',
    '#title' => t('Queue length'),
    '#size' => 5,
    '#default_value' => !empty($queue->size) || $queue->size == 0 ? check_plain($queue->size) : '',
    '#description' => t('Maximum number of users allowed in the queue'),
  );

gaurav.kapoor’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Not maintaining D6 version.