Permalink
Browse files

do not care about php's notion of 'required' because it is weird and …

…broken
  • Loading branch information...
1 parent 03e4072 commit 4405904791fa25354ae543fb0188971bd4df0024 Aaron S Cope committed May 14, 2012
Showing with 5 additions and 6 deletions.
  1. +5 −6 www/include/lib_cli.php
View
@@ -34,14 +34,13 @@ function cli_getopts($spec, $more=array()){
foreach ($spec as $key => $details){
- $extras = "::";
- $name = $key;
+ # Note: the meanning of 'required' is a bit different than the
+ # semantics in the getopt() function. (20120514/straup)
- if ($details['required']){
- $extras = ":";
- }
+ $extras = ":";
+ $name = $key;
- else if (isset($details['boolean'])){
+ if (isset($details['boolean'])){
$extras = "";
}

0 comments on commit 4405904

Please sign in to comment.