Index: trunk/phase3/includes/specials/SpecialRecentchanges.php |
— | — | @@ -96,22 +96,19 @@ |
97 | 97 | $rows = array(); |
98 | 98 | $batch = new LinkBatch; |
99 | 99 | $conds = $this->buildMainQueryConds( $opts ); |
100 | | - $res = $this->doMainQuery( $conds, $opts ); |
101 | | - if( $res === false ){ |
| 100 | + $rows = $this->doMainQuery( $conds, $opts ); |
| 101 | + if( $rows === false ){ |
102 | 102 | $this->doHeader( $opts ); |
103 | 103 | return; |
104 | 104 | } |
105 | 105 | |
106 | | - while( $row = $res->fetchObject() ){ |
107 | | - $rows[] = $row; |
| 106 | + foreach( $rows as $row ) { |
108 | 107 | if ( !$feedFormat ) { |
109 | 108 | // User page and talk links |
110 | 109 | $batch->add( NS_USER, $row->rc_user_text ); |
111 | 110 | $batch->add( NS_USER_TALK, $row->rc_user_text ); |
112 | 111 | } |
113 | | - |
114 | 112 | } |
115 | | - $res->free(); |
116 | 113 | |
117 | 114 | if ( $feedFormat ) { |
118 | 115 | list( $feed, $feedObj ) = $this->getFeedObject( $feedFormat ); |
— | — | @@ -120,7 +117,8 @@ |
121 | 118 | $batch->execute(); |
122 | 119 | $this->webOutput( $rows, $opts ); |
123 | 120 | } |
124 | | - |
| 121 | + |
| 122 | + $rows->free(); |
125 | 123 | } |
126 | 124 | |
127 | 125 | /** |