| @@ 663-674 (lines=12) @@ | ||
| 660 | * @param array $existing |
|
| 661 | * @return array |
|
| 662 | */ |
|
| 663 | private function getLinkDeletions( $existing ) { |
|
| 664 | $del = []; |
|
| 665 | foreach ( $existing as $ns => $dbkeys ) { |
|
| 666 | if ( isset( $this->mLinks[$ns] ) ) { |
|
| 667 | $del[$ns] = array_diff_key( $existing[$ns], $this->mLinks[$ns] ); |
|
| 668 | } else { |
|
| 669 | $del[$ns] = $existing[$ns]; |
|
| 670 | } |
|
| 671 | } |
|
| 672 | ||
| 673 | return $del; |
|
| 674 | } |
|
| 675 | ||
| 676 | /** |
|
| 677 | * Given an array of existing templates, returns those templates which are not in $this |
|
| @@ 682-693 (lines=12) @@ | ||
| 679 | * @param array $existing |
|
| 680 | * @return array |
|
| 681 | */ |
|
| 682 | private function getTemplateDeletions( $existing ) { |
|
| 683 | $del = []; |
|
| 684 | foreach ( $existing as $ns => $dbkeys ) { |
|
| 685 | if ( isset( $this->mTemplates[$ns] ) ) { |
|
| 686 | $del[$ns] = array_diff_key( $existing[$ns], $this->mTemplates[$ns] ); |
|
| 687 | } else { |
|
| 688 | $del[$ns] = $existing[$ns]; |
|
| 689 | } |
|
| 690 | } |
|
| 691 | ||
| 692 | return $del; |
|
| 693 | } |
|
| 694 | ||
| 695 | /** |
|
| 696 | * Given an array of existing images, returns those images which are not in $this |
|
| @@ 750-761 (lines=12) @@ | ||
| 747 | * @param array $existing |
|
| 748 | * @return array |
|
| 749 | */ |
|
| 750 | private function getInterwikiDeletions( $existing ) { |
|
| 751 | $del = []; |
|
| 752 | foreach ( $existing as $prefix => $dbkeys ) { |
|
| 753 | if ( isset( $this->mInterwikis[$prefix] ) ) { |
|
| 754 | $del[$prefix] = array_diff_key( $existing[$prefix], $this->mInterwikis[$prefix] ); |
|
| 755 | } else { |
|
| 756 | $del[$prefix] = $existing[$prefix]; |
|
| 757 | } |
|
| 758 | } |
|
| 759 | ||
| 760 | return $del; |
|
| 761 | } |
|
| 762 | ||
| 763 | /** |
|
| 764 | * Get an array of existing links, as a 2-D array |
|