Rev 977 | Rev 1000 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 977 | Rev 979 | ||
---|---|---|---|
Line 370... | Line 370... | ||
370 | } |
370 | } |
371 | } |
371 | } |
372 | 372 | ||
373 | // Get parent gives the next possible parent which is EXISTING in OIDplus |
373 | // Get parent gives the next possible parent which is EXISTING in OIDplus |
374 | // It does not give the immediate parent |
374 | // It does not give the immediate parent |
375 | public function getParent() { |
375 | public function getParent()/*: ?OIDplusObject*/ { |
376 | if (!OIDplus::baseConfig()->getValue('OBJECT_CACHING', true)) { |
376 | if (!OIDplus::baseConfig()->getValue('OBJECT_CACHING', true)) { |
377 | $res = OIDplus::db()->query("select parent from ###objects where id = ?", array($this->nodeId())); |
377 | $res = OIDplus::db()->query("select parent from ###objects where id = ?", array($this->nodeId())); |
378 | if (!$res->any()) return null; |
378 | if (!$res->any()) return null; |
379 | $row = $res->fetch_array(); |
379 | $row = $res->fetch_array(); |
380 | $parent = $row['parent']; |
380 | $parent = $row['parent']; |
Line 398... | Line 398... | ||
398 | 398 | ||
399 | $prev = $cur; |
399 | $prev = $cur; |
400 | $cur = $cur->one_up(); |
400 | $cur = $cur->one_up(); |
401 | if (!$cur) return null; |
401 | if (!$cur) return null; |
402 | } while ($prev != $cur); |
402 | } while ($prev != $cur); |
403 | - | ||
404 | return null; |
- | |
405 | } |
403 | } |
- | 404 | return null; |
|
406 | } |
405 | } |
407 | 406 | ||
408 | public function getRaMail() { |
407 | public function getRaMail() { |
409 | if (!OIDplus::baseConfig()->getValue('OBJECT_CACHING', true)) { |
408 | if (!OIDplus::baseConfig()->getValue('OBJECT_CACHING', true)) { |
410 | $res = OIDplus::db()->query("select ra_email from ###objects where id = ?", array($this->nodeId())); |
409 | $res = OIDplus::db()->query("select ra_email from ###objects where id = ?", array($this->nodeId())); |