[Openvas-commits] r6794 - in trunk/gsa: . src src/html/src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Feb 19 21:47:34 CET 2010


Author: mattm
Date: 2010-02-19 21:47:32 +0100 (Fri, 19 Feb 2010)
New Revision: 6794

Modified:
   trunk/gsa/ChangeLog
   trunk/gsa/src/gsad.c
   trunk/gsa/src/html/src/omp.xsl
Log:
	* src/gsad.c (exec_omp_get): Use fixed max_results values for notes.

	* src/html/src/omp.xsl (html-create-note-form): Remove max_results
	passthrough.
	(note-detailed, result-detailed): Remove max_results from requests.

Modified: trunk/gsa/ChangeLog
===================================================================
--- trunk/gsa/ChangeLog	2010-02-19 16:41:38 UTC (rev 6793)
+++ trunk/gsa/ChangeLog	2010-02-19 20:47:32 UTC (rev 6794)
@@ -1,5 +1,13 @@
 2010-02-19  Matthew Mundell <matthew.mundell at intevation.de>
 
+	* src/gsad.c (exec_omp_get): Use fixed max_results values for notes.
+
+	* src/html/src/omp.xsl (html-create-note-form): Remove max_results
+	passthrough.
+	(note-detailed, result-detailed): Remove max_results from requests.
+
+2010-02-19  Matthew Mundell <matthew.mundell at intevation.de>
+
 	* src/gsad_omp.c (new_note_omp): Check all args.
 
 2010-02-19  Matthew Mundell <matthew.mundell at intevation.de>

Modified: trunk/gsa/src/gsad.c
===================================================================
--- trunk/gsa/src/gsad.c	2010-02-19 16:41:38 UTC (rev 6793)
+++ trunk/gsa/src/gsad.c	2010-02-19 20:47:32 UTC (rev 6794)
@@ -2454,7 +2454,6 @@
            && (strcmp (next, "get_report") == 0)
            && (report_id != NULL)
            && (first_result != NULL)
-           && (max_results != NULL)
            && (sort_field != NULL)
            && (sort_order != NULL)
            && (levels != NULL)
@@ -2462,16 +2461,12 @@
            && (search_phrase != NULL))
     {
       unsigned int first;
-      unsigned int max;
 
       if (!first_result || sscanf (first_result, "%u", &first) != 1)
         first = 1;
 
-      if (!max_results || sscanf (max_results, "%u", &max) != 1)
-        max = 1000;
-
       return delete_note_omp (credentials, note_id, "get_report", report_id,
-                              first, max, sort_field, sort_order, levels,
+                              first, 1000, sort_field, sort_order, levels,
                               notes, search_phrase, NULL, NULL);
     }
 
@@ -2704,7 +2699,6 @@
            /* Report passthrough params. */
            && (report_id != NULL)
            && (first_result != NULL)
-           && (max_results != NULL)
            && (sort_field != NULL)
            && (sort_order != NULL)
            && (levels != NULL)
@@ -2712,7 +2706,7 @@
            && (search_phrase != NULL))
     return new_note_omp (credentials, oid, hosts, port, threat, task_id,
                          name, result_id, report_id, first_result,
-                         max_results, sort_field, sort_order, levels, notes,
+                         "1000", sort_field, sort_order, levels, notes,
                          search_phrase);
 
   else

Modified: trunk/gsa/src/html/src/omp.xsl
===================================================================
--- trunk/gsa/src/html/src/omp.xsl	2010-02-19 16:41:38 UTC (rev 6793)
+++ trunk/gsa/src/html/src/omp.xsl	2010-02-19 20:47:32 UTC (rev 6794)
@@ -3970,7 +3970,6 @@
         <input type="hidden" name="oid" value="{nvt/@id}"/>
         <input type="hidden" name="report_id" value="{report/@id}"/>
         <input type="hidden" name="first_result" value="{first_result}"/>
-        <input type="hidden" name="max_results" value="{max_results}"/>
         <input type="hidden" name="sort_field" value="{sort_field}"/>
         <input type="hidden" name="sort_order" value="{sort_order}"/>
         <input type="hidden" name="levels" value="{levels}"/>
@@ -4389,8 +4388,7 @@
     Last modified: <xsl:value-of select="modification_time"/>.
     <xsl:if test="$note-buttons = 1">
       <div style="float:right; text-align:right">
-        <!-- FIX max_results -->
-        <a href="/omp?cmd=delete_note&amp;note_id={@id}&amp;report_id={../../../../@id}&amp;first_result={../../../../results/@start}&amp;max_results={../../../../results/@start+1000}&amp;levels={../../../../filters/text()}&amp;sort_field={../../../../sort/field/text()}&amp;sort_order={../../../../sort/field/order}&amp;search_phrase={../../../../filters/phrase}&amp;notes={../../../../filters/notes}&amp;next=get_report#result-{../../@id}"
+        <a href="/omp?cmd=delete_note&amp;note_id={@id}&amp;report_id={../../../../@id}&amp;first_result={../../../../results/@start}&amp;levels={../../../../filters/text()}&amp;sort_field={../../../../sort/field/text()}&amp;sort_order={../../../../sort/field/order}&amp;search_phrase={../../../../filters/phrase}&amp;notes={../../../../filters/notes}&amp;next=get_report#result-{../../@id}"
            title="Delete Note" style="margin-left:3px;">
           <img src="/img/delete_note.png" border="0" alt="Delete"/>
         </a>
@@ -4461,8 +4459,7 @@
             <img src="/img/note.png" border="0" alt="Notes"/>
           </a>
         </xsl:if>
-        <!-- FIX max_results -->
-        <a href="/omp?cmd=new_note&amp;result_id={@id}&amp;oid={nvt/@oid}&amp;task_id={../../task/@id}&amp;name={../../task/name}&amp;report_id={../../@id}&amp;first_result={../../results/@start}&amp;max_results={../../results/@start+1000}&amp;levels={../../filters/text()}&amp;sort_field={../../sort/field/text()}&amp;sort_order={../../sort/field/order}&amp;search_phrase={../../filters/phrase}&amp;threat={threat}&amp;port={port}&amp;hosts={host/text()}&amp;notes={../../filters/notes}"
+        <a href="/omp?cmd=new_note&amp;result_id={@id}&amp;oid={nvt/@oid}&amp;task_id={../../task/@id}&amp;name={../../task/name}&amp;report_id={../../@id}&amp;first_result={../../results/@start}&amp;levels={../../filters/text()}&amp;sort_field={../../sort/field/text()}&amp;sort_order={../../sort/field/order}&amp;search_phrase={../../filters/phrase}&amp;threat={threat}&amp;port={port}&amp;hosts={host/text()}&amp;notes={../../filters/notes}"
            title="Add Note" style="margin-left:3px;">
           <img src="/img/new_note.png" border="0" alt="Add Note"/>
         </a>



More information about the Openvas-commits mailing list