Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -92,7 +92,7 @@ |
93 | 93 | $res = $db->select( $db->tableName( 'categorylinks' ), |
94 | 94 | 'distinct cl_to', $conditions, __METHOD__ ); |
95 | 95 | if ( $db->numRows( $res ) > 0 ) { |
96 | | - foreach ( $res as $row ) { |
| 96 | + while ( $row = $db->fetchRow( $res ) ) { |
97 | 97 | $categories[] = $row[0]; |
98 | 98 | } |
99 | 99 | } |
— | — | @@ -314,7 +314,7 @@ |
315 | 315 | __METHOD__, |
316 | 316 | array( 'ORDER BY' => 'page_title' ) ); |
317 | 317 | $form_names = array(); |
318 | | - foreach ( $res as $row ) { |
| 318 | + while ( $row = $db->fetchRow( $res ) ) { |
319 | 319 | $form_names[] = str_replace( '_', ' ', $row[0] ); |
320 | 320 | } |
321 | 321 | $dbr->freeResult( $res ); |
— | — | @@ -484,7 +484,7 @@ |
485 | 485 | 'page_title', |
486 | 486 | $conditions, __METHOD__, |
487 | 487 | array( 'ORDER BY' => 'page_title' ) ); |
488 | | - foreach ( $res as $row ) { |
| 488 | + while ( $row = $db->fetchRow( $res ) ) { |
489 | 489 | $cur_value = str_replace( '_', ' ', $row[0] ); |
490 | 490 | if ( $substring == null ) { |
491 | 491 | $pages[] = $cur_value; |