diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index f385907d..bcaffab1 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -178,8 +178,6 @@ class g2_import_Core { */ static function stats() { global $gallery; - GalleryCoreApi::requireOnce("modules/comment/classes/GalleryCommentHelper.class"); - $root_album_id = g2(GalleryCoreApi::getDefaultAlbumId()); $stats["users"] = g2(GalleryCoreApi::fetchUserCount()); $stats["groups"] = g2(GalleryCoreApi::fetchGroupCount()); @@ -188,6 +186,7 @@ class g2_import_Core { $stats["movies"] = g2(GalleryCoreApi::fetchItemIdCount("GalleryMovieItem")); if (g2_import::g2_module_active("comment") && module::is_active("comment")) { + GalleryCoreApi::requireOnce("modules/comment/classes/GalleryCommentHelper.class"); list (, $stats["comments"]) = g2(GalleryCommentHelper::fetchAllComments($root_album_id, 1)); } else { $stats["comments"] = 0; |