Changeset 452 for trunk/lib/SortOrder.inc.php
- Timestamp:
- Dec 25, 2013 12:47:12 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/SortOrder.inc.php
-
Property
svn:mergeinfo
set to
/branches/eli_branch/lib/SortOrder.inc.php merged eligible
r396 r452 4 4 * For details visit the project site: <http://trac.strangecode.com/codebase/> 5 5 * Copyright 2001-2012 Strangecode, LLC 6 * 6 * 7 7 * This file is part of The Strangecode Codebase. 8 8 * … … 11 11 * Free Software Foundation, either version 3 of the License, or (at your option) 12 12 * any later version. 13 * 13 * 14 14 * The Strangecode Codebase is distributed in the hope that it will be useful, but 15 15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 16 16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 17 * details. 18 * 18 * 19 19 * You should have received a copy of the GNU General Public License along with 20 20 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 24 24 * SortOrder.inc.php 25 25 * 26 * SortOrder can determin ghow to sort results of a database query for display26 * SortOrder can determine how to sort results of a database query for display 27 27 * on a listing. It can print column headers that will be links to 28 28 * automatically change the sort and order. … … 56 56 { 57 57 $app =& App::getInstance(); 58 58 59 59 // Setup the HTML for printing ASC/DESC paths. 60 60 // This should be converted to CSS someday. … … 62 62 $this->asc_widget = sprintf('<img src="%s/sort_ascending.gif" alt="%s" width="11" height="7" border="0" />', $images_path, _("Ascending")); 63 63 $this->desc_widget = sprintf('<img src="%s/sort_descending.gif" alt="%s" width="11" height="7" border="0" />', $images_path, _("Ascending")); 64 64 65 65 // Setup prefs object. 66 66 $this->prefs = new Prefs($_SERVER['PHP_SELF']); … … 154 154 } 155 155 156 /** 157 * Get the current sort and order values. 158 * 159 * @return array Array with keys: sort and order. These can be fed back into the SortOrder::set() method or defaults. 160 */ 161 function get() 162 { 163 return array( 164 'sort' => $this->prefs->get('sort_by'), 165 'order' => $this->prefs->get('sort_order'), 166 ); 167 } 156 168 157 169 /** … … 202 214 } else { 203 215 ?><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 204 } 216 } 205 217 } else { 206 218 echo $col_name; -
Property
svn:mergeinfo
set to
Note: See TracChangeset
for help on using the changeset viewer.