two more event hooks

darcs-hash:20061116212937-7ad00-2ac647a9040f75650bdbe1047e76370f9c900dff.gz
This commit is contained in:
Andreas Gohr 2006-11-16 22:29:37 +01:00
parent 88e6a4f276
commit c95706497c
3 changed files with 18 additions and 8 deletions

View file

@ -14,6 +14,9 @@
* Call the needed action handlers
*
* @author Andreas Gohr <andi@splitbrain.org>
* @triggers ACTION_ACT_PREPROCESS
* @triggers ACTION_REGISTER
* @triggers ACTION_HEADERS_SEND
*/
function act_dispatch(){
global $INFO;
@ -48,7 +51,8 @@ function act_dispatch(){
$ACT = act_permcheck($ACT);
//register
if($ACT == 'register' && register()){
$nil = array();
if($ACT == 'register' && $_POST['save'] && trigger_event('ACTION_REGISTER', $nil, 'register')){
$ACT = 'login';
}

View file

@ -909,6 +909,7 @@ function html_msgarea(){
* Prints the registration form
*
* @author Andreas Gohr <andi@splitbrain.org>
* @triggers HTML_REGISTERFORM_INJECTION
*/
function html_register(){
global $lang;
@ -952,6 +953,10 @@ function html_register(){
<?php echo $lang['email']?>
<input type="text" name="email" class="edit" size="50" value="<?php echo formText($_POST['email'])?>" />
</label><br />
<?php //bad and dirty event insert hook
$evdata = array();
trigger_event('HTML_REGISTERFORM_INJECTION', $evdata);
?>
<input type="submit" class="button" value="<?php echo $lang['register']?>" />
</fieldset>
</form>
@ -1029,6 +1034,7 @@ function html_updateprofile(){
*
* @fixme this is a huge lump of code and should be modularized
* @triggers HTML_PAGE_FROMTEMPLATE
* @triggers HTML_EDITFORM_INJECTION
* @author Andreas Gohr <andi@splitbrain.org>
*/
function html_edit($text=null,$include='edit'){ //FIXME: include needed?