Index: trunk/extensions/Collection/Collection.session.php |
— | — | @@ -114,10 +114,19 @@ |
115 | 115 | $coll = $_SESSION['wsCollection']; |
116 | 116 | $newitems = array(); |
117 | 117 | if ( isset( $coll['items'] ) ) { |
| 118 | + $batch = new LinkBatch; |
| 119 | + $lc = LinkCache::singleton(); |
118 | 120 | foreach ( $coll['items'] as $index => $item ) { |
119 | 121 | if ( $item['type'] == 'article' ) { |
120 | 122 | $t = Title::newFromText( $item['title'] ); |
121 | | - if ( $t->exists() ) { |
| 123 | + $batch->addObj( $t ); |
| 124 | + } |
| 125 | + } |
| 126 | + $batch->execute(); |
| 127 | + foreach ( $coll['items'] as $index => $item ) { |
| 128 | + if ( $item['type'] == 'article' ) { |
| 129 | + $t = Title::newFromText( $item['title'] ); |
| 130 | + if ( !$lc->isBadLink( $t->getPrefixedDbKey() ) ) { |
122 | 131 | $newitems[] = $item; |
123 | 132 | } |
124 | 133 | } else { |