### Eclipse Workspace Patch 1.0
#P wordpress
|
|
|
|
| 2262 | 2262 | $query .= $author_query; |
| 2263 | 2263 | $query .= " ORDER BY " . $sort_column . " " . $sort_order ; |
| 2264 | 2264 | |
| 2265 | | $pages = $wpdb->get_results($query); |
| | 2265 | $pages = $wpdb->geresults($query); |
| 2266 | 2266 | |
| 2267 | 2267 | if ( empty($pages) ) { |
| 2268 | 2268 | $pages = apply_filters('get_pages', array(), $r); |
| … |
… |
|
| 2276 | 2276 | $pages = & get_page_children($child_of, $pages); |
| 2277 | 2277 | |
| 2278 | 2278 | if ( !empty($exclude_tree) ) { |
| 2279 | | $exclude = array(); |
| 2280 | | |
| 2281 | | $exclude = (int) $exclude_tree; |
| 2282 | | $children = get_page_children($exclude, $pages); |
| 2283 | | $excludes = array(); |
| 2284 | | foreach ( $children as $child ) |
| 2285 | | $excludes[] = $child->ID; |
| 2286 | | $excludes[] = $exclude; |
| | 2279 | $excludes = array_map('intval', explode(',', $exclude_tree)); |
| | 2280 | |
| | 2281 | // exclude tree will work as describben - self and direct childs only (!) |
| 2287 | 2282 | $total = count($pages); |
| 2288 | 2283 | for ( $i = 0; $i < $total; $i++ ) { |
| 2289 | | if ( in_array($pages[$i]->ID, $excludes) ) |
| | 2284 | if ( in_array($pages[$i]->ID, $excludes) |
| | 2285 | || in_array($pages[$i]->post_parent, $excludes)) |
| 2290 | 2286 | unset($pages[$i]); |
| 2291 | 2287 | } |
| 2292 | 2288 | } |