summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/database.inc4
-rw-r--r--includes/module.inc7
2 files changed, 7 insertions, 4 deletions
diff --git a/includes/database.inc b/includes/database.inc
index 4022fbc2a..be815390e 100644
--- a/includes/database.inc
+++ b/includes/database.inc
@@ -2,8 +2,8 @@
$db_type = substr($db_url, 0, strpos($db_url, "://"));
-if (file_exists("includes/database.$db_type.inc")) {
- include_once "includes/database.$db_type.inc";
+if ($db_type == "mysql") {
+ include_once "includes/database.mysql.inc";
}
else {
include_once "includes/database.pear.inc";
diff --git a/includes/module.inc b/includes/module.inc
index 408b3d718..be1f7fe9f 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -12,10 +12,10 @@ function module_iterate($function, $argument = "") {
}
// invoke hook $hook of module $name with optional arguments:
-function module_invoke($name, $hook, $a1 = NULL, $a2 = NULL) {
+function module_invoke($name, $hook, $a1 = NULL, $a2 = NULL, $a3 = NULL, $a4 = NULL) {
$function = $name ."_". $hook;
if (function_exists($function)) {
- return $function($a1, $a2);
+ return $function($a1, $a2, $a3, $a4);
}
}
@@ -36,6 +36,9 @@ function module_list() {
closedir($handle);
asort($list);
}
+ else {
+ $list = array();
+ }
}
return $list;