From d1445de57677af73df9f55664b030d70436f814d Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Wed, 13 Jan 2010 08:18:49 -0500 Subject: [PATCH] Operator: Don't open the form until we are sending output --- operator/export.php | 2 +- operator/search.php | 2 +- operator/viewgraph.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/operator/export.php b/operator/export.php index 7eef94ea7..4d93507d6 100644 --- a/operator/export.php +++ b/operator/export.php @@ -31,7 +31,6 @@ if (isset($_SESSION['operator']['lastdata'])) { } $form = new ExportCDRForm(_("Export Call Detail Records"), $vars); -$form->open($renderer, $vars, Horde::applicationUrl('export.php'), 'post'); if ($form->isSubmitted() && $form->validate($vars, true)) { try { $_SESSION['operator']['lastsearch']['params'] = array( @@ -61,6 +60,7 @@ $title = _("Export Call Detail Records"); require OPERATOR_TEMPLATES . '/common-header.inc'; require OPERATOR_TEMPLATES . '/menu.inc'; $notification->notify(); +$form->open($renderer, $vars, Horde::applicationUrl('export.php'), 'post'); $form->renderActive($renderer, $vars); $columns = unserialize($prefs->getValue('columns')); diff --git a/operator/search.php b/operator/search.php index 3d93847a6..7f12e9368 100644 --- a/operator/search.php +++ b/operator/search.php @@ -33,7 +33,6 @@ if (isset($_SESSION['operator']['lastdata'])) { } $form = new SearchCDRForm(_("Search Call Detail Records"), $vars); -$form->open($renderer, $vars, Horde::applicationUrl('search.php'), 'post'); if ($form->isSubmitted() && $form->validate($vars, true)) { $accountcode = $vars->get('accountcode'); $dcontext = $vars->get('dcontext'); @@ -95,6 +94,7 @@ Horde::addScriptFile('stripe.js', 'horde', true); require OPERATOR_TEMPLATES . '/common-header.inc'; require OPERATOR_TEMPLATES . '/menu.inc'; $notification->notify(); +$form->open($renderer, $vars, Horde::applicationUrl('search.php'), 'post'); $form->renderActive($renderer, $vars); $columns = unserialize($prefs->getValue('columns')); diff --git a/operator/viewgraph.php b/operator/viewgraph.php index 24a053bf7..f87e1b6a0 100644 --- a/operator/viewgraph.php +++ b/operator/viewgraph.php @@ -21,7 +21,6 @@ $renderer = new Horde_Form_Renderer(); $vars = Horde_Variables::getDefaultVariables(); $form = new GraphCDRForm(_("Graph CDR Data"), $vars); -$form->open($renderer, $vars, Horde::applicationUrl('viewgraph.php'), 'post'); if ($form->isSubmitted() && $form->validate($vars, true)) { $accountcode = $vars->get('accountcode'); $dcontext = $vars->get('dcontext'); @@ -101,6 +100,7 @@ $title = _("Call Detail Records Graph"); require OPERATOR_TEMPLATES . '/common-header.inc'; require OPERATOR_TEMPLATES . '/menu.inc'; +$form->open($renderer, $vars, Horde::applicationUrl('viewgraph.php'), 'post'); $form->renderActive($renderer, $vars); if (!empty($stats) && !empty($graphs[$curgraph])) { -- 2.11.0