Changeset 2960317
- Timestamp:
- 08/29/2023 11:49:20 PM (2 years ago)
- Location:
- meta-optimizer
- Files:
-
- 3 added
- 1 edited
-
tags/1.1 (added)
-
tags/1.1/inc (added)
-
tags/1.1/inc/CommentQueries.php (added)
-
trunk/inc/CommentQueries.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
meta-optimizer/trunk/inc/CommentQueries.php
r2960316 r2960317 40 40 41 41 // Change OrderBy 42 $order = ( 'ASC' === strtoupper( $this->Queries->queryVars['order'] ) ) ? 'ASC' : 'DESC';42 $order = isset( $this->Queries->queryVars['order'] ) && ( 'ASC' === strtoupper( $this->Queries->queryVars['order'] ) ) ? 'ASC' : 'DESC'; 43 43 44 44 // Disable ORDER BY with 'none', an empty array, or boolean false. 45 if ( in_array( $this->Queries->queryVars['orderby'], array( 'none', array(), false ), true ) ) { 45 if ( ! isset( $this->Queries->queryVars['orderby'] ) || 46 in_array( $this->Queries->queryVars['orderby'], array( 'none', array(), false ), true ) ) { 46 47 $orderby = ''; 47 48 } elseif ( ! empty( $this->Queries->queryVars['orderby'] ) ) { … … 139 140 * 140 141 * @return string|false Value to use in the ORDER clause. False otherwise. 141 * @global \wpdb $wpdb WordPress database abstraction object.142 * @global \wpdb $wpdb WordPress database abstraction object. 142 143 * 143 144 * @copyright Base on WP_Comment_Query: parse_orderby method.
Note: See TracChangeset
for help on using the changeset viewer.