From: <dw...@us...> - 2010-12-26 16:50:00
|
Revision: 67 http://nagios.svn.sourceforge.net/nagios/?rev=67&view=rev Author: dworth Date: 2010-12-26 16:49:54 +0000 (Sun, 26 Dec 2010) Log Message: ----------- clean-ups removed globals, added some spacing, and removed commented debug code Modified Paths: -------------- nagiosvshell/branches/devel/views/display_functions.php Modified: nagiosvshell/branches/devel/views/display_functions.php =================================================================== --- nagiosvshell/branches/devel/views/display_functions.php 2010-12-26 16:49:48 UTC (rev 66) +++ nagiosvshell/branches/devel/views/display_functions.php 2010-12-26 16:49:54 UTC (rev 67) @@ -320,7 +320,6 @@ $hostcomments = check_comments($host, $service); if($hostcomments) { - //global $comments; global $NagiosData; $hosts = $NagiosData->getProperty('hosts'); @@ -380,7 +379,6 @@ $back_arrow = NULL; $back_arrow_entities = '«'; if ($cp_start > 0) { - //fb($cp_start, "cp_start"); $link = $link_base . '&start='.($cp_start-$limit); $back_arrow = "<a href='$link' class='pagenumbers'>$back_arrow_entities</a>"; } else { @@ -389,17 +387,16 @@ print "$back_arrow"; // Build the direct page links - for($i=0;$i<=$pageCount;$i++) + for($i = 0; $i <= $pageCount; $i++) { //if end is greater than total results, set end to be the resultCount - //$end = ($begin + $limit) < $resultsCount ? ($begin + $limit) : $resultsCount; $link = $link_base . "&start=$begin"; $page = $i+1; //check if the link is the current page //if we're on current page, don't print a link if($cp_start == $begin) print "<span class='deselect'> $page </span>"; else print "<a class='pagenumbers' href='$link'> $page </a>"; - //print "Page $i, start= $begin, end = $end <br />"; + //submit a hidden post page number $begin = ($begin + $limit) < $resultsCount ? ($begin + $limit) : $resultsCount; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |