aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2016-09-18 20:25:52 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2016-09-18 20:25:52 +0200
commit03be651482bfc6718e1a2185245a0c9a9f842bed (patch)
treefe77864afd7473c8c216a71655841b3f4d138edb
parent7f2a8bd6837b731b5da3fac821df6e4ac268a20b (diff)
downloadcalendar-03be651482bfc6718e1a2185245a0c9a9f842bed.zip
calendar-03be651482bfc6718e1a2185245a0c9a9f842bed.tar.bz2
Includes changes proposed by Mael Valais.
-rw-r--r--Makefile3
-rw-r--r--get.php13
2 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e8db877..43bc2b8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,7 @@
calendar:
+ # Printing of the current Java version suggested by Mael Valais.
+ java -version
+ javac -version
javac src/*.java -d bin/
clean:
diff --git a/get.php b/get.php
index d816573..0338ccb 100644
--- a/get.php
+++ b/get.php
@@ -1,4 +1,17 @@
<?php
+
+ /** Allows the use of get.php as an CLI tool **/
+ /** Example: php -e get.php m=IATI,3DIS g=M1_INFO **/
+ /** Patch by Mael Valais **/
+ if (php_sapi_name() == "cli")
+ {
+ for ($c = 1; $c < $argc; $c++)
+ {
+ $param = explode("=", $argv[$c], 2);
+ $_GET[$param[0]] = $param[1]; // $_GET['name1'] = 'value1
+ }
+ }
+
header('Content-Type: text/calendar; charset=UTF-8');
$group = $_GET["g"];