Ignore:
Timestamp:
Dec 19, 2005 7:10:45 AM (18 years ago)
Author:
scdev
Message:

${1}

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SortOrder.inc.php

    r43 r44  
    106106
    107107    /**
    108      * Set sort and order values. This is how you set new sort values after
     108     * Forcibly set sort and order values. This is how you set new sort values after
    109109     * already declaring a SortOrder object. This will ignore getFormData values.
    110110     *
    111      * @param string $col            The database column to sort by.
    112      * @param string $col_name       The human-readable title of the column.
    113      * @param string $default_order  The default order for this column (ASC,
     111     * @param string $sort           The sort by name.
     112     * @param string $order          The order direction (ASC,
    114113     *                               for example, for an alphabetical sort)
    115114     */
     
    144143
    145144        if (!empty($this->_columns[strtolower($this->sort_by)][strtolower($this->order)])) {
    146             return ' ORDER BY ' . addslashes($this->_columns[strtolower($this->sort_by)][strtolower($this->order)]);
     145            return sprintf(' ORDER BY %s ', addslashes($this->_columns[strtolower($this->sort_by)][strtolower($this->order)]));
    147146        } else {
    148147            App::logMsg(sprintf('Could not find SQL to sort by %s %s.', $this->sort_by, $this->order), LOG_WARNING, __FILE__, __LINE__);
Note: See TracChangeset for help on using the changeset viewer.