Subversion Repositories oidplus

Rev

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

Rev 148 Rev 150
Line 51... Line 51...
51
                        $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? 'plugins/'.basename(dirname(__DIR__)).'/'.basename(__DIR__).'/icon_big.png' : '';
51
                        $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? 'plugins/'.basename(dirname(__DIR__)).'/'.basename(__DIR__).'/icon_big.png' : '';
52
 
52
 
53
                        if (count($plugins = OIDplus::getPagePlugins('public')) > 0) {
53
                        if (count($plugins = OIDplus::getPagePlugins('public')) > 0) {
54
                                $out['text'] .= '<p><u>Public page plugins:</u></p><ul>';
54
                                $out['text'] .= '<p><u>Public page plugins:</u></p><ul>';
55
                                foreach ($plugins as $plugin) {
55
                                foreach ($plugins as $plugin) {
56
                                        $out['text'] .= '<li>'.get_class($plugin).'</li>';
56
                                        $out['text'] .= '<li>'.htmlentities(get_class($plugin)).'</li>'; // TODO: human friendly names
57
                                }
57
                                }
58
                                $out['text'] .= '</ul>';
58
                                $out['text'] .= '</ul>';
59
                        }
59
                        }
60
 
60
 
61
                        if (count($plugins = OIDplus::getPagePlugins('ra')) > 0) {
61
                        if (count($plugins = OIDplus::getPagePlugins('ra')) > 0) {
62
                                $out['text'] .= '<p><u>RA page plugins:</u></p><ul>';
62
                                $out['text'] .= '<p><u>RA page plugins:</u></p><ul>';
63
                                foreach ($plugins as $plugin) {
63
                                foreach ($plugins as $plugin) {
64
                                        $out['text'] .= '<li>'.get_class($plugin).'</li>';
64
                                        $out['text'] .= '<li>'.htmlentities(get_class($plugin)).'</li>'; // TODO: human friendly names
65
                                }
65
                                }
66
                                $out['text'] .= '</ul>';
66
                                $out['text'] .= '</ul>';
67
                        }
67
                        }
68
 
68
 
69
                        if (count($plugins = OIDplus::getPagePlugins('admin')) > 0) {
69
                        if (count($plugins = OIDplus::getPagePlugins('admin')) > 0) {
70
                                $out['text'] .= '<p><u>Admin page plugins:</u></p><ul>';
70
                                $out['text'] .= '<p><u>Admin page plugins:</u></p><ul>';
71
                                foreach ($plugins as $plugin) {
71
                                foreach ($plugins as $plugin) {
72
                                        $out['text'] .= '<li>'.get_class($plugin).'</li>';
72
                                        $out['text'] .= '<li>'.htmlentities(get_class($plugin)).'</li>'; // TODO: human friendly names
73
                                }
73
                                }
74
                                $out['text'] .= '</ul>';
74
                                $out['text'] .= '</ul>';
75
                        }
75
                        }
76
 
76
 
77
                        if (count($plugins = OIDplus::getRegisteredObjectTypes()) > 0) {
77
                        $enabled = OIDplus::getRegisteredObjectTypes();
-
 
78
                        $disabled = OIDplus::getDisabledObjectTypes();
-
 
79
                        $plugins = array_merge($enabled, $disabled);
-
 
80
                        if (count($plugins) > 0) {
78
                                $out['text'] .= '<p><u>Enabled object types:</u></p><ul>';
81
                                $out['text'] .= '<p><u>Object types:</u></p><ul>';
79
                                foreach ($plugins as $ot) {
82
                                foreach ($plugins as $ot) {
-
 
83
                                        if (in_array($ot, $enabled)) {
80
                                        $out['text'] .= '<li>'.$ot::objectTypeTitle().' ('.$ot::ns().')</li>';
84
                                                $out['text'] .= '<li>'.htmlentities($ot::objectTypeTitle()).' ('.htmlentities($ot::ns()).')</li>';
-
 
85
                                        } else {
-
 
86
                                                $out['text'] .= '<li><font color="gray">'.htmlentities($ot::objectTypeTitle()).' ('.htmlentities($ot::ns()).', disabled)</font></li>';
-
 
87
                                        }
81
                                }
88
                                }
82
                                $out['text'] .= '</ul>';
89
                                $out['text'] .= '</ul>';
83
                        }
90
                        }
84
 
91
 
85
                        if (count($plugins = OIDplus::getDisabledObjectTypes()) > 0) {
92
                        if (count($plugins = OIDplus::getDatabasePlugins()) > 0) {
86
                                $out['text'] .= '<ul><u>Disabled object types:</u></ul>';
93
                                $out['text'] .= '<p><u>Database plugins:</u></p><ul>';
87
                                foreach ($plugins as $ot) {
94
                                foreach ($plugins as $plugin) {
-
 
95
                                        if ($plugin::name() == OIDPLUS_DATABASE_PLUGIN) {
-
 
96
                                                $out['text'] .= '<li><b>'.htmlentities($plugin::name()).'</b></li>';
-
 
97
                                        } else {
88
                                        $out['text'] .= '<li>'.$ot::objectTypeTitle().' ('.$ot::ns().')</li>';
98
                                                $out['text'] .= '<li>'.htmlentities($plugin::name()).'</li>';
-
 
99
                                        }
89
                                }
100
                                }
90
                                $out['text'] .= '</ul>';
101
                                $out['text'] .= '</ul>';
91
                        }
102
                        }
92
                }
103
                }
93
        }
104
        }