Changeset 818
- Timestamp:
- Sep 10, 2024 12:05:14 AM (9 days ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/examples/_config.inc.php
r803 r818 116 116 117 117 // Prettify json when testing. 118 'json_options' => ENVIRONMENT === PRODUCTION ? 0 : JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ,118 'json_options' => ENVIRONMENT === PRODUCTION ? 0 : JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE, 119 119 ]); 120 120 -
trunk/lib/App.inc.php
r815 r818 234 234 235 235 // Prettify json when testing. 236 'json_options' => JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ,236 'json_options' => JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE, 237 237 ); 238 238 -
trunk/lib/SortOrder.inc.php
r812 r818 234 234 * 235 235 * @access public 236 * @param array $cols Array of column keys (printed in <option value="âŠ">) and names (human-readable) 236 * @param array $cols Array of column keys and optional sort orders (printed in <option value="âŠ">) and names (human-readable). E.g.: 237 * [ 238 * 'lecture_tbl.added_datetime--ASC' => _("Added date (oldest first)"), 239 * 'lecture_tbl.added_datetime--DESC' => _("Added date (newest first)"), 240 * ] 237 241 * @return 238 242 * @author Quinn Comendant <quinn@strangecode.com> 239 243 * @since 18 May 2019 15:27:21 240 244 */ 241 public function printSortSelectMenu($cols )242 { 243 $app =& App::getInstance(); 244 245 ?><select name="sort" id="sort"><?php245 public function printSortSelectMenu($cols, $select_attributes='name="sort" id="sort"') 246 { 247 $app =& App::getInstance(); 248 249 ?><select <?php echo $select_attributes; ?>><?php 246 250 foreach ($cols as $col => $col_name) { 247 if (!isset($this->_columns[$col])) { 251 list($sort, $order) = array_pad(explode('--', $col), 2, null); 252 if (!isset($this->_columns[$sort])) { 248 253 $app->logMsg(sprintf('Sort select option %s is not setup via setColumn', $col), LOG_NOTICE, __FILE__, __LINE__); 249 254 } 250 255 printf('<option value="%s"%s>%s</option>', 251 256 $col, 252 ($this->sort_by == $ col? ' selected="selected"' : ''),257 ($this->sort_by == $sort && (!isset($order) || $this->order == $order) ? ' selected="selected"' : ''), 253 258 strip_tags($col_name) 254 259 );
Note: See TracChangeset
for help on using the changeset viewer.