Ignore:
Timestamp:
Feb 20, 2014 3:03:59 AM (10 years ago)
Author:
anonymous
Message:

Completed integrating /branches/eli_branch into /trunk. Changes include:

  • Removed closing ?> from end of files
  • Upgrade old-style contructor methods to use construct() instead.
  • Class properties and methods defined as public, private, static or protected
  • Ensure code runs under E_ALL with only mysql_* deprecated warnings
  • Search for the '@' symbol anywhere it might be used to supress runtime errors, then replace with proper error recovery.
  • Run the php cli -l option to check files for syntax errors.
  • Bring tests up-to-date with latest version and methods of PHPUnit
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/lib/SortOrder.inc.php

    r457 r468  
    3737class SortOrder {
    3838
    39     var $_columns;
    40     var $sort_by;
    41     var $order;
    42     var $asc_widget;
    43     var $desc_widget;
    44     var $default_sort;
    45     var $default_order;
     39    private $_columns;
     40    public $sort_by;
     41    public $order;
     42    public $asc_widget;
     43    public $desc_widget;
     44    public $default_sort;
     45    public $default_order;
    4646
    4747    /**
     
    5353     *                               current order.
    5454     */
    55     function SortOrder($default_sort = '', $default_order = '')
     55    public function __construct($default_sort = '', $default_order = '')
    5656    {
    5757        $app =& App::getInstance();
     
    8181     * @param string $desc_sql  The sort SQL if $this->order is descending.
    8282     */
    83     function setColumn($name, $asc_sql, $desc_sql)
     83    public function setColumn($name, $asc_sql, $desc_sql)
    8484    {
    8585        $this->_columns[$name] = array(
     
    9999     *                               current order.
    100100     */
    101     function setDefault($default_sort = '', $default_order = '')
     101    public function setDefault($default_sort = '', $default_order = '')
    102102    {
    103103        // Which column to sort by?
     
    139139     *                               for example, for an alphabetical sort)
    140140     */
    141     function set($sort=null, $order=null, $save_value=true)
     141    public function set($sort=null, $order=null, $save_value=true)
    142142    {
    143143        // Set new sort value.
     
    163163     * @return array    Array with keys: sort and order. These can be fed back into the SortOrder::set() method or defaults.
    164164     */
    165     function get()
     165    public function get()
    166166    {
    167167        return array(
     
    174174     * Returns the SQL code to sort by set column and set order.
    175175     */
    176     function getSortOrderSQL()
     176    public function getSortOrderSQL()
    177177    {
    178178        $app =& App::getInstance();
     
    205205     *                               for example, for an alphabetical sort)
    206206     */
    207     function printSortHeader($col, $col_name, $default_order='ASC')
     207    public function printSortHeader($col, $col_name, $default_order='ASC')
    208208    {
    209209        $app =& App::getInstance();
     
    226226}
    227227
    228 ?>
Note: See TracChangeset for help on using the changeset viewer.