Changeset 321
- Timestamp:
- Apr 3, 2008 11:03:55 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/SortOrder.inc.php
r316 r321 162 162 /** 163 163 * Prints a link for a column header with URL sort determining logic. 164 * Column must be defined first using setColumn(). 164 165 * 165 166 * @param string $col The database column to sort by. … … 172 173 $app =& App::getInstance(); 173 174 174 if ($this->sort_by == $col) { 175 if (mb_strtolower($this->order) == 'desc') { 176 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=ASC'); ?>" title="<?php echo _("Change to ascending sort order"); ?>"><?php echo $this->desc_widget; ?></a><?php echo $col_name; ?><?php 175 if (isset($this->_columns[$col])) { 176 if ($this->sort_by == $col) { 177 if (mb_strtolower($this->order) == 'desc') { 178 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=ASC'); ?>" title="<?php echo _("Change to ascending sort order"); ?>"><?php echo $this->desc_widget; ?></a><?php echo $col_name; ?><?php 179 } else { 180 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=DESC'); ?>" title="<?php echo _("Change to descending sort order"); ?>"><?php echo $this->asc_widget; ?></a><?php echo $col_name; ?><?php 181 } 177 182 } else { 178 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order= DESC'); ?>" title="<?php echo _("Change to descending sort order"); ?>"><?php echo $this->asc_widget; ?></a><?php echo $col_name; ?><?php179 } 183 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=' . $default_order); ?>" title="<?php echo sprintf(_("Sort by %s"), $col_name); ?>"><?php echo $col_name; ?></a><?php 184 } 180 185 } else { 181 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=' . $default_order); ?>" title="<?php echo sprintf(_("Sort by %s"), $col_name); ?>"><?php echo $col_name; ?></a><?php186 echo $col_name; 182 187 } 183 188 }
Note: See TracChangeset
for help on using the changeset viewer.