diff options
Diffstat (limited to 'modules/g2_import/helpers/g2_import.php')
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index b2e3836a..5e2a61e8 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -1155,7 +1155,7 @@ class g2_import_Core { "SELECT [GalleryComment::id] " . "FROM [GalleryComment] " . "WHERE [GalleryComment::publishStatus] = 0 " . // 0 == COMMENT_PUBLISH_STATUS_PUBLISHED - "AND [GalleryComment::id] > ?", + "AND [GalleryComment::id] > ?", array($min_id), array("limit" => array("count" => 100)))); while ($result = $results->nextResult()) { @@ -1184,6 +1184,26 @@ class g2_import_Core { } /** + * Get a set of user ids from Gallery 2 greater than $min_id. We use this to get the + * next chunk of users to import. + */ + static function get_user_ids($min_id) { + global $gallery; + + $ids = array(); + $results = g2($gallery->search( + "SELECT [GalleryUser::id] " . + "FROM [GalleryUser] " . + "WHERE [GalleryUser::id] > ?", + array($min_id), + array("limit" => array("count" => 100)))); + while ($result = $results->nextResult()) { + $ids[] = $result[0]; + } + return $ids; + } + + /** * Look in our map to find the corresponding Gallery 3 id for the given Gallery 2 id. */ static function map($g2_id) { |