Subversion Repositories oidplus

Rev

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

Rev 224 Rev 227
Line 55... Line 55...
55
        }
55
        }
56
 
56
 
57
        private function getExampleId() {
57
        private function getExampleId() {
58
                $firsts = array();
58
                $firsts = array();
59
                $first_ns = null;
59
                $first_ns = null;
60
                foreach (OIDplus::getRegisteredObjectTypes() as $ot) {
60
                foreach (OIDplus::getEnabledObjectTypes() as $ot) {
61
                        if (is_null($first_ns)) $first_ns = $ot::ns();
61
                        if (is_null($first_ns)) $first_ns = $ot::ns();
62
                        $res = OIDplus::db()->query("SELECT id FROM ".OIDPLUS_TABLENAME_PREFIX."objects WHERE parent = ? ORDER BY id", array($ot::ns().':'));
62
                        $res = OIDplus::db()->query("SELECT id FROM ".OIDPLUS_TABLENAME_PREFIX."objects WHERE parent = ? ORDER BY id", array($ot::ns().':'));
63
                        if ($row = OIDplus::db()->fetch_array($res))
63
                        if ($row = OIDplus::db()->fetch_array($res))
64
                                $firsts[$ot::ns()] = $row['id'];
64
                                $firsts[$ot::ns()] = $row['id'];
65
                }
65
                }