Skip to content

Commit 9d22837

Browse files
fixed omim gzip support
1 parent 61bd9a1 commit 9d22837

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

omim/omim.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ function Run()
101101
$total = count($entries);
102102
foreach($entries AS $omim_id => $type) {
103103
echo "processing ".(++$i)." of $total - omim# ";
104-
$download_file = "compress.zlib://".$ldir.$omim_id.".json.gz";
104+
$download_file = $ldir.$omim_id.".json.gz";
105+
$gzfile = "compress.zlib://$download_file";
105106
// download if the file doesn't exist or we are told to
106107
if(!file_exists($download_file) || parent::getParameterValue('download') == true) {
107108
// download using the api
@@ -114,7 +115,7 @@ function Run()
114115
}
115116

116117
// load entry, parse and write to file
117-
$entry = json_decode(file_get_contents($download_file), true);
118+
$entry = json_decode(file_get_contents($gzfile), true);
118119
$omim_id = trim((string)$entry["omim"]["entryList"][0]["entry"]['mimNumber']);
119120
echo $omim_id;
120121
$this->ParseEntry($entry,$type);

0 commit comments

Comments
 (0)