Rev 355 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 355 | Rev 360 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | 30 | ||
31 | $parts = explode('.',$tmp[0],2); |
31 | $parts = explode('.',$tmp[0],2); |
32 | if (!isset($parts[1])) $parts[1] = ''; |
32 | if (!isset($parts[1])) $parts[1] = ''; |
33 | if ($parts[0] != 'oidplus:system_plugins') return; |
33 | if ($parts[0] != 'oidplus:system_plugins') return; |
34 | $handled = true; |
34 | $handled = true; |
35 | $out['title'] = "Installed plugins"; |
35 | $out['title'] = _L('Installed plugins'); |
36 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
36 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
37 | 37 | ||
38 | if (!OIDplus::authUtils()::isAdminLoggedIn()) { |
38 | if (!OIDplus::authUtils()::isAdminLoggedIn()) { |
39 | $out['icon'] = 'img/error_big.png'; |
39 | $out['icon'] = 'img/error_big.png'; |
40 | $out['text'] = '<p>You need to <a '.OIDplus::gui()->link('oidplus:login').'>log in</a> as administrator.</p>'; |
40 | $out['text'] = '<p>'._L('You need to <a %1>log in</a> as administrator.',OIDplus::gui()->link('oidplus:login')).'</p>'; |
41 | return; |
41 | return; |
42 | } |
42 | } |
43 | 43 | ||
44 | if (!is_null($classname)) { |
44 | if (!is_null($classname)) { |
45 | $out['title'] = htmlentities($classname); |
45 | $out['title'] = htmlentities($classname); |
46 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
46 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
47 | 47 | ||
48 | $reflector = new \ReflectionClass($classname); |
48 | $reflector = new \ReflectionClass($classname); |
49 | $pluginManifest = OIDplus::getPluginManifest($classname); |
49 | $pluginManifest = OIDplus::getPluginManifest($classname); |
50 | 50 | ||
51 | $out['text'] .= '<div><label class="padding_label">Classname</label><b>'.htmlentities($classname).'</b></div>'. |
51 | $out['text'] .= '<div><label class="padding_label">'._L('Class name').'</label><b>'.htmlentities($classname).'</b></div>'. |
52 | '<div><label class="padding_label">Location</label><b>'.htmlentities(dirname($reflector->getFileName())).'</b></div>'. |
52 | '<div><label class="padding_label">'._L('Location').'</label><b>'.htmlentities(dirname($reflector->getFileName())).'</b></div>'. |
53 | '<div><label class="padding_label">Plugin type</label><b>'.htmlentities(get_parent_class($classname)).'</b></div>'. |
53 | '<div><label class="padding_label">'._L('Plugin type').'</label><b>'.htmlentities(get_parent_class($classname)).'</b></div>'. |
54 | '<div><label class="padding_label">Plugin name</label><b>'.htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()).'</b></div>'. |
54 | '<div><label class="padding_label">'._L('Plugin name').'</label><b>'.htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()).'</b></div>'. |
55 | '<div><label class="padding_label">Plugin author</label><b>'.htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()).'</b></div>'. |
55 | '<div><label class="padding_label">'._L('Plugin author').'</label><b>'.htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()).'</b></div>'. |
56 | '<div><label class="padding_label">Plugin version</label><b>'.htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()).'</b></div>'. |
56 | '<div><label class="padding_label">'._L('Plugin version').'</label><b>'.htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()).'</b></div>'. |
57 | '<div><label class="padding_label">Plugin OID</label><b>'.htmlentities(empty($pluginManifest->getOid()) ? 'n/a' : $pluginManifest->getOid()).'</b></div>'. |
57 | '<div><label class="padding_label">'._L('Plugin OID').'</label><b>'.htmlentities(empty($pluginManifest->getOid()) ? _L('n/a') : $pluginManifest->getOid()).'</b></div>'. |
58 | (!empty(trim($pluginManifest->getHtmlDescription())) ? '<br><p><b>Additional information:</b></p>' : ''). |
58 | (!empty(trim($pluginManifest->getHtmlDescription())) ? '<br><p><b>'._L('Additional information').':</b></p>' : ''). |
59 | $pluginManifest->getHtmlDescription(); |
59 | $pluginManifest->getHtmlDescription(); |
60 | } else { |
60 | } else { |
61 | $show_pages_public = false; |
61 | $show_pages_public = false; |
62 | $show_pages_ra = false; |
62 | $show_pages_ra = false; |
63 | $show_pages_admin = false; |
63 | $show_pages_admin = false; |
Line 70... | Line 70... | ||
70 | $show_auth = false; |
70 | $show_auth = false; |
71 | $show_logger = false; |
71 | $show_logger = false; |
72 | $show_language = false; |
72 | $show_language = false; |
73 | 73 | ||
74 | if ($parts[1] == '') { |
74 | if ($parts[1] == '') { |
75 | $out['title'] = "Installed plugins"; |
75 | $out['title'] = _L('Installed plugins'); |
76 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
76 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
77 | $show_pages_public = true; |
77 | $show_pages_public = true; |
78 | $show_pages_ra = true; |
78 | $show_pages_ra = true; |
79 | $show_pages_admin = true; |
79 | $show_pages_admin = true; |
80 | $show_db_active = true; |
80 | $show_db_active = true; |
Line 85... | Line 85... | ||
85 | $show_obj_inactive = true; |
85 | $show_obj_inactive = true; |
86 | $show_auth = true; |
86 | $show_auth = true; |
87 | $show_logger = true; |
87 | $show_logger = true; |
88 | $show_language = true; |
88 | $show_language = true; |
89 | } else if ($parts[1] == 'pages') { |
89 | } else if ($parts[1] == 'pages') { |
90 | $out['title'] = "Page plugins"; |
90 | $out['title'] = _L('Page plugins'); |
91 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
91 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
92 | $show_pages_public = true; |
92 | $show_pages_public = true; |
93 | $show_pages_ra = true; |
93 | $show_pages_ra = true; |
94 | $show_pages_admin = true; |
94 | $show_pages_admin = true; |
95 | } else if ($parts[1] == 'pages.public') { |
95 | } else if ($parts[1] == 'pages.public') { |
96 | $out['title'] = "Public page plugins"; |
96 | $out['title'] = _L('Public page plugins'); |
97 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
97 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
98 | $show_pages_public = true; |
98 | $show_pages_public = true; |
99 | } else if ($parts[1] == 'pages.ra') { |
99 | } else if ($parts[1] == 'pages.ra') { |
100 | $out['title'] = "RA page plugins"; |
100 | $out['title'] = _L('RA page plugins'); |
101 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
101 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
102 | $show_pages_ra = true; |
102 | $show_pages_ra = true; |
103 | } else if ($parts[1] == 'pages.admin') { |
103 | } else if ($parts[1] == 'pages.admin') { |
104 | $out['title'] = "Admin page plugins"; |
104 | $out['title'] = _L('Admin page plugins'); |
105 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
105 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
106 | $show_pages_admin = true; |
106 | $show_pages_admin = true; |
107 | } else if ($parts[1] == 'objects') { |
107 | } else if ($parts[1] == 'objects') { |
108 | $out['title'] = "Object type plugins"; |
108 | $out['title'] = _L('Object type plugins'); |
109 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
109 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
110 | $show_obj_active = true; |
110 | $show_obj_active = true; |
111 | $show_obj_inactive = true; |
111 | $show_obj_inactive = true; |
112 | } else if ($parts[1] == 'objects.enabled') { |
112 | } else if ($parts[1] == 'objects.enabled') { |
113 | $out['title'] = "Object type plugins (enabled)"; |
113 | $out['title'] = _L('Object type plugins (enabled)'); |
114 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
114 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
115 | $show_obj_active = true; |
115 | $show_obj_active = true; |
116 | } else if ($parts[1] == 'objects.disabled') { |
116 | } else if ($parts[1] == 'objects.disabled') { |
117 | $out['title'] = "Object type plugins (disabled)"; |
117 | $out['title'] = _L('Object type plugins (disabled)'); |
118 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
118 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
119 | $show_obj_inactive = true; |
119 | $show_obj_inactive = true; |
120 | } else if ($parts[1] == 'database') { |
120 | } else if ($parts[1] == 'database') { |
121 | $out['title'] = "Database provider plugins"; |
121 | $out['title'] = _L('Database provider plugins'); |
122 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
122 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
123 | $show_db_active = true; |
123 | $show_db_active = true; |
124 | $show_db_inactive = true; |
124 | $show_db_inactive = true; |
125 | } else if ($parts[1] == 'database.enabled') { |
125 | } else if ($parts[1] == 'database.enabled') { |
126 | $out['title'] = "Database provider plugins (active)"; |
126 | $out['title'] = _L('Database provider plugins (active)'); |
127 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
127 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
128 | $show_db_active = true; |
128 | $show_db_active = true; |
129 | } else if ($parts[1] == 'database.disabled') { |
129 | } else if ($parts[1] == 'database.disabled') { |
130 | $out['title'] = "Database provider plugins (inactive)"; |
130 | $out['title'] = _L('Database provider plugins (inactive)'); |
131 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
131 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
132 | $show_db_inactive = true; |
132 | $show_db_inactive = true; |
133 | } else if ($parts[1] == 'sql') { |
133 | } else if ($parts[1] == 'sql') { |
134 | $out['title'] = "SQL slang plugins"; |
134 | $out['title'] = _L('SQL slang plugins'); |
135 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
135 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
136 | $show_sql_active = true; |
136 | $show_sql_active = true; |
137 | $show_sql_inactive = true; |
137 | $show_sql_inactive = true; |
138 | } else if ($parts[1] == 'sql.enabled') { |
138 | } else if ($parts[1] == 'sql.enabled') { |
139 | $out['title'] = "SQL slang plugins (active)"; |
139 | $out['title'] = _L('SQL slang plugins (active)'); |
140 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
140 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
141 | $show_sql_active = true; |
141 | $show_sql_active = true; |
142 | } else if ($parts[1] == 'sql.disabled') { |
142 | } else if ($parts[1] == 'sql.disabled') { |
143 | $out['title'] = "SQL slang plugins (inactive)"; |
143 | $out['title'] = _L('SQL slang plugins (inactive)'); |
144 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
144 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
145 | $show_sql_inactive = true; |
145 | $show_sql_inactive = true; |
146 | } else if ($parts[1] == 'auth') { |
146 | } else if ($parts[1] == 'auth') { |
147 | $out['title'] = "RA authentication"; |
147 | $out['title'] = _L('RA authentication'); |
148 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
148 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
149 | $show_auth = true; |
149 | $show_auth = true; |
150 | } else if ($parts[1] == 'logger') { |
150 | } else if ($parts[1] == 'logger') { |
151 | $out['title'] = "Logger"; |
151 | $out['title'] = _L('Logger'); |
152 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
152 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
153 | $show_logger = true; |
153 | $show_logger = true; |
154 | } else if ($parts[1] == 'language') { |
154 | } else if ($parts[1] == 'language') { |
155 | $out['title'] = "Languages"; |
155 | $out['title'] = _L('Languages'); |
156 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
156 | $out['icon'] = file_exists(__DIR__.'/icon_big.png') ? OIDplus::webpath(__DIR__).'icon_big.png' : ''; |
157 | $show_language = true; |
157 | $show_language = true; |
158 | } else { |
158 | } else { |
159 | $out['icon'] = 'img/error_big.png'; |
159 | $out['icon'] = 'img/error_big.png'; |
160 | $out['text'] = '<p>Invalid arguments.</p>'; |
160 | $out['text'] = '<p>'._L('Invalid arguments').'</p>'; |
161 | return; |
161 | return; |
162 | } |
162 | } |
163 | 163 | ||
164 | $pp_public = array(); |
164 | $pp_public = array(); |
165 | $pp_ra = array(); |
165 | $pp_ra = array(); |
Line 177... | Line 177... | ||
177 | } |
177 | } |
178 | } |
178 | } |
179 | 179 | ||
180 | if ($show_pages_public) { |
180 | if ($show_pages_public) { |
181 | if (count($plugins = $pp_public) > 0) { |
181 | if (count($plugins = $pp_public) > 0) { |
182 | $out['text'] .= '<h2>Public page plugins</h2>'; |
182 | $out['text'] .= '<h2>'._L('Public page plugins').'</h2>'; |
183 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
183 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
184 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
184 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
185 | $out['text'] .= ' <tr>'; |
185 | $out['text'] .= ' <tr>'; |
186 | $out['text'] .= ' <th width="25%">Class name</th>'; |
186 | $out['text'] .= ' <th width="25%">'._L('Class name').'</th>'; |
187 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
187 | $out['text'] .= ' <th width="25%">'._L('Plugin name').'</th>'; |
188 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
188 | $out['text'] .= ' <th width="25%">'._L('Plugin version').'</th>'; |
189 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
189 | $out['text'] .= ' <th width="25%">'._L('Plugin author').'</th>'; |
190 | $out['text'] .= ' </tr>'; |
190 | $out['text'] .= ' </tr>'; |
191 | foreach ($plugins as $plugin) { |
191 | foreach ($plugins as $plugin) { |
192 | $out['text'] .= ' <tr>'; |
192 | $out['text'] .= ' <tr>'; |
193 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
193 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
194 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
194 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
195 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()) . '</td>'; |
195 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()) . '</td>'; |
196 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()) . '</td>'; |
196 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()) . '</td>'; |
197 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()) . '</td>'; |
197 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()) . '</td>'; |
198 | $out['text'] .= ' </tr>'; |
198 | $out['text'] .= ' </tr>'; |
199 | } |
199 | } |
200 | $out['text'] .= '</table>'; |
200 | $out['text'] .= '</table>'; |
201 | $out['text'] .= '</div></div>'; |
201 | $out['text'] .= '</div></div>'; |
202 | } |
202 | } |
203 | } |
203 | } |
204 | 204 | ||
205 | if ($show_pages_ra) { |
205 | if ($show_pages_ra) { |
206 | if (count($plugins = $pp_ra) > 0) { |
206 | if (count($plugins = $pp_ra) > 0) { |
207 | $out['text'] .= '<h2>RA page plugins</h2>'; |
207 | $out['text'] .= '<h2>'._L('RA page plugins').'</h2>'; |
208 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
208 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
209 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
209 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
210 | $out['text'] .= ' <tr>'; |
210 | $out['text'] .= ' <tr>'; |
211 | $out['text'] .= ' <th width="25%">Class name</th>'; |
211 | $out['text'] .= ' <th width="25%">'._L('Class name').'</th>'; |
212 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
212 | $out['text'] .= ' <th width="25%">'._L('Plugin name').'</th>'; |
213 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
213 | $out['text'] .= ' <th width="25%">'._L('Plugin version').'</th>'; |
214 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
214 | $out['text'] .= ' <th width="25%">'._L('Plugin author').'</th>'; |
215 | $out['text'] .= ' </tr>'; |
215 | $out['text'] .= ' </tr>'; |
216 | foreach ($plugins as $plugin) { |
216 | foreach ($plugins as $plugin) { |
217 | $out['text'] .= ' <tr>'; |
217 | $out['text'] .= ' <tr>'; |
218 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
218 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
219 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
219 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
220 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()) . '</td>'; |
220 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()) . '</td>'; |
221 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()) . '</td>'; |
221 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()) . '</td>'; |
222 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()) . '</td>'; |
222 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()) . '</td>'; |
223 | $out['text'] .= ' </tr>'; |
223 | $out['text'] .= ' </tr>'; |
224 | } |
224 | } |
225 | $out['text'] .= '</table>'; |
225 | $out['text'] .= '</table>'; |
226 | $out['text'] .= '</div></div>'; |
226 | $out['text'] .= '</div></div>'; |
227 | } |
227 | } |
228 | } |
228 | } |
229 | 229 | ||
230 | if ($show_pages_admin) { |
230 | if ($show_pages_admin) { |
231 | if (count($plugins = $pp_admin) > 0) { |
231 | if (count($plugins = $pp_admin) > 0) { |
232 | $out['text'] .= '<h2>Admin page plugins</h2>'; |
232 | $out['text'] .= '<h2>'._L('Admin page plugins').'</h2>'; |
233 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
233 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
234 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
234 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
235 | $out['text'] .= ' <tr>'; |
235 | $out['text'] .= ' <tr>'; |
236 | $out['text'] .= ' <th width="25%">Class name</th>'; |
236 | $out['text'] .= ' <th width="25%">'._L('Class name').'</th>'; |
237 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
237 | $out['text'] .= ' <th width="25%">'._L('Plugin name').'</th>'; |
238 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
238 | $out['text'] .= ' <th width="25%">'._L('Plugin version').'</th>'; |
239 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
239 | $out['text'] .= ' <th width="25%">'._L('Plugin author').'</th>'; |
240 | $out['text'] .= ' </tr>'; |
240 | $out['text'] .= ' </tr>'; |
241 | foreach ($plugins as $plugin) { |
241 | foreach ($plugins as $plugin) { |
242 | $out['text'] .= ' <tr>'; |
242 | $out['text'] .= ' <tr>'; |
243 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
243 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
244 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
244 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
245 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()) . '</td>'; |
245 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()) . '</td>'; |
246 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()) . '</td>'; |
246 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()) . '</td>'; |
247 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()) . '</td>'; |
247 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()) . '</td>'; |
248 | $out['text'] .= ' </tr>'; |
248 | $out['text'] .= ' </tr>'; |
249 | } |
249 | } |
250 | $out['text'] .= '</table>'; |
250 | $out['text'] .= '</table>'; |
251 | $out['text'] .= '</div></div>'; |
251 | $out['text'] .= '</div></div>'; |
252 | } |
252 | } |
Line 254... | Line 254... | ||
254 | 254 | ||
255 | if ($show_obj_active || $show_obj_inactive) { |
255 | if ($show_obj_active || $show_obj_inactive) { |
256 | $enabled = $show_obj_active ? OIDplus::getObjectTypePluginsEnabled() : array(); |
256 | $enabled = $show_obj_active ? OIDplus::getObjectTypePluginsEnabled() : array(); |
257 | $disabled = $show_obj_inactive ? OIDplus::getObjectTypePluginsDisabled() : array(); |
257 | $disabled = $show_obj_inactive ? OIDplus::getObjectTypePluginsDisabled() : array(); |
258 | if (count($plugins = array_merge($enabled, $disabled)) > 0) { |
258 | if (count($plugins = array_merge($enabled, $disabled)) > 0) { |
259 | $out['text'] .= '<h2>Object types</h2>'; |
259 | $out['text'] .= '<h2>'._L('Object types').'</h2>'; |
260 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
260 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
261 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
261 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
262 | $out['text'] .= ' <tr>'; |
262 | $out['text'] .= ' <tr>'; |
263 | $out['text'] .= ' <th width="25%">Class name</th>'; |
263 | $out['text'] .= ' <th width="25%">'._L('Class name').'</th>'; |
264 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
264 | $out['text'] .= ' <th width="25%">'._L('Plugin name').'</th>'; |
265 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
265 | $out['text'] .= ' <th width="25%">'._L('Plugin version').'</th>'; |
266 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
266 | $out['text'] .= ' <th width="25%">'._L('Plugin author').'</th>'; |
267 | $out['text'] .= ' </tr>'; |
267 | $out['text'] .= ' </tr>'; |
268 | foreach ($plugins as $plugin) { |
268 | foreach ($plugins as $plugin) { |
269 | $out['text'] .= ' <tr>'; |
269 | $out['text'] .= ' <tr>'; |
270 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
270 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
271 | if (in_array($plugin, $enabled)) { |
271 | if (in_array($plugin, $enabled)) { |
272 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
272 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
273 | } else { |
273 | } else { |
274 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'><font color="gray">'.htmlentities(get_class($plugin)).' (disabled)</font></a></td>'; |
274 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'><font color="gray">'.htmlentities(get_class($plugin)).' '._L('(disabled)').'</font></a></td>'; |
275 | } |
275 | } |
276 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()) . '</td>'; |
276 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()) . '</td>'; |
277 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()) . '</td>'; |
277 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()) . '</td>'; |
278 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()) . '</td>'; |
278 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()) . '</td>'; |
279 | $out['text'] .= ' </tr>'; |
279 | $out['text'] .= ' </tr>'; |
280 | } |
280 | } |
281 | $out['text'] .= '</table>'; |
281 | $out['text'] .= '</table>'; |
282 | $out['text'] .= '</div></div>'; |
282 | $out['text'] .= '</div></div>'; |
283 | } |
283 | } |
284 | } |
284 | } |
285 | 285 | ||
286 | if ($show_db_active || $show_db_inactive) { |
286 | if ($show_db_active || $show_db_inactive) { |
287 | if (count($plugins = OIDplus::getDatabasePlugins()) > 0) { |
287 | if (count($plugins = OIDplus::getDatabasePlugins()) > 0) { |
288 | $out['text'] .= '<h2>Database providers</h2>'; |
288 | $out['text'] .= '<h2>'._L('Database providers').'</h2>'; |
289 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
289 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
290 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
290 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
291 | $out['text'] .= ' <tr>'; |
291 | $out['text'] .= ' <tr>'; |
292 | $out['text'] .= ' <th width="25%">Class name</th>'; |
292 | $out['text'] .= ' <th width="25%">'._L('Class name').'</th>'; |
293 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
293 | $out['text'] .= ' <th width="25%">'._L('Plugin name').'</th>'; |
294 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
294 | $out['text'] .= ' <th width="25%">'._L('Plugin version').'</th>'; |
295 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
295 | $out['text'] .= ' <th width="25%">'._L('Plugin author').'</th>'; |
296 | $out['text'] .= ' </tr>'; |
296 | $out['text'] .= ' </tr>'; |
297 | foreach ($plugins as $plugin) { |
297 | foreach ($plugins as $plugin) { |
298 | $active = $plugin::id() == OIDplus::baseConfig()->getValue('DATABASE_PLUGIN'); |
298 | $active = $plugin::id() == OIDplus::baseConfig()->getValue('DATABASE_PLUGIN'); |
299 | if ($active && !$show_db_active) continue; |
299 | if ($active && !$show_db_active) continue; |
300 | if (!$active && !$show_db_inactive) continue; |
300 | if (!$active && !$show_db_inactive) continue; |
301 | 301 | ||
302 | $out['text'] .= ' <tr>'; |
302 | $out['text'] .= ' <tr>'; |
303 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
303 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
304 | if ($active) { |
304 | if ($active) { |
305 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'><b>'.htmlentities(get_class($plugin)).'</b> (active)</a></td>'; |
305 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'><b>'.htmlentities(get_class($plugin)).'</b> '._L('(active)').'</a></td>'; |
306 | } else { |
306 | } else { |
307 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
307 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
308 | } |
308 | } |
309 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()) . '</td>'; |
309 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()) . '</td>'; |
310 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()) . '</td>'; |
310 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()) . '</td>'; |
311 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()) . '</td>'; |
311 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()) . '</td>'; |
312 | $out['text'] .= ' </tr>'; |
312 | $out['text'] .= ' </tr>'; |
313 | } |
313 | } |
314 | $out['text'] .= '</table>'; |
314 | $out['text'] .= '</table>'; |
315 | $out['text'] .= '</div></div>'; |
315 | $out['text'] .= '</div></div>'; |
316 | } |
316 | } |
317 | } |
317 | } |
318 | 318 | ||
319 | if ($show_sql_active || $show_sql_inactive) { |
319 | if ($show_sql_active || $show_sql_inactive) { |
320 | if (count($plugins = OIDplus::getSqlSlangPlugins()) > 0) { |
320 | if (count($plugins = OIDplus::getSqlSlangPlugins()) > 0) { |
321 | $out['text'] .= '<h2>SQL slang plugins</h2>'; |
321 | $out['text'] .= '<h2>'._L('SQL slang plugins').'</h2>'; |
322 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
322 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
323 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
323 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
324 | $out['text'] .= ' <tr>'; |
324 | $out['text'] .= ' <tr>'; |
325 | $out['text'] .= ' <th width="25%">Class name</th>'; |
325 | $out['text'] .= ' <th width="25%">'._L('Class name').'</th>'; |
326 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
326 | $out['text'] .= ' <th width="25%">'._L('Plugin name').'</th>'; |
327 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
327 | $out['text'] .= ' <th width="25%">'._L('Plugin version').'</th>'; |
328 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
328 | $out['text'] .= ' <th width="25%">'._L('Plugin author').'</th>'; |
329 | $out['text'] .= ' </tr>'; |
329 | $out['text'] .= ' </tr>'; |
330 | foreach ($plugins as $plugin) { |
330 | foreach ($plugins as $plugin) { |
331 | $active = $plugin::id() == OIDplus::db()->getSlang()::id(); |
331 | $active = $plugin::id() == OIDplus::db()->getSlang()::id(); |
332 | if ($active && !$show_sql_active) continue; |
332 | if ($active && !$show_sql_active) continue; |
333 | if (!$active && !$show_sql_inactive) continue; |
333 | if (!$active && !$show_sql_inactive) continue; |
334 | 334 | ||
335 | $out['text'] .= ' <tr>'; |
335 | $out['text'] .= ' <tr>'; |
336 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
336 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
337 | if ($active) { |
337 | if ($active) { |
338 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'><b>'.htmlentities(get_class($plugin)).'</b> (active)</a></td>'; |
338 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'><b>'.htmlentities(get_class($plugin)).'</b> '._L('(active)').'</a></td>'; |
339 | } else { |
339 | } else { |
340 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
340 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
341 | } |
341 | } |
342 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()) . '</td>'; |
342 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()) . '</td>'; |
343 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()) . '</td>'; |
343 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()) . '</td>'; |
344 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()) . '</td>'; |
344 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()) . '</td>'; |
345 | $out['text'] .= ' </tr>'; |
345 | $out['text'] .= ' </tr>'; |
346 | } |
346 | } |
347 | $out['text'] .= '</table>'; |
347 | $out['text'] .= '</table>'; |
348 | $out['text'] .= '</div></div>'; |
348 | $out['text'] .= '</div></div>'; |
349 | } |
349 | } |
350 | } |
350 | } |
351 | 351 | ||
352 | if ($show_auth) { |
352 | if ($show_auth) { |
353 | if (count($plugins = OIDplus::getAuthPlugins()) > 0) { |
353 | if (count($plugins = OIDplus::getAuthPlugins()) > 0) { |
354 | $out['text'] .= '<h2>RA authentication providers</h2>'; |
354 | $out['text'] .= '<h2>'._L('RA authentication providers').'</h2>'; |
355 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
355 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
356 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
356 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
357 | $out['text'] .= ' <tr>'; |
357 | $out['text'] .= ' <tr>'; |
358 | $out['text'] .= ' <th width="25%">Class name</th>'; |
358 | $out['text'] .= ' <th width="25%">'._L('Class name').'</th>'; |
359 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
359 | $out['text'] .= ' <th width="25%">'._L('Plugin name').'</th>'; |
360 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
360 | $out['text'] .= ' <th width="25%">'._L('Plugin version').'</th>'; |
361 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
361 | $out['text'] .= ' <th width="25%">'._L('Plugin author').'</th>'; |
362 | $out['text'] .= ' </tr>'; |
362 | $out['text'] .= ' </tr>'; |
363 | foreach ($plugins as $plugin) { |
363 | foreach ($plugins as $plugin) { |
364 | $out['text'] .= ' <tr>'; |
364 | $out['text'] .= ' <tr>'; |
365 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
365 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
366 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
366 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
367 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()) . '</td>'; |
367 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()) . '</td>'; |
368 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()) . '</td>'; |
368 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()) . '</td>'; |
369 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()) . '</td>'; |
369 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()) . '</td>'; |
370 | $out['text'] .= ' </tr>'; |
370 | $out['text'] .= ' </tr>'; |
371 | } |
371 | } |
372 | $out['text'] .= '</table>'; |
372 | $out['text'] .= '</table>'; |
373 | $out['text'] .= '</div></div>'; |
373 | $out['text'] .= '</div></div>'; |
374 | } |
374 | } |
375 | } |
375 | } |
376 | 376 | ||
377 | if ($show_logger) { |
377 | if ($show_logger) { |
378 | if (count($plugins = OIDplus::getLoggerPlugins()) > 0) { |
378 | if (count($plugins = OIDplus::getLoggerPlugins()) > 0) { |
379 | $out['text'] .= '<h2>Logger plugins</h2>'; |
379 | $out['text'] .= '<h2>'._L('Logger plugins').'</h2>'; |
380 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
380 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
381 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
381 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
382 | $out['text'] .= ' <tr>'; |
382 | $out['text'] .= ' <tr>'; |
383 | $out['text'] .= ' <th width="25%">Class name</th>'; |
383 | $out['text'] .= ' <th width="25%">'._L('Class name').'</th>'; |
384 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
384 | $out['text'] .= ' <th width="25%">'._L('Plugin name').'</th>'; |
385 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
385 | $out['text'] .= ' <th width="25%">'._L('Plugin version').'</th>'; |
386 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
386 | $out['text'] .= ' <th width="25%">'._L('Plugin author').'</th>'; |
387 | $out['text'] .= ' </tr>'; |
387 | $out['text'] .= ' </tr>'; |
388 | foreach ($plugins as $plugin) { |
388 | foreach ($plugins as $plugin) { |
389 | $reason = ''; |
389 | $reason = ''; |
390 | $active = $plugin->available($reason); |
390 | $active = $plugin->available($reason); |
391 | 391 | ||
392 | $out['text'] .= ' <tr>'; |
392 | $out['text'] .= ' <tr>'; |
393 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
393 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
394 | if ($active) { |
394 | if ($active) { |
395 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
395 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
396 | } else { |
396 | } else { |
397 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'><font color="gray">'.htmlentities(get_class($plugin)).'</font></a> <font color="gray">(not available: '.htmlentities($reason).')</font></td>'; |
397 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'><font color="gray">'.htmlentities(get_class($plugin)).'</font></a> <font color="gray">('._L('not available: %1',htmlentities($reason)).')</font></td>'; |
398 | } |
398 | } |
399 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()) . '</td>'; |
399 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()) . '</td>'; |
400 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()) . '</td>'; |
400 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()) . '</td>'; |
401 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()) . '</td>'; |
401 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()) . '</td>'; |
402 | $out['text'] .= ' </tr>'; |
402 | $out['text'] .= ' </tr>'; |
403 | } |
403 | } |
404 | $out['text'] .= '</table>'; |
404 | $out['text'] .= '</table>'; |
405 | $out['text'] .= '</div></div>'; |
405 | $out['text'] .= '</div></div>'; |
406 | } |
406 | } |
407 | } |
407 | } |
408 | 408 | ||
409 | if ($show_language) { |
409 | if ($show_language) { |
410 | if (count($plugins = OIDplus::getLanguagePlugins()) > 0) { |
410 | if (count($plugins = OIDplus::getLanguagePlugins()) > 0) { |
411 | $out['text'] .= '<h2>Languages</h2>'; |
411 | $out['text'] .= '<h2>'._L('Languages').'</h2>'; |
412 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
412 | $out['text'] .= '<div class="container box"><div id="suboid_table" class="table-responsive">'; |
413 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
413 | $out['text'] .= '<table class="table table-bordered table-striped">'; |
414 | $out['text'] .= ' <tr>'; |
414 | $out['text'] .= ' <tr>'; |
415 | $out['text'] .= ' <th width="25%">Class name</th>'; |
415 | $out['text'] .= ' <th width="25%">'._L('Class name').'</th>'; |
416 | $out['text'] .= ' <th width="25%">Plugin name</th>'; |
416 | $out['text'] .= ' <th width="25%">'._L('Plugin name').'</th>'; |
417 | $out['text'] .= ' <th width="25%">Plugin version</th>'; |
417 | $out['text'] .= ' <th width="25%">'._L('Plugin version').'</th>'; |
418 | $out['text'] .= ' <th width="25%">Plugin author</th>'; |
418 | $out['text'] .= ' <th width="25%">'._L('Plugin author').'</th>'; |
419 | $out['text'] .= ' </tr>'; |
419 | $out['text'] .= ' </tr>'; |
420 | foreach ($plugins as $plugin) { |
420 | foreach ($plugins as $plugin) { |
421 | $out['text'] .= ' <tr>'; |
421 | $out['text'] .= ' <tr>'; |
422 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
422 | $pluginManifest = OIDplus::getPluginManifest($plugin); |
423 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
423 | $out['text'] .= '<td><a '.OIDplus::gui()->link('oidplus:system_plugins$'.get_class($plugin)).'>'.htmlentities(get_class($plugin)).'</a></td>'; |
424 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? 'n/a' : $pluginManifest->getName()) . '</td>'; |
424 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getName()) ? _L('n/a') : $pluginManifest->getName()) . '</td>'; |
425 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? 'n/a' : $pluginManifest->getVersion()) . '</td>'; |
425 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getVersion()) ? _L('n/a') : $pluginManifest->getVersion()) . '</td>'; |
426 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? 'n/a' : $pluginManifest->getAuthor()) . '</td>'; |
426 | $out['text'] .= '<td>' . htmlentities(empty($pluginManifest->getAuthor()) ? _L('n/a') : $pluginManifest->getAuthor()) . '</td>'; |
427 | $out['text'] .= ' </tr>'; |
427 | $out['text'] .= ' </tr>'; |
428 | } |
428 | } |
429 | $out['text'] .= '</table>'; |
429 | $out['text'] .= '</table>'; |
430 | $out['text'] .= '</div></div>'; |
430 | $out['text'] .= '</div></div>'; |
431 | } |
431 | } |
Line 601... | Line 601... | ||
601 | ); |
601 | ); |
602 | } |
602 | } |
603 | $json[] = array( |
603 | $json[] = array( |
604 | 'id' => 'oidplus:system_plugins', |
604 | 'id' => 'oidplus:system_plugins', |
605 | 'icon' => $tree_icon, |
605 | 'icon' => $tree_icon, |
606 | 'text' => 'Plugins', |
606 | 'text' => _L('Plugins'), |
607 | 'children' => array( |
607 | 'children' => array( |
608 | array( |
608 | array( |
609 | 'id' => 'oidplus:system_plugins.pages', |
609 | 'id' => 'oidplus:system_plugins.pages', |
610 | 'icon' => $tree_icon, |
610 | 'icon' => $tree_icon, |
611 | 'text' => 'Page plugins', |
611 | 'text' => _L('Page plugins'), |
612 | 'children' => array( |
612 | 'children' => array( |
613 | array( |
613 | array( |
614 | 'id' => 'oidplus:system_plugins.pages.public', |
614 | 'id' => 'oidplus:system_plugins.pages.public', |
615 | 'icon' => $tree_icon, |
615 | 'icon' => $tree_icon, |
616 | 'text' => 'Public', |
616 | 'text' => _L('Public'), |
617 | 'children' => $public_plugins |
617 | 'children' => $public_plugins |
618 | ), |
618 | ), |
619 | array( |
619 | array( |
620 | 'id' => 'oidplus:system_plugins.pages.ra', |
620 | 'id' => 'oidplus:system_plugins.pages.ra', |
621 | 'icon' => $tree_icon, |
621 | 'icon' => $tree_icon, |
622 | 'text' => 'RA', |
622 | 'text' => _L('RA'), |
623 | 'children' => $ra_plugins |
623 | 'children' => $ra_plugins |
624 | ), |
624 | ), |
625 | array( |
625 | array( |
626 | 'id' => 'oidplus:system_plugins.pages.admin', |
626 | 'id' => 'oidplus:system_plugins.pages.admin', |
627 | 'icon' => $tree_icon, |
627 | 'icon' => $tree_icon, |
628 | 'text' => 'Admin', |
628 | 'text' => _L('Admin'), |
629 | 'children' => $admin_plugins |
629 | 'children' => $admin_plugins |
630 | ) |
630 | ) |
631 | ) |
631 | ) |
632 | ), |
632 | ), |
633 | array( |
633 | array( |
634 | 'id' => 'oidplus:system_plugins.objects', |
634 | 'id' => 'oidplus:system_plugins.objects', |
635 | 'icon' => $tree_icon, |
635 | 'icon' => $tree_icon, |
636 | 'text' => 'Object types', |
636 | 'text' => _L('Object types'), |
637 | 'children' => $obj_plugins |
637 | 'children' => $obj_plugins |
638 | ), |
638 | ), |
639 | array( |
639 | array( |
640 | 'id' => 'oidplus:system_plugins.database', |
640 | 'id' => 'oidplus:system_plugins.database', |
641 | 'icon' => $tree_icon, |
641 | 'icon' => $tree_icon, |
642 | 'text' => 'Database providers', |
642 | 'text' => _L('Database providers'), |
643 | 'children' => $db_plugins |
643 | 'children' => $db_plugins |
644 | ), |
644 | ), |
645 | array( |
645 | array( |
646 | 'id' => 'oidplus:system_plugins.sql', |
646 | 'id' => 'oidplus:system_plugins.sql', |
647 | 'icon' => $tree_icon, |
647 | 'icon' => $tree_icon, |
648 | 'text' => 'SQL slangs', |
648 | 'text' => _L('SQL slangs'), |
649 | 'children' => $sql_plugins |
649 | 'children' => $sql_plugins |
650 | ), |
650 | ), |
651 | array( |
651 | array( |
652 | 'id' => 'oidplus:system_plugins.auth', |
652 | 'id' => 'oidplus:system_plugins.auth', |
653 | 'icon' => $tree_icon, |
653 | 'icon' => $tree_icon, |
654 | 'text' => 'RA authentication', |
654 | 'text' => _L('RA authentication'), |
655 | 'children' => $auth_plugins |
655 | 'children' => $auth_plugins |
656 | ), |
656 | ), |
657 | array( |
657 | array( |
658 | 'id' => 'oidplus:system_plugins.logger', |
658 | 'id' => 'oidplus:system_plugins.logger', |
659 | 'icon' => $tree_icon, |
659 | 'icon' => $tree_icon, |
660 | 'text' => 'Logger', |
660 | 'text' => _L('Logger'), |
661 | 'children' => $logger_plugins |
661 | 'children' => $logger_plugins |
662 | ), |
662 | ), |
663 | array( |
663 | array( |
664 | 'id' => 'oidplus:system_plugins.language', |
664 | 'id' => 'oidplus:system_plugins.language', |
665 | 'icon' => $tree_icon, |
665 | 'icon' => $tree_icon, |
666 | 'text' => 'Languages', |
666 | 'text' => _L('Languages'), |
667 | 'children' => $language_plugins |
667 | 'children' => $language_plugins |
668 | ) |
668 | ) |
669 | ) |
669 | ) |
670 | ); |
670 | ); |
671 | 671 |