$site = get_site();
- if (!$blocks = get_list_of_plugins("blocks") ) {
+ if (!$blocks = get_list_of_plugins("blocks", "db") ) {
error("No blocks installed!");
}
/// ENVIRONMENT CHECKING ////////////////////////////////////////////////////////////
-function get_list_of_plugins($plugin="mod") {
+function get_list_of_plugins($plugin="mod", $exclude="") {
/// Lists plugin directories within some directory
global $CFG;
$basedir = opendir("$CFG->dirroot/$plugin");
while ($dir = readdir($basedir)) {
$firstchar = substr($dir, 0, 1);
- if ($firstchar == "." or $dir == "CVS" or $dir == "_vti_cnf" or $dir == "db") {
+ if ($firstchar == "." or $dir == "CVS" or $dir == "_vti_cnf" or $dir == $exclude) {
continue;
}
if (filetype("$CFG->dirroot/$plugin/$dir") != "dir") {