Subversion Repositories oidplus

Rev

Rev 790 | Rev 803 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 790 Rev 800
Line 307... Line 307...
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
                if (OIDplus::authUtils()->isRaLoggedIn($ra_email)) {
311
                if (OIDplus::authUtils()->isRaLoggedIn($ra_email)) {
312
                        $icon = $dir.'/img/treeicon_own.png';
312
                        $icon = $dir.'/'.$this->rootIconname('own');
313
                } else {
313
                } else {
314
                        $icon = $dir.'/img/treeicon_general.png';
314
                        $icon = $dir.'/'.$this->rootIconname('general');
315
                }
315
                }
316
 
316
 
317
                if (!file_exists($icon)) return null; // default icon (folder)
317
                if (!file_exists($icon)) return null; // default icon (folder)
318
 
318
 
319
                return $icon;
319
                return $icon;
Line 510... Line 510...
510
                } else {
510
                } else {
511
                        // Can happen if you don't have a system ID (due to missing OpenSSL plugin)
511
                        // 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
512
                        return md5($this->nodeId(true)); // we don't use $id, because $this->nodeId(true) is possibly more canonical than $id
513
                }
513
                }
514
        }
514
        }
-
 
515
 
-
 
516
        public function rootIconname($mode) {
-
 
517
                // for backwards-compatibility with older plugins
-
 
518
                return 'img/treeicon_'.$mode.'.png';
-
 
519
        }
-
 
520
 
515
}
521
}