Subversion Repositories oidplus

Rev

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

Rev 962 Rev 977
Line 139... Line 139...
139
        }
139
        }
140
 
140
 
141
        public function chunkedNotation($withAbbr=true) {
141
        public function chunkedNotation($withAbbr=true) {
142
                $curid = self::root().$this->number;
142
                $curid = self::root().$this->number;
143
 
143
 
144
                $res = OIDplus::db()->query("select id, title from ###objects where id = ?", array($curid));
144
                $obj = OIDplusObject::findFitting($curid);
145
                if (!$res->any()) return $this->number;
145
                if (!$obj) return $this->number;
146
 
146
 
147
                $hints = array();
147
                $hints = array();
148
                $lengths = array(strlen($curid));
148
                $lengths = array(strlen($curid));
149
                while (($res = OIDplus::db()->query("select parent, title from ###objects where id = ?", array($curid)))->any()) {
149
                while ($obj = OIDplusObject::findFitting($curid)) {
150
                        $row = $res->fetch_array();
150
                        $objParent = $obj->getParent();
-
 
151
                        if (!$objParent) break;
151
                        $curid = $row['parent'];
152
                        $curid = $objParent->nodeId();
152
                        $hints[] = $row['title'];
153
                        $hints[] = $obj->getTitle();
153
                        $lengths[] = strlen($curid);
154
                        $lengths[] = strlen($curid);
154
                }
155
                }
155
 
156
 
156
                array_shift($lengths);
157
                array_shift($lengths);
157
                $chunks = array();
158
                $chunks = array();