Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 1126 → Rev 1127

/trunk/includes/classes/OIDplusObject.class.php
463,14 → 463,15
$ra_email = $row['ra_email'];
}
 
$dirs = glob(OIDplus::localpath().'plugins/'.'*'.'/objectTypes/'.$namespace.'/');
// $dirs = glob(OIDplus::localpath().'plugins/'.'*'.'/objectTypes/'.$namespace.'/');
// if (count($dirs) == 0) return null; // default icon (folder)
// $dir = substr($dirs[0], strlen(OIDplus::localpath()));
$reflection = new \ReflectionClass($this);
$dir = dirname($reflection->getFilename());
$dir = substr($dir, strlen(OIDplus::localpath()));
 
if (count($dirs) == 0) return null; // default icon (folder)
 
$dir = substr($dirs[0], strlen(OIDplus::localpath()));
 
if ($this->isRoot()) {
$icon = $dir . '/' . $this::treeIconFilename('root'); // see also OIDplusPagePublicObjects::get_treeicon_root()
$icon = $dir . '/' . $this::treeIconFilename('root');
} else {
// We use $this:: instead of self:: , because we want to call the overridden methods
if ($ra_email && OIDplus::authUtils()->isRaLoggedIn($ra_email)) {