r76600 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76599‎ | r76600 | r76601 >
Date:21:58, 12 November 2010
Author:aaron
Status:ok
Tags:
Comment:
Partial revert of r75973: broken
Modified paths:
  • /trunk/extensions/FlaggedRevs/FRDependencyUpdate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FRDependencyUpdate.php
@@ -25,7 +25,7 @@
2626 # Get any links that are only in the stable version...
2727 $cLinks = $this->getCurrentVersionLinks();
2828 foreach ( $this->sLinks as $ns => $titles ) {
29 - foreach ( $titles as $title ) {
 29+ foreach ( $titles as $title => $pageId ) {
3030 if ( !isset( $cLinks[$ns][$title] ) ) {
3131 self::addDependency( $deps, $ns, $title );
3232 }
@@ -33,7 +33,7 @@
3434 }
3535 # Get any images that are only in the stable version...
3636 $cImages = $this->getCurrentVersionImages();
37 - foreach ( $this->sImages as $image ) {
 37+ foreach ( $this->sImages as $image => $n ) {
3838 if ( !isset( $cImages[$image] ) ) {
3939 self::addDependency( $deps, NS_FILE, $image );
4040 }
@@ -41,7 +41,7 @@
4242 # Get any templates that are only in the stable version...
4343 $cTemplates = $this->getCurrentVersionTemplates();
4444 foreach ( $this->sTemplates as $ns => $titles ) {
45 - foreach ( $titles as $title ) {
 45+ foreach ( $titles as $title => $id ) {
4646 if ( !isset( $cTemplates[$ns][$title] ) ) {
4747 self::addDependency( $deps, $ns, $title );
4848 }
@@ -49,7 +49,7 @@
5050 }
5151 # Get any categories that are only in the stable version...
5252 $cCategories = $this->getCurrentVersionCategories();
53 - foreach ( $this->sCategories as $category ) {
 53+ foreach ( $this->sCategories as $category => $sort ) {
5454 if ( !isset( $cCategories[$category] ) ) {
5555 self::addDependency( $deps, NS_CATEGORY, $category );
5656 }
@@ -108,7 +108,7 @@
109109 } else {
110110 $diffs = $dbkeys;
111111 }
112 - foreach ( $diffs as $dbk ) {
 112+ foreach ( $diffs as $dbk => $id ) {
113113 $arr[] = array(
114114 'ftr_from' => $this->title->getArticleId(),
115115 'ftr_namespace' => $ns,
@@ -125,7 +125,7 @@
126126 */
127127 protected function getDepDeletions( array $existing, array $new ) {
128128 $del = array();
129 - foreach ( $existing as $ns ) {
 129+ foreach ( $existing as $ns => $dbkeys ) {
130130 if ( isset( $new[$ns] ) ) {
131131 $del[$ns] = array_diff_key( $existing[$ns], $new[$ns] );
132132 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r76601MFT r76599, r76600demon22:07, 12 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75973Code cleanup, mainly unused variablesreedy01:29, 4 November 2010

Status & tagging log