summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/handlers/views_handler_sort_random.inc
blob: 75f3153efdbf6618879aee7c00de74825e6b7996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

/**
 * Handle a random sort.
 *
 * @ingroup views_sort_handlers
 */
class views_handler_sort_random extends views_handler_sort {
  function query() {
    $this->query->add_orderby('rand');
  }

  function options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);
    $form['order']['#access'] = FALSE;
  }
}