Index: trunk/extensions/UploadWizard/resources/mw.DestinationChecker.js |
— | — | @@ -147,8 +147,12 @@ |
148 | 148 | |
149 | 149 | var result = undefined; |
150 | 150 | |
151 | | - if ( data.query.pages[-1] ) { |
152 | | - // No conflict found; this file name is unique |
| 151 | + // The API will check for files with that filename. |
| 152 | + // If no file found: a page with a key of -1 and no imageinfo |
| 153 | + // If file found on another repository, such as when the wiki is using InstantCommons: page with a key of -1, plus imageinfo |
| 154 | + // If file found on this repository: page with some positive numeric key |
| 155 | + if ( data.query.pages[-1] && !data.query.pages[-1].imageinfo ) { |
| 156 | + // No conflict found on any repository this wiki uses |
153 | 157 | result = { isUnique: true }; |
154 | 158 | |
155 | 159 | } else { |