Index: trunk/extensions/FlaggedRevs/FRDependencyUpdate.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | # Get any links that are only in the stable version... |
27 | 27 | $cLinks = $this->getCurrentVersionLinks(); |
28 | 28 | foreach ( $this->sLinks as $ns => $titles ) { |
29 | | - foreach ( $titles as $title ) { |
| 29 | + foreach ( $titles as $title => $pageId ) { |
30 | 30 | if ( !isset( $cLinks[$ns][$title] ) ) { |
31 | 31 | self::addDependency( $deps, $ns, $title ); |
32 | 32 | } |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | } |
35 | 35 | # Get any images that are only in the stable version... |
36 | 36 | $cImages = $this->getCurrentVersionImages(); |
37 | | - foreach ( $this->sImages as $image ) { |
| 37 | + foreach ( $this->sImages as $image => $n ) { |
38 | 38 | if ( !isset( $cImages[$image] ) ) { |
39 | 39 | self::addDependency( $deps, NS_FILE, $image ); |
40 | 40 | } |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | # Get any templates that are only in the stable version... |
43 | 43 | $cTemplates = $this->getCurrentVersionTemplates(); |
44 | 44 | foreach ( $this->sTemplates as $ns => $titles ) { |
45 | | - foreach ( $titles as $title ) { |
| 45 | + foreach ( $titles as $title => $id ) { |
46 | 46 | if ( !isset( $cTemplates[$ns][$title] ) ) { |
47 | 47 | self::addDependency( $deps, $ns, $title ); |
48 | 48 | } |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | } |
51 | 51 | # Get any categories that are only in the stable version... |
52 | 52 | $cCategories = $this->getCurrentVersionCategories(); |
53 | | - foreach ( $this->sCategories as $category ) { |
| 53 | + foreach ( $this->sCategories as $category => $sort ) { |
54 | 54 | if ( !isset( $cCategories[$category] ) ) { |
55 | 55 | self::addDependency( $deps, NS_CATEGORY, $category ); |
56 | 56 | } |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | } else { |
110 | 110 | $diffs = $dbkeys; |
111 | 111 | } |
112 | | - foreach ( $diffs as $dbk ) { |
| 112 | + foreach ( $diffs as $dbk => $id ) { |
113 | 113 | $arr[] = array( |
114 | 114 | 'ftr_from' => $this->title->getArticleId(), |
115 | 115 | 'ftr_namespace' => $ns, |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | */ |
127 | 127 | protected function getDepDeletions( array $existing, array $new ) { |
128 | 128 | $del = array(); |
129 | | - foreach ( $existing as $ns ) { |
| 129 | + foreach ( $existing as $ns => $dbkeys ) { |
130 | 130 | if ( isset( $new[$ns] ) ) { |
131 | 131 | $del[$ns] = array_diff_key( $existing[$ns], $new[$ns] ); |
132 | 132 | } else { |