Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv27749
Modified Files:
serendipity_plugin_api.php
Log Message:
If a 3rd-party external plugins directory doesn't contain a file, do not
exit with a fatal error. Fixes the bug, that plugins couldn't be configured.
Index: serendipity_plugin_api.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_plugin_api.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- serendipity_plugin_api.php 18 Sep 2003 12:58:52 -0000 1.7
+++ serendipity_plugin_api.php 5 Dec 2003 11:27:54 -0000 1.8
@@ -102,13 +102,16 @@
}
/* third-party classes next */
- $d = opendir((isset($serendipity['serendipityPath']) ? $serendipity['serendipityPath'] : '') . 'plugins');
+ $ppath = (isset($serendipity['serendipityPath']) ? $serendipity['serendipityPath'] : '') . 'plugins';
+ $d = opendir($ppath);
while (($f = readdir($d)) !== false) {
if ($f{0} == '.' || $f == 'CVS') {
continue;
}
-
- $classes[] = $f;
+
+ if (file_exists($ppath . '/' . $f . '/' . $f . '.php')) {
+ $classes[] = $f;
+ }
}
return $classes;
}
|