Rev 1125 | Rev 1130 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1125 | Rev 1127 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | /** |
28 | /** |
29 | * @param $ot |
29 | * @param $ot |
30 | * @return string|null |
30 | * @return string|null |
31 | */ |
31 | */ |
32 | private function get_treeicon_root($ot)/*: ?string*/ { |
32 | private function get_treeicon_root($ot)/*: ?string*/ { |
33 | $dirs = glob(OIDplus::localpath().'plugins/'.'*'.'/objectTypes/'.$ot::ns()); |
- | |
34 | - | ||
35 | if (count($dirs) == 0) { |
33 | $root = $ot::parse($ot::root()); |
36 | $icon = null; |
- | |
37 | } else { |
- | |
38 | $dir = $dirs[0]; |
- | |
39 | $icon_name = $ot::treeIconFilename('root'); // see also OIDplusObject::getIcon() |
- | |
40 | if (!$icon_name) return null; |
34 | if (!$root) return null; |
41 | $icon = $dir.'/'.$icon_name; |
- | |
42 | if (!file_exists($icon)) return null; |
- | |
43 | $icon = substr($icon, strlen(OIDplus::localpath())); |
- | |
44 | } |
- | |
45 | - | ||
46 | return $icon; |
35 | return $root->getIcon(); |
47 | } |
36 | } |
48 | 37 | ||
49 | /** |
38 | /** |
50 | * @param $id |
39 | * @param $id |
51 | * @param $old_ra |
40 | * @param $old_ra |