/[drupal]/contributions/modules/weight/weight_handler_sort.inc
ViewVC logotype

Contents of /contributions/modules/weight/weight_handler_sort.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Thu Nov 13 18:35:39 2008 UTC (12 months, 1 week ago) by nancyw
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1
Changes since 1.1: +9 -4 lines
File MIME type: text/x-php
Fix Coder finds
1 <?php
2 // $Id$
3 /**
4 * @file
5 * Sort handler for Weight module.
6 */
7 class weight_handler_sort extends views_handler_sort {
8
9 function query() {
10 $this->ensure_my_table();
11 // Reverse ASC and DESC for weight order so that the sticky weights are ordered like real weights.
12 if ($this->options['order'] == 'ASC') {
13 $this->options['order'] = 'DESC';
14 }
15 elseif ($this->options['order'] == 'DESC') {
16 $this->options['order'] = 'ASC';
17 }
18 $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']);
19 }
20 }

  ViewVC Help
Powered by ViewVC 1.1.2