hosting_task_handler_sort_default.inc

Classes

Namesort descending Description
hosting_task_handler_sort_default Handle the default hosting task sort order.

File

task/includes/views/handlers/hosting_task_handler_sort_default.inc
View source
  1. <?php
  2. /**
  3. * Handle the default hosting task sort order.
  4. */
  5. class hosting_task_handler_sort_default extends views_handler_sort {
  6. function query() {
  7. $this->query->add_orderby(NULL, "FIELD(task_status, 0, -1, '>0')", 'ASC', '_' . $this->field);
  8. $this->query->add_orderby(NULL, 'executed', 'DESC', '_' . $this->field);
  9. $this->query->add_orderby(NULL, 'node.created', 'DESC', '_' . $this->field);
  10. }
  11. function options_form(&$form, &$form_state) {
  12. parent::options_form($form, $form_state);
  13. $form['order']['#access'] = FALSE;
  14. }
  15. }