[pLog-svn] r3887 - plog/trunk/class/template/smarty/plugins

oscar at devel.lifetype.net oscar at devel.lifetype.net
Tue Aug 15 21:29:36 GMT 2006


Author: oscar
Date: 2006-08-15 21:29:36 +0000 (Tue, 15 Aug 2006)
New Revision: 3887

Modified:
   plog/trunk/class/template/smarty/plugins/function.pager.php
Log:
Fixed a stupid mistake in the pager.

Modified: plog/trunk/class/template/smarty/plugins/function.pager.php
===================================================================
--- plog/trunk/class/template/smarty/plugins/function.pager.php	2006-08-15 21:05:12 UTC (rev 3886)
+++ plog/trunk/class/template/smarty/plugins/function.pager.php	2006-08-15 21:29:36 UTC (rev 3887)
@@ -77,9 +77,6 @@
 
 	$page_string = '';
 	
-	if( $useDiv )
-		$page_string .= '<div class="pager">';
-	
 	if( $style == "links" ) {
 		if ( $total_pages == 1 )
 			return '';
@@ -134,13 +131,12 @@
 
 		if ( $add_prevnext_text ) {
 			if ( $on_page > 1 ) {
-				$page_string .= ' <a class="pagerLinkPrevPage" href="'.$base_url.( $on_page - 1 ).'">'.$prevText.'</a>&nbsp;&nbsp;'.$page_string;
+				$page_string = ' <a class="pagerLinkPrevPage" href="'.$base_url.( $on_page - 1 ).'">'.$prevText.'</a>&nbsp;&nbsp;'.$page_string;
 			}
 
 			if ( $on_page < $total_pages ) {
 				$page_string .= '&nbsp;&nbsp;<a class="pagerLinkNextPage" href="'.$base_url.( $on_page + 1 ).'">'.$nextText.'</a>';
-			}
-
+			}			
 		}
 	}
 	elseif( $style == "list" ) {
@@ -195,7 +191,8 @@
 		$smarty->trigger_error( "Unrecognized 'style' parameter for the pager. Valid values are: 'links', 'prevonly', 'nextonly'" );
 	}
 	
-	$page_string .= "</div>";
+	if( $useDiv )
+		$page_string = '<div class="pager">'.$page_string.'</div>';
 
 	return $page_string;
 }



More information about the pLog-svn mailing list