[MediaWiki-commits] [Gerrit] Show all page images on a collection and extracts - change (mediawiki...Gather)

2015-03-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Show all page images on a collection and extracts
..


Show all page images on a collection and extracts

Extracts is a string not an array
Must specify limit for page images to avoid just returning 1.\

Bug: T92654
Change-Id: Ib7d9e7d92c564d43db965684cb16403a756f8532
---
M includes/models/Collection.php
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Yurik: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/models/Collection.php b/includes/models/Collection.php
index 2c4871a..a521822 100644
--- a/includes/models/Collection.php
+++ b/includes/models/Collection.php
@@ -122,6 +122,9 @@
'exintro' = true,
'exchars' = self::EXTRACTS_CHAR_LIMIT,
'exlimit' = 50,
+   'pilimit' = 50,
+   // TODO: Pagination
+   'continue' = '',
) ) );
try {
$api-execute();
@@ -134,7 +137,7 @@
if ( isset( $page['pageimage'] 
) ) {
$pi = wfFindFile( 
$page['pageimage'] );
}
-   $extract = isset( 
$page['extract'][0] ) ? $page['extract'][0] : '';
+   $extract = isset( 
$page['extract'] ) ? $page['extract'] : '';
$collection-add( new 
CollectionItem( $title, $pi, $extract ) );
}
}

-- 
To view, visit https://gerrit.wikimedia.org/r/196634
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7d9e7d92c564d43db965684cb16403a756f8532
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Yurik yu...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Show all page images on a collection and extracts - change (mediawiki...Gather)

2015-03-13 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/196634

Change subject: Show all page images on a collection and extracts
..

Show all page images on a collection and extracts

Extracts is a string not an array
Must specify limit for page images to avoid just returning 1.\

Bug: T92654
Change-Id: Ib7d9e7d92c564d43db965684cb16403a756f8532
---
M includes/models/Collection.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/34/196634/1

diff --git a/includes/models/Collection.php b/includes/models/Collection.php
index 2c4871a..f84f50b 100644
--- a/includes/models/Collection.php
+++ b/includes/models/Collection.php
@@ -122,6 +122,7 @@
'exintro' = true,
'exchars' = self::EXTRACTS_CHAR_LIMIT,
'exlimit' = 50,
+   'pilimit' = 50,
) ) );
try {
$api-execute();
@@ -134,7 +135,7 @@
if ( isset( $page['pageimage'] 
) ) {
$pi = wfFindFile( 
$page['pageimage'] );
}
-   $extract = isset( 
$page['extract'][0] ) ? $page['extract'][0] : '';
+   $extract = isset( 
$page['extract'] ) ? $page['extract'] : '';
$collection-add( new 
CollectionItem( $title, $pi, $extract ) );
}
}

-- 
To view, visit https://gerrit.wikimedia.org/r/196634
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7d9e7d92c564d43db965684cb16403a756f8532
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits