Skip to content

Commit

Permalink
Made the output of functionlist() prettier and more accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
Finn Herzfeld committed Jul 18, 2012
1 parent 7bd8969 commit eeab5a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contrib/php/cjdns.inc.php
Expand Up @@ -49,12 +49,16 @@ public function functionlist() {
$args[] = "\"".$name."\" => ".$type["type"];
}
}
print $function."(".implode(", ", $args).");\n";
if(count($args) > 0) {
print "call(\"".$function."\", array(".implode(", ", $args)."));\n";
} else {
print "call(\"".$function."\");\n";
}
}
}
}

public function call($function, $args) {
public function call($function, $args=array()) {
global $password;
$be = new BEncoded;
$args['isDct'] = TRUE;
Expand Down

0 comments on commit eeab5a0

Please sign in to comment.