From be8e898d23a3f9ca515f59fbcc8d82e112ed7ee8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 5 May 2001 13:57:29 +0000 Subject: - Uhm. Rewrote the module system: less code clutter, less run-time overhead, and a lot better (simpler) module API. I had to edit a LOT of files to get this refactored but I'm sure it was worth the effort. For module writers / maintainers: None of the hooks changed, so 95% of the old modules should still work. You can remove some code instead as "$module = array(...)" just became obsolete. Also - and let's thank God for this - the global variable "$repository" has been eliminated to avoid modules relying on, and poking in drupal's internal data structures. Take a look at include/module.inc to investigate the details/changes. - Improved design of the content modules "story", "book" and "node" (to aid smooth integration of permisions + moderate.module). I'm still working on the permissions but I got side tracked for which I "Oops!". --- includes/common.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'includes/common.inc') diff --git a/includes/common.inc b/includes/common.inc index a8b6f6769..ca942f5d2 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -24,7 +24,7 @@ function throttle($type, $rate) { if ($throttle = db_fetch_object(db_query("SELECT * FROM watchdog WHERE type = '$type' AND hostname = '". getenv("REMOTE_ADDR") ."' AND ". time() ." - timestamp < $rate"))) { watchdog("warning", "throttle: '". getenv("REMOTE_ADDR") ."' exceeded submission rate - $throttle->type"); header("Location: error.php?op=throttle"); - exit(); + die("submission rate exceeded"); } else { watchdog($type, "throttle control"); @@ -196,6 +196,7 @@ include_once "includes/user.inc"; include_once "includes/node.inc"; user_init(); +module_init(); $locale = locale_init(); $conf = variable_init(); $theme = theme_init(); -- cgit v1.2.3