Make WordPress Core


Ignore:
Timestamp:
03/27/2005 08:45:01 PM (21 years ago)
Author:
ryan
Message:

Cacheing cleanup. Introduce get_post() and get_category(). http://mosquito.wordpress.org/view.php?id=1157

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r2475 r2478  
    218218        }
    219219
    220         function get_posts() {
     220        function &get_posts() {
    221221                global $wpdb, $pagenow, $request, $user_ID;
    222222
     
    596596        }
    597597   
    598         function query($query) {
     598        function &query($query) {
    599599                $this->parse_query($query);
    600600                return $this->get_posts();
     
    610610
    611611                if ($this->is_category) {
    612                         global $cache_categories;
    613                         if (isset($cache_categories[$this->get('cat')])) {
    614                                 $this->queried_object = $cache_categories[$this->get('cat')];
    615                                 $this->queried_object_id = $this->get('cat');
    616                         }
     612                        $category = &get_category($this->get('cat'));
     613                        $this->queried_object = &$category;
     614                        $this->queried_object_id = $this->get('cat');
    617615                } else if ($this->is_single) {
    618616                        $this->queried_object = $this->post;
Note: See TracChangeset for help on using the changeset viewer.