File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,16 @@ function Run()
45
45
$ ldir = parent ::getParameterValue ('indir ' );
46
46
$ odir = parent ::getParameterValue ('outdir ' );
47
47
if (parent ::getParameterValue ('omim_api_key ' ) == '' ) {
48
- if (parent ::getParameterValue ('omim_api_key_file ' ) != '' ) {
49
- if (file_exists (parent ::getParameterValue ('omim_api_key_file ' ))) {
50
- $ key = file_get_contents (parent ::getParameterValue ('omim_api_key_file ' ));
51
- if ($ key ) {
52
- parent ::setParameterValue ('omim_api_key ' , $ key );
53
- } else {
54
- trigger_error ("No OMIM key has been provided either by commmand line or in the expected omim key file " ,E_USER_WARNING );
55
- }
48
+ $ key_file = parent ::getParameterValue ('omim_api_key_file ' );
49
+ if (file_exists ($ key_file )) {
50
+ $ key = file_get_contents ($ key_file );
51
+ if ($ key ) {
52
+ parent ::setParameterValue ('omim_api_key ' , $ key );
53
+ } else {
54
+ trigger_error ("No API key found in the specified omim key file $ key_file " ,E_USER_WARNING );
56
55
}
56
+ } else {
57
+ trigger_error ("No OMIM key has been provided either by commmand line or in the expected omim key file $ key_file " ,E_USER_WARNING );
57
58
}
58
59
}
59
60
You can’t perform that action at this time.
0 commit comments