Changeset 16155
- Timestamp:
- 11/02/2010 05:28:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r16143 r16155 1482 1482 1483 1483 if ( $t->rewrite['hierarchical'] ) { 1484 $q[$t->query_var] = $this->_qv_basename( $q[$t->query_var] );1484 $q[$t->query_var] = wp_basename( $q[$t->query_var] ); 1485 1485 } 1486 1486 … … 1811 1811 $page_for_posts = get_option('page_for_posts'); 1812 1812 if ( ('page' != get_option('show_on_front') ) || empty($page_for_posts) || ( $reqpage != $page_for_posts ) ) { 1813 $q['pagename'] = sanitize_title_for_query( $this->_qv_basename( $q['pagename'] ) );1813 $q['pagename'] = sanitize_title_for_query( wp_basename( $q['pagename'] ) ); 1814 1814 $q['name'] = $q['pagename']; 1815 1815 $where .= " AND ($wpdb->posts.ID = '$reqpage')"; … … 1823 1823 } 1824 1824 } elseif ( '' != $q['attachment'] ) { 1825 $q['attachment'] = sanitize_title_for_query( $this->_qv_basename( $q['attachment'] ) );1825 $q['attachment'] = sanitize_title_for_query( wp_basename( $q['attachment'] ) ); 1826 1826 $q['name'] = $q['attachment']; 1827 1827 $where .= " AND $wpdb->posts.post_name = '" . $q['attachment'] . "'"; … … 3126 3126 return (bool) $this->is_404; 3127 3127 } 3128 3129 /**3130 * i18n friendly way to get the last segment in a path3131 *3132 * @since 3.1.03133 * @access private3134 *3135 * @param string $path The path3136 * @return string3137 */3138 function _qv_basename( $path ) {3139 return basename( str_replace( '%2F', '/', urlencode( urldecode( $path ) ) ) );3140 }3141 3128 } 3142 3129
Note: See TracChangeset
for help on using the changeset viewer.