Rev 1148 | Rev 1279 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1148 | Rev 1156 | ||
---|---|---|---|
Line 66... | Line 66... | ||
66 | private function getExampleId() { |
66 | private function getExampleId() { |
67 | $firsts = array(); |
67 | $firsts = array(); |
68 | $first_ns = null; |
68 | $first_ns = null; |
69 | foreach (OIDplus::getEnabledObjectTypes() as $ot) { |
69 | foreach (OIDplus::getEnabledObjectTypes() as $ot) { |
70 | $res = OIDplus::db()->query("select id FROM ###objects where parent = ?", array($ot::ns().':')); |
70 | $res = OIDplus::db()->query("select id FROM ###objects where parent = ?", array($ot::ns().':')); |
71 | $res = new OIDplusNaturalSortedQueryResult($res, 'id'); |
71 | $res->naturalSortByField('id'); |
72 | if ($row = $res->fetch_array()) { |
72 | if ($row = $res->fetch_array()) { |
73 | if (is_null($first_ns)) $first_ns = $ot::ns(); |
73 | if (is_null($first_ns)) $first_ns = $ot::ns(); |
74 | $firsts[$ot::ns()] = $row['id']; |
74 | $firsts[$ot::ns()] = $row['id']; |
75 | } |
75 | } |
76 | } |
76 | } |