| @@ 721-732 (lines=12) @@ | ||
| 718 | * @param array $existing |
|
| 719 | * @return array |
|
| 720 | */ |
|
| 721 | private function getLinkDeletions( $existing ) { |
|
| 722 | $del = []; |
|
| 723 | foreach ( $existing as $ns => $dbkeys ) { |
|
| 724 | if ( isset( $this->mLinks[$ns] ) ) { |
|
| 725 | $del[$ns] = array_diff_key( $existing[$ns], $this->mLinks[$ns] ); |
|
| 726 | } else { |
|
| 727 | $del[$ns] = $existing[$ns]; |
|
| 728 | } |
|
| 729 | } |
|
| 730 | ||
| 731 | return $del; |
|
| 732 | } |
|
| 733 | ||
| 734 | /** |
|
| 735 | * Given an array of existing templates, returns those templates which are not in $this |
|
| @@ 740-751 (lines=12) @@ | ||
| 737 | * @param array $existing |
|
| 738 | * @return array |
|
| 739 | */ |
|
| 740 | private function getTemplateDeletions( $existing ) { |
|
| 741 | $del = []; |
|
| 742 | foreach ( $existing as $ns => $dbkeys ) { |
|
| 743 | if ( isset( $this->mTemplates[$ns] ) ) { |
|
| 744 | $del[$ns] = array_diff_key( $existing[$ns], $this->mTemplates[$ns] ); |
|
| 745 | } else { |
|
| 746 | $del[$ns] = $existing[$ns]; |
|
| 747 | } |
|
| 748 | } |
|
| 749 | ||
| 750 | return $del; |
|
| 751 | } |
|
| 752 | ||
| 753 | /** |
|
| 754 | * Given an array of existing images, returns those images which are not in $this |
|
| @@ 808-819 (lines=12) @@ | ||
| 805 | * @param array $existing |
|
| 806 | * @return array |
|
| 807 | */ |
|
| 808 | private function getInterwikiDeletions( $existing ) { |
|
| 809 | $del = []; |
|
| 810 | foreach ( $existing as $prefix => $dbkeys ) { |
|
| 811 | if ( isset( $this->mInterwikis[$prefix] ) ) { |
|
| 812 | $del[$prefix] = array_diff_key( $existing[$prefix], $this->mInterwikis[$prefix] ); |
|
| 813 | } else { |
|
| 814 | $del[$prefix] = $existing[$prefix]; |
|
| 815 | } |
|
| 816 | } |
|
| 817 | ||
| 818 | return $del; |
|
| 819 | } |
|
| 820 | ||
| 821 | /** |
|
| 822 | * Get an array of existing links, as a 2-D array |
|