diff options
author | Andreas Gohr <gohr@cosmocode.de> | 2009-12-16 10:18:05 +0100 |
---|---|---|
committer | Andreas Gohr <gohr@cosmocode.de> | 2009-12-16 10:18:05 +0100 |
commit | fb55a3dea369ee2d294a5723ab4899a87e38a16a (patch) | |
tree | b3917a75d9ce57989da416e88b4b5e3e5baffd27 /lib/plugins/plugin/classes/ap_info.class.php | |
parent | 486cd881c4432494461089eaa4b384e2fd571618 (diff) | |
download | rpg-fb55a3dea369ee2d294a5723ab4899a87e38a16a.tar.gz rpg-fb55a3dea369ee2d294a5723ab4899a87e38a16a.tar.bz2 |
show component name in plugin infos
Ignore-this: 9ca4c177b16580a13acf334d78570bd7
darcs-hash:20091216091805-6e07b-14394dcf6800210af85067b1214bc8dbb340d3b4.gz
Diffstat (limited to 'lib/plugins/plugin/classes/ap_info.class.php')
-rw-r--r-- | lib/plugins/plugin/classes/ap_info.class.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/plugins/plugin/classes/ap_info.class.php b/lib/plugins/plugin/classes/ap_info.class.php index dd1765f6c..fcadb4599 100644 --- a/lib/plugins/plugin/classes/ap_info.class.php +++ b/lib/plugins/plugin/classes/ap_info.class.php @@ -13,10 +13,23 @@ class ap_info extends ap_manage { $component_list = $this->get_plugin_components($this->manager->plugin); usort($component_list, array($this,'component_sort')); + foreach ($component_list as $component) { if ($obj = & plugin_load($component['type'],$component['name']) === NULL) continue; - $this->details[] = array_merge($obj->getInfo(), array('type' => $component['type'])); + $compname = explode('_',$component['name']); + if($compname[1]){ + $compname = '['.$compname[1].']'; + }else{ + $compname = ''; + } + + $this->details[] = array_merge( + $obj->getInfo(), + array( + 'type' => $component['type'], + 'compname' => $compname + )); unset($obj); } @@ -72,7 +85,7 @@ class ap_info extends ap_manage { foreach ($this->details as $info) { ptln("<dl>",4); - ptln("<dt>".$this->manager->getLang('name')."</dt><dd>".$this->out($info['name'])."</dd>",6); + ptln("<dt>".$this->manager->getLang('name')."</dt><dd>".$this->out($info['name'].' '.$info['compname'])."</dd>",6); if (!$this->plugin_info['date']) ptln("<dt>".$this->manager->getLang('date')."</dt><dd>".$this->out($info['date'])."</dd>",6); if (!$this->plugin_info['type']) ptln("<dt>".$this->manager->getLang('type')."</dt><dd>".$this->out($info['type'])."</dd>",6); if (!$this->plugin_info['desc']) ptln("<dt>".$this->manager->getLang('desc')."</dt><dd>".$this->out($info['desc'])."</dd>",6); @@ -111,11 +124,13 @@ class ap_info extends ap_manage { if ($dh = @opendir($path.$type.'/')) { while (false !== ($cp = readdir($dh))) { if ($cp == '.' || $cp == '..' || strtolower(substr($cp,-4)) != '.php') continue; + $components[] = array('name'=>$plugin.'_'.substr($cp, 0, -4), 'type'=>$type); } closedir($dh); } } + return $components; } |