[xoops-cvslog 4957] CVS update: xoops2jp/html/core

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 10月 12日 (木) 23:11:52 JST


Index: xoops2jp/html/core/XCube_PageNavigator.class.php
diff -u xoops2jp/html/core/XCube_PageNavigator.class.php:1.1.2.4 xoops2jp/html/core/XCube_PageNavigator.class.php:1.1.2.5
--- xoops2jp/html/core/XCube_PageNavigator.class.php:1.1.2.4	Thu Oct 12 20:07:02 2006
+++ xoops2jp/html/core/XCube_PageNavigator.class.php	Thu Oct 12 23:11:52 2006
@@ -1,7 +1,7 @@
 <?php
 /**
  * @package XCube
- * @version $Id: XCube_PageNavigator.class.php,v 1.1.2.4 2006/10/12 11:07:02 minahito Exp $
+ * @version $Id: XCube_PageNavigator.class.php,v 1.1.2.5 2006/10/12 14:11:52 minahito Exp $
  */
 
 define('XCUBE_PAGENAVI_START', 1);
@@ -141,7 +141,7 @@
 
 		if ($this->mFlags & XCUBE_PAGENAVI_PERPAGE && !$this->mPerpageFreeze) {
 			$t_perpage = $root->mContext->mRequest->getRequest($this->getPerpageKey());
-			if ($t_perpage != null && intval($t_perpage) >= 0) {
+			if ($t_perpage != null && intval($t_perpage) > 0) {
 				$this->mPerpage = intval($t_perpage);
 			}
 		}
@@ -304,7 +304,11 @@
 	
 	function getTotalPages()
 	{
-		return ceil($this->getTotalItems() / $this->getPerpage());
+		if ($this->getPerpage() > 0) {
+			return ceil($this->getTotalItems() / $this->getPerpage());
+		}
+		
+		return 0;
 	}
 
 	function setPerpage($perpage)


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index