From b10ed42768eb9905314d553b90e1ccd8ae228190 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 24 Aug 2010 16:04:01 +0200 Subject: [PATCH] Exit early. --- chora/cvsgraph.php | 63 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/chora/cvsgraph.php b/chora/cvsgraph.php index a341b0f3a..bf0974ccd 100644 --- a/chora/cvsgraph.php +++ b/chora/cvsgraph.php @@ -46,41 +46,42 @@ if (Horde_Util::getFormData('show_image')) { header('Content-Type: image/png'); passthru($conf['paths']['cvsgraph'] . ' ' . $argstr . ' ' . $file); -} else { - // Display the wrapper page for the image. - $title = sprintf(_("Graph for %s"), $injector->getInstance('Horde_Text_Filter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true))); - $extraLink = Chora::getFileViews($where, 'cvsgraph'); + exit; +} - require CHORA_TEMPLATES . '/common-header.inc'; - require CHORA_TEMPLATES . '/menu.inc'; - require CHORA_TEMPLATES . '/headerbar.inc'; +// Display the wrapper page for the image. +$title = sprintf(_("Graph for %s"), $injector->getInstance('Horde_Text_Filter')->filter($where, 'space2html', array('encode' => true, 'encode_all' => true))); +$extraLink = Chora::getFileViews($where, 'cvsgraph'); - $imgUrl = Chora::url('cvsgraph', $where, array('show_image' => 1)); +require CHORA_TEMPLATES . '/common-header.inc'; +require CHORA_TEMPLATES . '/menu.inc'; +require CHORA_TEMPLATES . '/headerbar.inc'; - $args = array('c' => $conf['paths']['cvsgraph_conf'], - 'M' => 'graphMap', - 'r' => $root, - '0' => '&', - '1' => Chora::url('browsefile', $where, array('dummy' => 'true')), - '2' => Chora::url('diff', $where, array('dummy' =>'true')), - '3' => Chora::url('co', $where, array('dummy' => 'true')), - ); +$imgUrl = Chora::url('cvsgraph', $where, array('show_image' => 1)); - // Build up the argument string. - $argstr = ''; - if (!strncasecmp(PHP_OS, 'WIN', 3)) { - foreach ($args as $key => $val) { - $argstr .= "-$key \"$val\" "; - } - } else { - foreach ($args as $key => $val) { - $argstr .= "-$key '$val' "; - } +$args = array('c' => $conf['paths']['cvsgraph_conf'], + 'M' => 'graphMap', + 'r' => $root, + '0' => '&', + '1' => Chora::url('browsefile', $where, array('dummy' => 'true')), + '2' => Chora::url('diff', $where, array('dummy' =>'true')), + '3' => Chora::url('co', $where, array('dummy' => 'true')), +); + +// Build up the argument string. +$argstr = ''; +if (!strncasecmp(PHP_OS, 'WIN', 3)) { + foreach ($args as $key => $val) { + $argstr .= "-$key \"$val\" "; } +} else { + foreach ($args as $key => $val) { + $argstr .= "-$key '$val' "; + } +} - // Generate the imagemap. - $map = shell_exec($conf['paths']['cvsgraph'] . ' ' . $argstr . ' -i ' . $file); +// Generate the imagemap. +$map = shell_exec($conf['paths']['cvsgraph'] . ' ' . $argstr . ' -i ' . $file); - require CHORA_TEMPLATES . '/cvsgraph/cvsgraph.inc'; - require $registry->get('templates', 'horde') . '/common-footer.inc'; -} +require CHORA_TEMPLATES . '/cvsgraph/cvsgraph.inc'; +require $registry->get('templates', 'horde') . '/common-footer.inc'; -- 2.11.0