summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeremy2009-10-07 15:11:20 (GMT)
committer jeremy2009-10-07 15:11:20 (GMT)
commitbec7746e8c3caa1f2f9459acbafc820a9717151e (patch)
tree255be69a615dc3ebc2cc35456479f40e054758a0
parent492eb143d1775a75b55f9133b4823773125503db (diff)
Make it easy to change the redirect destination when building a report.
-rw-r--r--report/ad_report.module13
1 files changed, 12 insertions, 1 deletions
diff --git a/report/ad_report.module b/report/ad_report.module
index af54ba9..eeb5427 100644
--- a/report/ad_report.module
+++ b/report/ad_report.module
@@ -570,6 +570,12 @@ function ad_report_range_form($form_state, $node, $url = NULL, $start = NULL, $e
'#value' => $url,
'#type' => 'hidden',
);
+ if (isset($data['goto'])) {
+ $form['report']['goto'] = array(
+ '#value' => $data['goto'],
+ '#type' => 'hidden',
+ );
+ }
$form['report']['start'] = array(
'#type' => 'textfield',
'#title' => t('Start'),
@@ -641,7 +647,12 @@ function ad_report_range_form_submit($form, $form_state) {
if (!empty($data)) {
$data = implode('|', $data);
}
- drupal_goto("node/$nid/report/$start/$end/$data");
+ if (isset($form_state['values']['goto'])) {
+ drupal_goto($form_state['values']['goto'] ."/$start/$end/$data");
+ }
+ else {
+ drupal_goto("node/$nid/report/$start/$end/$data");
+ }
}
/**