Rev 1321 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1321 | Rev 1423 | ||
---|---|---|---|
Line 79... | Line 79... | ||
79 | $dos_ids[$real_parent] = str_pad(strval($i++), 8, '0', STR_PAD_LEFT); |
79 | $dos_ids[$real_parent] = str_pad(strval($i++), 8, '0', STR_PAD_LEFT); |
80 | fill_asn1($real_parent, $asn1); // well-known OIDs? |
80 | fill_asn1($real_parent, $asn1); // well-known OIDs? |
81 | fill_iri($real_parent, $iri); // well-known OIDs? |
81 | fill_iri($real_parent, $iri); // well-known OIDs? |
82 | $title[$real_parent] = ''; |
82 | $title[$real_parent] = ''; |
83 | $description[$real_parent] = ''; |
83 | $description[$real_parent] = ''; |
84 | $res2 = OIDplus::db()->query("select * from ###objects where id = 'oid:$real_parent'"); |
84 | $res2 = OIDplus::db()->query("select * from ###objects where id = ?", ["oid:$real_parent"]); |
85 | while ($row2 = $res2->fetch_object()) { |
85 | while ($row2 = $res2->fetch_object()) { |
86 | $title[$real_parent] = vts_utf8_decode($row2->title); |
86 | $title[$real_parent] = vts_utf8_decode($row2->title); |
87 | $description[$real_parent] = vts_utf8_decode($row2->description); |
87 | $description[$real_parent] = vts_utf8_decode($row2->description); |
88 | } |
88 | } |
89 | 89 | ||
Line 190... | Line 190... | ||
190 | * @return void |
190 | * @return void |
191 | * @throws OIDplusException |
191 | * @throws OIDplusException |
192 | */ |
192 | */ |
193 | function fill_asn1(string $oid, array &$asn1) { |
193 | function fill_asn1(string $oid, array &$asn1) { |
194 | if (!isset($asn1[$oid])) $asn1[$oid] = array(); |
194 | if (!isset($asn1[$oid])) $asn1[$oid] = array(); |
195 | $res = OIDplus::db()->query("select * from ###asn1id where oid = 'oid:$oid'"); |
195 | $res = OIDplus::db()->query("select * from ###asn1id where oid = ?", ["oid:$oid"]); |
196 | while ($row = $res->fetch_object()) { |
196 | while ($row = $res->fetch_object()) { |
197 | $asn1[$oid][] = $row->name; |
197 | $asn1[$oid][] = $row->name; |
198 | } |
198 | } |
199 | } |
199 | } |
200 | 200 | ||
Line 204... | Line 204... | ||
204 | * @return void |
204 | * @return void |
205 | * @throws OIDplusException |
205 | * @throws OIDplusException |
206 | */ |
206 | */ |
207 | function fill_iri(string $oid, array &$iri) { |
207 | function fill_iri(string $oid, array &$iri) { |
208 | if (!isset($iri[$oid])) $iri[$oid] = array(); |
208 | if (!isset($iri[$oid])) $iri[$oid] = array(); |
209 | $res = OIDplus::db()->query("select * from ###iri where oid = 'oid:$oid'"); |
209 | $res = OIDplus::db()->query("select * from ###iri where oid = ?", ["oid:$oid"]); |
210 | while ($row = $res->fetch_object()) { |
210 | while ($row = $res->fetch_object()) { |
211 | $iri[$oid][] = $row->name; |
211 | $iri[$oid][] = $row->name; |
212 | } |
212 | } |
213 | } |
213 | } |
214 | 214 |