From: <mgu...@us...> - 2012-11-13 16:28:14
|
Revision: 2471 http://nagios.svn.sourceforge.net/nagios/?rev=2471&view=rev Author: mguthrie88 Date: 2012-11-13 16:28:04 +0000 (Tue, 13 Nov 2012) Log Message: ----------- - Applied fix for pagination and sorting on status.cgi #381 (Phil Randal) Modified Paths: -------------- nagioscore/branches/nagios-3-4-x/Changelog nagioscore/branches/nagios-3-4-x/cgi/status.c Modified: nagioscore/branches/nagios-3-4-x/Changelog =================================================================== --- nagioscore/branches/nagios-3-4-x/Changelog 2012-11-13 13:20:26 UTC (rev 2470) +++ nagioscore/branches/nagios-3-4-x/Changelog 2012-11-13 16:28:04 UTC (rev 2471) @@ -3,8 +3,9 @@ ##################### 3.4.3 - ??? ----------------- -- Reverted event queue changes intended for Nagios 4 +- Reverted squeue changes intended for Nagios 4 - Reapplied all patches from 3.4.2 release +- Applied fix for pagination and sorting on status.cgi #381 (Phil Randal) Modified: nagioscore/branches/nagios-3-4-x/cgi/status.c =================================================================== --- nagioscore/branches/nagios-3-4-x/cgi/status.c 2012-11-13 13:20:26 UTC (rev 2470) +++ nagioscore/branches/nagios-3-4-x/cgi/status.c 2012-11-13 16:28:04 UTC (rev 2471) @@ -1452,13 +1452,26 @@ temp_url[sizeof(temp_url) - 1] = '\x0'; } */ - + + if (sort_type != SORT_NONE) { + snprintf(temp_buffer, sizeof(temp_buffer), "&sorttype=%i&sortoption=%i", sort_type, sort_option); + temp_buffer[sizeof(temp_buffer) - 1] = '\x0'; + strncat(temp_url, temp_buffer, sizeof(temp_url) - strlen(temp_url) - 1); + temp_url[sizeof(temp_url) - 1] = '\x0'; + } + /* GET input can override cgi.cfg */ if(limit_results==TRUE) result_limit = temp_result_limit ? temp_result_limit : result_limit; else result_limit = 0; /* select box to set result limit */ + if(result_limit) { + snprintf(temp_buffer, sizeof(temp_buffer) - 1, "&limit=%i", temp_result_limit); + temp_buffer[sizeof(temp_buffer) - 1] = '\x0'; + strncat(temp_url, temp_buffer, sizeof(temp_url) - strlen(temp_url) - 1); + temp_url[sizeof(temp_url) - 1] = '\x0'; + } create_page_limiter(result_limit,temp_url); /* the main list of services */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |