Rev 804 | Rev 817 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 804 | Rev 805 | ||
---|---|---|---|
Line 306... | Line 306... | ||
306 | 306 | ||
307 | if (count($dirs) == 0) return null; // default icon (folder) |
307 | if (count($dirs) == 0) return null; // default icon (folder) |
308 | 308 | ||
309 | $dir = substr($dirs[0], strlen(OIDplus::localpath())); |
309 | $dir = substr($dirs[0], strlen(OIDplus::localpath())); |
310 | 310 | ||
- | 311 | // We use $this:: instead of self:: , because we want to call the overridden methods |
|
311 | if (OIDplus::authUtils()->isRaLoggedIn($ra_email)) { |
312 | if (OIDplus::authUtils()->isRaLoggedIn($ra_email)) { |
312 | $icon = $dir.'/'.self::rootIconname('own'); |
313 | $icon = $dir.'/'.$this::treeIconFilename('own'); |
313 | } else { |
314 | } else { |
314 | $icon = $dir.'/'.self::rootIconname('general'); |
315 | $icon = $dir.'/'.$this::treeIconFilename('general'); |
315 | } |
316 | } |
316 | 317 | ||
317 | if (!file_exists($icon)) return null; // default icon (folder) |
318 | if (!file_exists($icon)) return null; // default icon (folder) |
318 | 319 | ||
319 | return $icon; |
320 | return $icon; |
Line 511... | Line 512... | ||
511 | // Can happen if you don't have a system ID (due to missing OpenSSL plugin) |
512 | // Can happen if you don't have a system ID (due to missing OpenSSL plugin) |
512 | return md5($this->nodeId(true)); // we don't use $id, because $this->nodeId(true) is possibly more canonical than $id |
513 | return md5($this->nodeId(true)); // we don't use $id, because $this->nodeId(true) is possibly more canonical than $id |
513 | } |
514 | } |
514 | } |
515 | } |
515 | 516 | ||
516 | public static function rootIconname($mode) { |
517 | public static function treeIconFilename($mode) { |
517 | // for backwards-compatibility with older plugins |
518 | // for backwards-compatibility with older plugins |
518 | return 'img/treeicon_'.$mode.'.png'; |
519 | return 'img/treeicon_'.$mode.'.png'; |
519 | } |
520 | } |
520 | 521 | ||
521 | } |
522 | } |