Index: trunk/kernel/include/relationship.php =================================================================== diff -u -r3471 -r3491 --- trunk/kernel/include/relationship.php (.../relationship.php) (revision 3471) +++ trunk/kernel/include/relationship.php (.../relationship.php) (revision 3491) @@ -253,11 +253,18 @@ } - function GetNumPages() + function GetNumPages($ItemsPerPage = null) { - global $objConfig; - - return ceil($this->NumItems()/$this->PerPage); + if (!isset($ItemsPerPage)) $ItemsPerPage = $this->PerPage; + + if ( count($this->Items) ) + { + global $objConfig; + return ceil($this->NumItems()/$this->PerPage); + } + else { + return parent::GetNumPages($ItemsPerPage); + } } function GetAdminPageLinkList($link_template,$url)