Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 976 → Rev 977

/trunk/plugins/viathinksoft/objectTypes/gs1/OIDplusGs1.class.php
141,15 → 141,16
public function chunkedNotation($withAbbr=true) {
$curid = self::root().$this->number;
 
$res = OIDplus::db()->query("select id, title from ###objects where id = ?", array($curid));
if (!$res->any()) return $this->number;
$obj = OIDplusObject::findFitting($curid);
if (!$obj) return $this->number;
 
$hints = array();
$lengths = array(strlen($curid));
while (($res = OIDplus::db()->query("select parent, title from ###objects where id = ?", array($curid)))->any()) {
$row = $res->fetch_array();
$curid = $row['parent'];
$hints[] = $row['title'];
while ($obj = OIDplusObject::findFitting($curid)) {
$objParent = $obj->getParent();
if (!$objParent) break;
$curid = $objParent->nodeId();
$hints[] = $obj->getTitle();
$lengths[] = strlen($curid);
}