Rev 1121 | Rev 1126 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1121 | Rev 1124 | ||
---|---|---|---|
Line 460... | Line 460... | ||
460 | if (is_null($row)) { |
460 | if (is_null($row)) { |
461 | $ra_email = $this->getRaMail(); |
461 | $ra_email = $this->getRaMail(); |
462 | } else { |
462 | } else { |
463 | $ra_email = $row['ra_email']; |
463 | $ra_email = $row['ra_email']; |
464 | } |
464 | } |
465 | // TODO: have different icons for Leaf-Nodes |
- | |
466 | 465 | ||
467 | $dirs = glob(OIDplus::localpath().'plugins/'.'*'.'/objectTypes/'.$namespace.'/'); |
466 | $dirs = glob(OIDplus::localpath().'plugins/'.'*'.'/objectTypes/'.$namespace.'/'); |
468 | 467 | ||
469 | if (count($dirs) == 0) return null; // default icon (folder) |
468 | if (count($dirs) == 0) return null; // default icon (folder) |
470 | 469 | ||
471 | $dir = substr($dirs[0], strlen(OIDplus::localpath())); |
470 | $dir = substr($dirs[0], strlen(OIDplus::localpath())); |
472 | 471 | ||
- | 472 | if ($this->isRoot()) { |
|
- | 473 | $icon = $dir . '/' . $this::treeIconFilename('root'); // see also OIDplusPagePublicObjects::get_treeicon_root() |
|
- | 474 | } else { |
|
473 | // We use $this:: instead of self:: , because we want to call the overridden methods |
475 | // We use $this:: instead of self:: , because we want to call the overridden methods |
474 | if (OIDplus::authUtils()->isRaLoggedIn($ra_email)) { |
476 | if (OIDplus::authUtils()->isRaLoggedIn($ra_email)) { |
- | 477 | if ($this->isLeafNode()) { |
|
- | 478 | $icon = $dir . '/' . $this::treeIconFilename('own_leaf'); |
|
- | 479 | if (!file_exists($icon)) $icon = $dir . '/' . $this::treeIconFilename('own'); |
|
- | 480 | } else { |
|
475 | $icon = $dir.'/'.$this::treeIconFilename('own'); |
481 | $icon = $dir . '/' . $this::treeIconFilename('own'); |
- | 482 | } |
|
- | 483 | } else { |
|
- | 484 | if ($this->isLeafNode()) { |
|
- | 485 | $icon = $dir . '/' . $this::treeIconFilename('general_leaf'); |
|
- | 486 | if (!file_exists($icon)) $icon = $dir . '/' . $this::treeIconFilename('general'); |
|
476 | } else { |
487 | } else { |
477 | $icon = $dir.'/'.$this::treeIconFilename('general'); |
488 | $icon = $dir . '/' . $this::treeIconFilename('general'); |
478 | } |
489 | } |
- | 490 | } |
|
- | 491 | } |
|
479 | 492 | ||
480 | if (!file_exists($icon)) return null; // default icon (folder) |
493 | if (!file_exists($icon)) return null; // default icon (folder) |
481 | 494 | ||
482 | return $icon; |
495 | return $icon; |
483 | } |
496 | } |