Changeset d5342aa in github for program/include/rcube_imap.inc
- Timestamp:
- Nov 25, 2007 2:45:38 PM (6 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 1107480
- Parents:
- c579961
- File:
-
- 1 edited
-
program/include/rcube_imap.inc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_imap.inc
rc007e6a rd5342aa 6 6 | | 7 7 | This file is part of the RoundCube Webmail client | 8 | Copyright (C) 2005-200 6, RoundCube Dev. - Switzerland |8 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | 9 9 | Licensed under the GNU GPL | 10 10 | | … … 36 36 * @package Mail 37 37 * @author Thomas Bruederli <roundcube@gmail.com> 38 * @version 1. 3938 * @version 1.40 39 39 * @link http://ilohamail.org 40 40 */ … … 528 528 return $this->_list_header_set($mailbox, $this->search_set, $page, $sort_field, $sort_order); 529 529 530 if ($sort_field!=NULL) 531 $this->sort_field = $sort_field; 532 if ($sort_order!=NULL) 533 $this->sort_order = strtoupper($sort_order); 530 $this->_set_sort_order($sort_field, $sort_order); 534 531 535 532 $max = $this->_messagecount($mailbox); … … 648 645 return array(); 649 646 650 if ($sort_field!=NULL) 651 $this->sort_field = $sort_field; 652 if ($sort_order!=NULL) 653 $this->sort_order = strtoupper($sort_order); 647 $this->_set_sort_order($sort_field, $sort_order); 654 648 655 649 $max = count($msgs); … … 765 759 function message_index($mbox_name='', $sort_field=NULL, $sort_order=NULL) 766 760 { 767 if ($sort_field!=NULL) 768 $this->sort_field = $sort_field; 769 if ($sort_order!=NULL) 770 $this->sort_order = strtoupper($sort_order); 761 $this->_set_sort_order($sort_field, $sort_order); 771 762 772 763 $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; … … 2446 2437 } 2447 2438 2439 /** 2440 * Validate the given input and save to local properties 2441 * @access private 2442 */ 2443 function _set_sort_order($sort_field, $sort_order) 2444 { 2445 if ($sort_field != null) 2446 $this->sort_field = asciiwords($sort_field); 2447 if ($sort_order != null) 2448 $this->sort_order = strtoupper($sort_order) == 'DESC' ? 'DESC' : 'ASC'; 2449 } 2448 2450 2449 2451 /**
Note: See TracChangeset
for help on using the changeset viewer.
