diff options
author | Kevin Chabowski <kevin@kch42.de> | 2012-02-01 21:47:40 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2012-02-01 21:47:40 +0100 |
commit | e4e0bf836669b5419a0e2c86409c46898beef5b4 (patch) | |
tree | 9560aaed15f3e2c28c4d4a3a09fb317e05ee848b /ratatoeskr/sys | |
parent | f1391f02d0167fd24b0bda731a20a972cb0a8163 (diff) | |
download | ratatoeskr-cms-e4e0bf836669b5419a0e2c86409c46898beef5b4.tar.gz ratatoeskr-cms-e4e0bf836669b5419a0e2c86409c46898beef5b4.tar.bz2 ratatoeskr-cms-e4e0bf836669b5419a0e2c86409c46898beef5b4.zip |
Added on_comment_store event.
Diffstat (limited to 'ratatoeskr/sys')
-rw-r--r-- | ratatoeskr/sys/plugin_api.php | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/ratatoeskr/sys/plugin_api.php b/ratatoeskr/sys/plugin_api.php index 7a80a5b..c592db3 100644 --- a/ratatoeskr/sys/plugin_api.php +++ b/ratatoeskr/sys/plugin_api.php @@ -15,15 +15,15 @@ require_once(dirname(__FILE__) . "/../frontend.php"); /* * Constant: APIVERSION - * The current API version (4). + * The current API version (5). */ -define("APIVERSION", 4); +define("APIVERSION", 5); /* * Array: $api_compat * Array of API versions, this version is compatible to (including itself). */ -$api_compat = array(3, 4); +$api_compat = array(3, 4, 5); $url_handlers = array(); /* @@ -145,7 +145,20 @@ abstract class RatatoeskrPlugin */ final protected function register_comment_validator($fx) { - register_comment_validator($fx); + global $comment_validators; + $comment_validators[] = $fx; + } + /* + * Function: register_on_comment_store + * Register a function that will be called, after a comment was saved. + * + * Parameters: + * $fx - Function, that accepts one parameter (a <Comment> object). + */ + final protected function register_on_comment_store($fx) + { + global $on_comment_store; + $on_comment_store[] = $fx; } /* |