]> git.pld-linux.org Git - packages/eventum.git/commitdiff
- rewritten scm config file which allows simple way of using https scheme
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 19 Jun 2006 12:43:16 +0000 (12:43 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    eventum-cvs.php -> 1.2
    eventum-scm-ssl.patch -> 1.1

eventum-cvs.php
eventum-scm-ssl.patch [new file with mode: 0644]

index 0b2eed2508a20c4d855016e3f2403c16cbdd964a..e451aecbb10ab4532f05b0a5a309332e8f5d4fa3 100644 (file)
@@ -1,7 +1,6 @@
 <?php
+# $Id$
+# URL to your Eventum installation.
+# https is supported transparently by PHP 5 if you have openssl module enabled.
 
-$eventum_domain = 'localhost';
-$eventum_relative_url = '/eventum/';
-$eventum_port = 80;
-
-?>
+$eventum_url = 'http://localhost/eventum/';
diff --git a/eventum-scm-ssl.patch b/eventum-scm-ssl.patch
new file mode 100644 (file)
index 0000000..f70fc0b
--- /dev/null
@@ -0,0 +1,54 @@
+--- eventum-1.7.1/misc/scm/process_cvs_commits.php     2006-06-19 15:32:19.384637639 +0300
++++ eventum-1.7.1/misc/scm/process_cvs_commits.php     2006-06-19 15:31:00.742910000 +0300
+@@ -35,6 +35,21 @@
+ // DO NOT CHANGE ANYTHING AFTER THIS LINE
+ //
++if (isset($eventum_url)) {
++    $data = parse_url($eventum_url);
++} else {
++    // legacy
++    $data = array();
++    $data['host'] = $eventum_domain;
++    $data['path'] = $eventum_relative_url;
++    $data['port'] = $eventum_port;
++    $data['scheme'] = 'http';
++}
++
++if (!isset($data['port'])) {
++    $data['port'] = $data['scheme'] == 'https' ? 443 : 80;
++}
++
+ if (isset($_SERVER)) {
+     $HTTP_SERVER_VARS = $_SERVER;
+ }
+@@ -76,7 +91,7 @@
+     $username = rawurlencode($username);
+     // build the GET url to use
+-    $ping_url = $eventum_relative_url . "scm_ping.php?module=$cvs_module&username=$username&commit_msg=$commit_msg";
++    $ping_url = $data['path']. "scm_ping.php?module=$cvs_module&username=$username&commit_msg=$commit_msg";
+     foreach ($matches[1] as $issue_id) {
+         $ping_url .= "&issue[]=$issue_id";
+     }
+@@ -87,13 +102,16 @@
+         $ping_url .= "&new_versions[$i]=" . rawurlencode($modified_files[$i]['new_revision']);
+     }
+-    $fp = fsockopen($eventum_domain, $eventum_port, $errno, $errstr, 30);
++    $address = $data['host'];
++    if ($data['scheme'] == 'https') {
++        $address = "ssl://$address";
++    }
++    $fp = fsockopen($address, $data['port'], $errno, $errstr, 30);
+     if (!$fp) {
+-        echo "Error: Could not ping the Eventum SCM handler script.\n";
+-        exit();
++        die("Error: Could not ping the Eventum SCM handler script.\n");
+     } else {
+         $msg = "GET $ping_url HTTP/1.1\r\n";
+-        $msg .= "Host: $eventum_domain\r\n";
++        $msg .= "Host: $data[host]\r\n";
+         $msg .= "Connection: Close\r\n\r\n";
+         fwrite($fp, $msg);
+         $buf = fgets($fp, 4096);
This page took 0.08751 seconds and 4 git commands to generate.