Index: trunk/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | } |
120 | 120 | |
121 | 121 | $feed->outHeader(); |
122 | | - while ( $row = $res->fetchObject( $res ) ) { |
| 122 | + foreach ( $res as $row ) { |
123 | 123 | $title = Title::makeTitle( $row->page_namespace, $row->page_title ); |
124 | 124 | |
125 | 125 | if ( !$title ) { |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | $filterSet = array( 'only', 'exclude' ); |
190 | 190 | # Either involves the same JOIN here... |
191 | 191 | if ( in_array( $this->params['stable'], $filterSet ) || in_array( $this->params['quality'], $filterSet ) ) { |
192 | | - $joins['flaggedpages'] = Array( 'LEFT JOIN', 'page_id = fp_page_id' ); |
| 192 | + $joins['flaggedpages'] = array( 'LEFT JOIN', 'page_id = fp_page_id' ); |
193 | 193 | } |
194 | 194 | switch( $this->params['stable'] ) { |
195 | 195 | case 'only': |
— | — | @@ -220,8 +220,8 @@ |
221 | 221 | $currentTableNumber = 1; |
222 | 222 | $categorylinks = $dbr->tableName( 'categorylinks' ); |
223 | 223 | for ($i = 0; $i < $this->params['catCount']; $i++) { |
224 | | - $joins["$categorylinks AS c$currentTableNumber"] = Array( 'INNER JOIN', |
225 | | - Array( "page_id = c{$currentTableNumber}.cl_from", |
| 224 | + $joins["$categorylinks AS c$currentTableNumber"] = array( 'INNER JOIN', |
| 225 | + array( "page_id = c{$currentTableNumber}.cl_from", |
226 | 226 | "c{$currentTableNumber}.cl_to={$dbr->addQuotes($this->categories[$i]->getDBKey())}" |
227 | 227 | ) |
228 | 228 | ); |
— | — | @@ -342,8 +342,8 @@ |
343 | 343 | $cats = $title->getParentCategories(); |
344 | 344 | $str = ''; |
345 | 345 | # the following code is based (stolen) from r56954 of flagged revs. |
346 | | - $catMap = Array(); |
347 | | - $catMask = Array(); |
| 346 | + $catMap = array(); |
| 347 | + $catMask = array(); |
348 | 348 | $msg = wfMsg( 'googlenewssitemap_categorymap' ); |
349 | 349 | if ( !wfEmptyMsg( 'googlenewssitemap_categorymap', $msg ) ) { |
350 | 350 | $list = explode( "\n*", "\n$msg" ); |