Subversion Repositories oidplus

Rev

Rev 918 | Rev 1050 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 918 Rev 1012
Line 51... Line 51...
51
 
51
 
52
        private function getExampleId() {
52
        private function getExampleId() {
53
                $firsts = array();
53
                $firsts = array();
54
                $first_ns = null;
54
                $first_ns = null;
55
                foreach (OIDplus::getEnabledObjectTypes() as $ot) {
55
                foreach (OIDplus::getEnabledObjectTypes() as $ot) {
56
                        $res = OIDplus::db()->query("SELECT id FROM ###objects WHERE parent = ? ORDER BY id", array($ot::ns().':'));
56
                        $res = OIDplus::db()->query("SELECT id FROM ###objects WHERE parent = ? ORDER BY ".OIDplus::db()->natOrder('id'), array($ot::ns().':'));
57
                        if ($row = $res->fetch_array()) {
57
                        if ($row = $res->fetch_array()) {
58
                                if (is_null($first_ns)) $first_ns = $ot::ns();
58
                                if (is_null($first_ns)) $first_ns = $ot::ns();
59
                                $firsts[$ot::ns()] = $row['id'];
59
                                $firsts[$ot::ns()] = $row['id'];
60
                        }
60
                        }
61
                }
61
                }