summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorgravyface <gravyface@users.sourceforge.net>2007-07-18 20:02:09 +0000
committergravyface <gravyface@users.sourceforge.net>2007-07-18 20:02:09 +0000
commit71104fd5ad9ff0216af7cfae1bd4bb1be8509408 (patch)
tree75e74cc29392f2f4b4d9544a6e630bc87644c02d /modules
parent2952b8d2e65efed253076dab576f421066b93c3c (diff)
downloadfisheye-71104fd5ad9ff0216af7cfae1bd4bb1be8509408.tar.gz
fisheye-71104fd5ad9ff0216af7cfae1bd4bb1be8509408.tar.bz2
fisheye-71104fd5ad9ff0216af7cfae1bd4bb1be8509408.zip
rows parameter in module assignment was not being used; if not defined, use the kernel max_records.
Diffstat (limited to 'modules')
-rw-r--r--modules/mod_images.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/mod_images.php b/modules/mod_images.php
index f1ce443..9bba951 100644
--- a/modules/mod_images.php
+++ b/modules/mod_images.php
@@ -1,11 +1,11 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_fisheye/modules/mod_images.php,v 1.8 2006/11/03 01:26:08 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_fisheye/modules/mod_images.php,v 1.9 2007/07/18 20:02:09 gravyface Exp $
* @package fisheye
* @subpackage modules
*/
-global $gQueryUserId, $module_rows, $module_params, $module_title, $gContent;
+global $gBitSystem, $gQueryUserId, $module_rows, $module_params, $module_title, $gContent;
/**
* required setup
@@ -17,6 +17,7 @@ $image = new FisheyeImage();
$display = TRUE;
$listHash = $module_params;
+
if( !empty( $gContent ) && $gContent->getField( 'content_type_guid' ) == FISHEYEGALLERY_CONTENT_TYPE_GUID ) {
$displayCount = empty( $gContent->mItems ) ? 0 : count( $gContent->mItems );
$thumbCount = $gContent->mInfo['rows_per_page'] * $gContent->mInfo["cols_per_page"];
@@ -24,9 +25,10 @@ if( !empty( $gContent ) && $gContent->getField( 'content_type_guid' ) == FISHEYE
$display = $displayCount >= $thumbCount;
}
+
if( $display ) {
- $listHash['max_records'] = $module_rows;
+ $listHash['max_records'] = empty( $listHash['rows'] ) ? $gBitSystem->getConfig( 'max_records' ) : $listHash['rows'];
if( $gQueryUserId ) {
$listHash['user_id'] = $gQueryUserId;
} elseif( !empty( $_REQUEST['user_id'] ) ) {