Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18069
Modified Files:
Tag: branch_0_6
serendipity_admin_plugins.inc.php
Log Message:
Report errors on "invalid" plugins
Index: serendipity_admin_plugins.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_plugins.inc.php,v
retrieving revision 1.20
retrieving revision 1.20.4.1
diff -u -d -r1.20 -r1.20.4.1
--- serendipity_admin_plugins.inc.php 21 Mar 2004 16:35:31 -0000 1.20
+++ serendipity_admin_plugins.inc.php 7 Apr 2004 06:53:12 -0000 1.20.4.1
@@ -29,23 +29,32 @@
<select name="serendipity[plugin_to_add]">
<option value="0">[ <?php echo SELECT_A_PLUGIN_TO_ADD; ?> ]</option>
<?php
+ $errorstack = array();
foreach ($classes as $class_name) {
$plugin =& serendipity_plugin_api::load_plugin($class_name);
+ if (is_object($plugin)) {
+ /* query for its name, description and configuration data */
+ $bag = new serendipity_property_bag;
+ $plugin->introspect($bag);
- /* query for its name, description and configuration data */
- $bag = new serendipity_property_bag;
- $plugin->introspect($bag);
-
- $name = $bag->get('name');
- $desc = $bag->get('description');
+ $name = $bag->get('name');
+ $desc = $bag->get('description');
?>
<option value="<?php echo $class_name; ?>"><?php echo $name . ' - ' . $desc; ?></option>
<?php
+ } else {
+ $errorstack[] = $class_name;
+ }
}
?>
</select>
<input name="NEW" value="<?php echo ADD_PLUGIN; ?>" type="submit" />
<br />
+<?php
+foreach($errorstack as $e_idx => $e_name) {
+ echo ERROR . ': ' . $class_name . '<br />';
+}
+?>
<br />
<table border="0" cellpadding="5" cellspacing="0">
|