/[CvsGraph]/cvsgraph/contrib/mkimage.php.in
ViewVC logotype

Diff of /cvsgraph/contrib/mkimage.php.in

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Mon Nov 13 20:42:23 2006 UTC revision 1.2, Wed May 21 13:33:35 2008 UTC
# Line 0  Line 1 
1    <?php
2            /* Some basic checks are in place */
3            isset($r) || die("CVSroot must be set\n");
4            isset($m) || die("CVSmodule must be set\n");
5            isset($f) || die("File must be set\n");
6            if(strchr($r, "'") || strchr($m, "'") || strchr($f, "'"))
7                    die("Invalid characters in arguments\n");
8    
9            /* I'll be paranoid, set root and module here so no one can get access elsewhere */
10            /* Remove this or change it to suit your needs */
11    //      $r = "/home/cvsgraph";
12    //      $m = "cvsgraph";
13    
14            /* Shell escape, PHP4 has functions for this, use them */
15            $r = "'" . $r . "'";
16            $m = "'" . $m . "'";
17            $f = "'" . $f . ",v'";
18    
19            /* I expose the paths here (accessible via the server). */
20            /* Set this to a private place to make it secure. */
21            $prefix = "@prefix@";
22            $exec_prefix = "@exec_prefix@";
23            $cvsgraph = "@bindir@/cvsgraph";
24            $cvsgraph_conf = "@sysconfdir@/cvsgraph.conf";
25    
26            /* Default I generate PNG */
27            Header("Content-Type: image/png");
28            passthru("$cvsgraph -q -c $cvsgraph_conf -r $r -m $m $f");
29    ?>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0