Skip to content

Commit

Permalink
Change cli arguments to match get parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlowinski committed Jan 8, 2017
1 parent 4029ef7 commit f5e80bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions update.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
if (php_sapi_name() == "cli") {
// Command line
$shortopts = "";
$longopts = array("password::", "domain::", "ipv4::", "ipv6::");
$longopts = array("pass:", "domain:", "ipaddr:", "ip6addr:");
$options = getopt($shortopts, $longopts);
$pass = isset($options['password']) ? $options['password'] : null;
$pass = isset($options['pass']) ? $options['pass'] : null;
$domain = isset($options['domain']) ? $options['domain'] : null;
$ipaddr = isset($options['ipv4']) ? $options['ipv4'] : null;
$ip6addr = isset($options['ipv6']) ? $options['ipv6'] : null;
$ipaddr = isset($options['ipaddr']) ? $options['ipaddr'] : null;
$ip6addr = isset($options['ip6addr']) ? $options['ip6addr'] : null;
} else {
// HTTP
$pass = isset($_GET['pass']) ? $_GET['pass'] : null;
Expand Down

0 comments on commit f5e80bc

Please sign in to comment.