This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository website.

commit 209bab2f379bc87f972cfe90a800fc6e1607fffd
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Thu Oct 30 01:09:00 2014 +0100

    Link to both JOSM types.
---
 josmredir.php | 64 +++++++++++++++++++++++------------------------------------
 1 file changed, 25 insertions(+), 39 deletions(-)

diff --git a/josmredir.php b/josmredir.php
index 4484790..b3d15e0 100755
--- a/josmredir.php
+++ b/josmredir.php
@@ -7,27 +7,20 @@ $latest_re = "/josm-latest.jar: (\d+)/";
 $svnrepo = "http://josm.openstreetmap.de/svn/trunk";;
 $i18nrepo = "http://svn.openstreetmap.org/applications/editors/josm/i18n/";;
 
-#echo "<pre>";
-#print_r($_GET);
-#echo "</pre>";
+$type = "tested";
+$re = $tested_re;
 
-    $re = $tested_re;
-    $text = "tested";
-    if (isset($_GET["get"])) {
-        switch ($_GET["get"]) {
-            case "latest":
-                $re = $latest_re;
-                $text = "latest";
-                break;
-            default:
-                break;
-        }
+if (isset($_GET["type"])) {
+    switch ($_GET["type"]) {
+        case "latest":
+            $type = "latest";
+            $re = $latest_re;
+            break;
+        default:
+            break;
     }
+}
 
-    $query = "";
-    if (isset($_GET["debian"])) {
-        $query .= ($_GET["debian"] == "yes") ? "&debian=yes" : "";
-    }
 ?>
 <!DOCTYPE html>
 <html>
@@ -42,37 +35,30 @@ $i18nrepo = 
"http://svn.openstreetmap.org/applications/editors/josm/i18n/";;
 
 <p>
   This page is mainly meant to be used with
-  <span style="font-family: monospace;"><a 
href="http://packages.debian.org/sid/devscripts";>uscan</a><a 
href="http://manpages.debian.org/cgi-bin/man.cgi?query=uscan";>(1)</a></span>.
+  <span style="font-family: monospace;"><a 
href="http://manpages.debian.org/cgi-bin/man.cgi?query=uscan";>uscan(1)</a></span>.
 </p>
 <p>
-  Supported argument(s):
+  JOSM releases:
 </p>
 <ul>
-  <li>
-    <dl>
-      <dt>get</dt>
-      <dd>"<em>latest</em>" makes it look for josm-latest.jar. Any other value 
makes it act on josm-tested.jar.</dd>
-    </dl>
-  </li>
+  <li><a href="<?= $_SERVER["PHP_SELF"] ?>?type=tested">tested</a></li>
+  <li><a href="<?= $_SERVER["PHP_SELF"] ?>?type=latest">latest</a></li>
 </ul>
-
 <?php
-    $handle = @fopen($url, "r");
-    if ($handle) {
-        while (!feof($handle)) {
-            $buffer = fgets($handle);
-#            echo "<pre>";print_r(htmlentities($re));echo "</pre>";
-#            echo "<pre>";print_r(htmlentities($buffer));echo "</pre>";
-            if (preg_match($re, $buffer, $matches)) {
-                $version = $matches[1];
+
+$handle = @fopen($url, "r");
+if ($handle) {
+    while (!feof($handle)) {
+        $buffer = fgets($handle);
+        if (preg_match($re, $buffer, $matches)) {
+            $version = $matches[1];
 ?>
-<a href='<?= $_SERVER["PHP_SELF"] ?>?rev=<?= $version ?><?= $query ?>'>JOSM 
<?= $text ?> <?= $version ?></a>
+<a href='<?= $_SERVER["PHP_SELF"] ?>?rev=<?= $version ?>'>JOSM <?= $type ?> 
<?= $version ?></a>
 <?php
-                break;
-            }
         }
-        fclose($handle);
     }
+    fclose($handle);
+}
 
 if (isset($_GET["rev"]) && preg_match("/^\d+$/", $_GET["rev"])) {
 ?>

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/website.git

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to