16 private $newLinks = [];
17 private $existingLinks;
24 return 'externallinks';
41 private function getExistingLinks() {
42 if ( $this->existingLinks ===
null ) {
43 $this->existingLinks = [];
45 $this->existingLinks[$row->el_to] =
true;
48 return $this->existingLinks;
52 foreach ( $this->newLinks as $link => $unused ) {
58 foreach ( $this->getExistingLinks() as $link => $unused ) {
64 return \array_key_exists( $linkId, $this->getExistingLinks() );
68 return \array_key_exists( $linkId, $this->newLinks );
76 'el_index_60' => substr( $index, 0, 60 ),
82 $this->
deleteRow( [
'el_to' => $linkId ] );
93 if ( is_array( $ids ) ) {
96 return iterator_to_array( $ids );
Some functions to help implement an external link filter for spam control.
static makeIndexes( $url)
Converts a URL into a format for el_index.