From bc8aba26a99528962082a3edb795d27d77dd1c24 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 12 Jun 2009 00:05:19 -0400 Subject: [PATCH] Enhancement - limit - Allow command line limit overrides. --- src/custom.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/custom.cpp b/src/custom.cpp index 4dedc4fa2..afc038128 100644 --- a/src/custom.cpp +++ b/src/custom.cpp @@ -454,16 +454,15 @@ std::string handleCustomReport (const std::string& report) // Limit the number of rows according to the report definition. int maximum = context.config.get (std::string ("report.") + report + ".limit", (int)0); -/* // If the custom report has a defined limit, then allow an override, which // will show up as a single ID sequence. + + // If the custom report has a defined limit, then allow a numeric override. + // This is an integer specified on the command line (task oldest 4), which is + // parsed as an ID. if (context.config.get (std::string ("report.") + report + ".limit", (int)0) != 0) - { - std::vector sequence = task.getAllIds (); - if (sequence.size () == 1) - maximum = sequence[0]; - } -*/ + if (context.sequence.size () == 1) + maximum = context.sequence[0]; std::stringstream out; if (table.rowCount ())