Index: trunk/phase3/includes/filerepo/File.php |
— | — | @@ -1049,7 +1049,7 @@ |
1050 | 1050 | } |
1051 | 1051 | |
1052 | 1052 | /** |
1053 | | - * Returns the number of pages of a multipage document, or NULL for |
| 1053 | + * Returns the number of pages of a multipage document, or false for |
1054 | 1054 | * documents which aren't multipage documents |
1055 | 1055 | */ |
1056 | 1056 | function pageCount() { |
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -230,6 +230,11 @@ |
231 | 231 | $vals['size'] = intval( $file->getSize() ); |
232 | 232 | $vals['width'] = intval( $file->getWidth() ); |
233 | 233 | $vals['height'] = intval( $file->getHeight() ); |
| 234 | + |
| 235 | + $pageCount = $file->pageCount(); |
| 236 | + if ( $pageCount !== false ) { |
| 237 | + $vals['pagecount'] = $pageCount; |
| 238 | + } |
234 | 239 | } |
235 | 240 | if ( isset( $prop['url'] ) ) { |
236 | 241 | if ( !is_null( $scale ) && !$file->isOld() ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -537,6 +537,8 @@ |
538 | 538 | * (bug 26006) prop=langlinks now allows obtaining full URL |
539 | 539 | * (bug 26075) ApiDelete.php now calls correctly ArticleDelete hook |
540 | 540 | * (bug 26089) add block expiration to blockinfo |
| 541 | +* (bug 26125) prop=imageinfo&iiprop=size now returns the page count if the |
| 542 | + file is a multi-page file |
541 | 543 | |
542 | 544 | === Languages updated in 1.17 === |
543 | 545 | |