- # $title is a prefixed db title, for example like Title->getPrefixedDBkey() returns.
- /* static */ function linksccClearBrokenLinksTo( $title ){
- $title = wfStrencode( $title );
- wfQuery("DELETE linkscc FROM linkscc,brokenlinks ".
- "WHERE lcc_pageid=bl_from AND bl_to='{$title}'", DB_WRITE);
+ // Process results
+ // For each returned entry, add it to the list of good links, and remove it from $remaining
+
+ $remaining = $this->data;
+ while ( $row = $dbr->fetchObject( $res ) ) {
+ $title = Title::makeTitle( $row->page_namespace, $row->page_title );
+ $cache->addGoodLinkObj( $row->page_id, $title );
+ unset( $remaining[$row->page_namespace][$row->page_title] );
+ }
+ $dbr->freeResult( $res );
+
+ // The remaining links in $data are bad links, register them as such
+ foreach ( $remaining as $ns => $dbkeys ) {
+ foreach ( $dbkeys as $dbkey => $nothing ) {
+ $title = Title::makeTitle( $ns, $dbkey );
+ $cache->addBadLinkObj( $title );
+ }
+ }
+
+ wfProfileOut( $fname );