[xoops-cvslog 1770] CVS update: xoops2jp/html/class/smarty/plugins

アーカイブの一覧に戻る

Minahito minah****@users*****
2006年 1月 15日 (日) 03:25:58 JST


Index: xoops2jp/html/class/smarty/plugins/function.xoops_pagenavi.php
diff -u xoops2jp/html/class/smarty/plugins/function.xoops_pagenavi.php:1.1.2.1 xoops2jp/html/class/smarty/plugins/function.xoops_pagenavi.php:1.1.2.2
--- xoops2jp/html/class/smarty/plugins/function.xoops_pagenavi.php:1.1.2.1	Sun Nov 13 15:43:23 2005
+++ xoops2jp/html/class/smarty/plugins/function.xoops_pagenavi.php	Sun Jan 15 03:25:58 2006
@@ -24,7 +24,11 @@
 	$ret="";
 
 	if(isset($params['pagenavi'])&&is_object($params['pagenavi'])) {
-		$perPage=$params['pagenavi']->getPerpage();
+		$perPage =$params['pagenavi']->getPerpage();
+		if ($perPage == 0) {
+			return;
+		}
+
 		$total=$params['pagenavi']->getTotal();
 		$totalPages = ceil($params['pagenavi']->getTotal() / $perPage);
 		$url=$params['pagenavi']->getRenderUrl();
@@ -32,6 +36,10 @@
 	}
 	else {
 		$perPage=isset($params['perpage']) ? intval($params['perpage']) : 20;
+		if ($perPage == 0) {
+			return;
+		}
+
 		$total=$params['total'];
 		$totalPages = ceil($total / $perPage);
 		$url=$params['url'];
@@ -48,7 +56,7 @@
 	//
 	$prev=$current-$perPage;
 	if($prev>=0) 
-		$ret.=@sprintf("<a href='%s%d'><u>&laquo;</u></a>",$url,$prev);
+		$ret.=@sprintf("<a href='%s%d'>&laquo;</a>",$url,$prev);
 
 
 	//
@@ -58,7 +66,7 @@
 	$currentPage=intval(floor(($current+$perPage)/$perPage));
 	while($counter<=$totalPages) {
 		if($counter==$currentPage) {
-			$ret.=@sprintf("<b>(%d)</b> ",$counter);
+			$ret.=@sprintf("<strong>(%d)</strong> ",$counter);
 		}
 		elseif(($counter>$currentPage-$offset && $counter<$currentPage+$offset) || $coutner==1 || $counter==$totalPages) {
 			if($counter==$totalPages && $currentPage<$totalPages-$offset) {
@@ -77,7 +85,7 @@
 	//
 	$next=$current + $perPage;
 	if($total>$next)
-		$ret.=@sprintf("<a href='%s%d'><u>&raquo;</u></a>",$url,$next);
+		$ret.=@sprintf("<a href='%s%d'>&raquo;</a>",$url,$next);
 
 
 	print $ret;


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る