From: Brad Jorsch Date: Mon, 17 Dec 2012 19:11:47 +0000 (-0500) Subject: (bug 43207) Fix regression in API generator=duplicatefiles X-Git-Tag: 1.31.0-rc.0~21273^2 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=725a29ebe9c039c41e017c69eef9e1cee178db09;p=lhc%2Fweb%2Fwiklou.git (bug 43207) Fix regression in API generator=duplicatefiles Prior to change I745cae7a, generator=duplicatefiles would return all the files that were duplicates of the passed files. Since then, it will return only one of the input files if any duplicates are found, possibly one that doesn't even have duplicates. The problem is the use of a wrong variable. Change-Id: I8e8493718ab1f7f5cb6ae718790738a7cf3c72c7 --- diff --git a/includes/api/ApiQueryDuplicateFiles.php b/includes/api/ApiQueryDuplicateFiles.php index 8f0fd3be72..f088062cb9 100644 --- a/includes/api/ApiQueryDuplicateFiles.php +++ b/includes/api/ApiQueryDuplicateFiles.php @@ -133,7 +133,7 @@ class ApiQueryDuplicateFiles extends ApiQueryGeneratorBase { break; } if ( !is_null( $resultPageSet ) ) { - $titles[] = $file->getTitle(); + $titles[] = $dupFile->getTitle(); } else { $r = array( 'name' => $dupName,