diff options
-rw-r--r-- | EVENTS.txt | 5 | ||||
-rw-r--r-- | index.php | 5 | ||||
-rw-r--r-- | lib/common.php | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/EVENTS.txt b/EVENTS.txt index 68e25fa3b..4b8260b3c 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -1,3 +1,8 @@ +InitializePlugin: a chance to initialize a plugin in a complete + environment + +CleanupPlugin: a chance to cleanup a plugin at the end of a program + StartPrimaryNav: Showing the primary nav menu - $action: the current action @@ -85,3 +85,8 @@ if (!file_exists($actionfile)) { $sac->showPage(); } } + +// XXX: cleanup exit() calls or add an exit handler so +// this always gets called + +Event::handle('CleanupPlugin'); diff --git a/lib/common.php b/lib/common.php index 64c7f2410..2f85eb7c5 100644 --- a/lib/common.php +++ b/lib/common.php @@ -212,3 +212,7 @@ function __autoload($class) require_once(INSTALLDIR.'/lib/' . strtolower($class) . '.php'); } } + +// Give plugins a chance to initialize in a fully-prepared environment + +Event::handle('InitializePlugin'); |