Webアプリケーションフレームワーク Ethna の git向けリポジトリ
Revisión | b0c6faac29e9ac3c5fb71d5e5aadb25788676f4c (tree) |
---|---|
Tiempo | 2009-10-18 02:57:50 |
Autor | Yoshinari Takaoka <mumumu@mumu...> |
Commiter | Yoshinari Takaoka |
- fixed bug long option except for "--version" emits fatal error.
@@ -35,15 +35,14 @@ $eh =& new Ethna_Handle(); | ||
35 | 35 | list($my_arg_list, $arg_list) = _Ethna_HandleGateway_SeparateArgList($arg_list); |
36 | 36 | $r = $opt->getopt($my_arg_list, "v", array("version")); |
37 | 37 | if (Ethna::isError($r)) { |
38 | - _Ethna_HandleGateway_ShowUsage(); | |
39 | - exit(1); | |
40 | -} | |
41 | - | |
42 | -// ad-hoc:( | |
43 | -foreach ($r[0] as $opt) { | |
44 | - if ($opt[0] == "v" || $opt[0] == "--version") { | |
45 | - _Ethna_HandleGateway_ShowVersion(); | |
46 | - exit(2); | |
38 | + $id = 'help'; | |
39 | +} else { | |
40 | + // ad-hoc:( | |
41 | + foreach ($r[0] as $opt) { | |
42 | + if ($opt[0] == "v" || $opt[0] == "--version") { | |
43 | + _Ethna_HandleGateway_ShowVersion(); | |
44 | + exit(2); | |
45 | + } | |
47 | 46 | } |
48 | 47 | } |
49 | 48 |