- $res = $dbr->select( 'externallinks', [ 'DISTINCT el_from' ],
- [ 'el_index' . $dbr->buildLike( $like ) ], __METHOD__ );
- $count = $dbr->numRows( $res );
- $this->output( "Found $count articles containing $spec\n" );
- foreach ( $res as $row ) {
- $this->cleanupArticle( $row->el_from, $spec );
+ foreach ( $likes as $prot => $like ) {
+ $res = $dbr->select(
+ 'externallinks',
+ [ 'DISTINCT el_from' ],
+ [ 'el_index' . $dbr->buildLike( $like ) ],
+ __METHOD__
+ );
+ $count = $dbr->numRows( $res );
+ $this->output( "Found $count articles containing $spec\n" );
+ foreach ( $res as $row ) {
+ $this->cleanupArticle( $row->el_from, $spec, $prot );
+ }