File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 5151 'description ' => 'The character information has been changed. '
5252 ));
5353 $ show_form = false ;
54+
55+ $ hooks ->trigger (HOOK_ACCOUNT_CHARACTERS_CHANGE_COMMENT_AFTER_SUCCESS , ['player ' => $ player ]);
5456 }
5557 }
5658 } else {
7072 }
7173
7274 if (isset ($ player ) && $ player ) {
73- $ twig ->display ('account.characters.change-comment.html.twig ' , array (
74- 'player ' => $ player ->toArray ()
75- ));
75+ $ _player = $ player ->toArray ();
76+ $ _player ['id ' ] = $ player ->id ; // Hack, as it's somehow missing in the toArray() function
77+
78+ $ twig ->display ('account.characters.change-comment.html.twig ' , [
79+ 'player ' => $ _player ,
80+ ]);
7681 }
7782}
78- ?>
Original file line number Diff line number Diff line change 2828define ('HOOK_LOGIN ' , ++$ i );
2929define ('HOOK_LOGIN_ATTEMPT ' , ++$ i );
3030define ('HOOK_LOGOUT ' , ++$ i );
31+ define ('HOOK_ACCOUNT_CHARACTERS_CHANGE_COMMENT_AFTER_SUCCESS ' , ++$ i );
32+ define ('HOOK_ACCOUNT_CHARACTERS_CHANGE_COMMENT_AFTER_NAME ' , ++$ i );
33+ define ('HOOK_ACCOUNT_CHARACTERS_CHANGE_COMMENT_AFTER_HIDE_ACCOUNT ' , ++$ i );
34+ define ('HOOK_ACCOUNT_CHARACTERS_CHANGE_COMMENT_AFTER_COMMENT ' , ++$ i );
3135define ('HOOK_ACCOUNT_CHANGE_PASSWORD_AFTER_OLD_PASSWORD ' , ++$ i );
3236define ('HOOK_ACCOUNT_CHANGE_PASSWORD_AFTER_NEW_PASSWORD ' , ++$ i );
3337define ('HOOK_ACCOUNT_CHANGE_PASSWORD_POST ' , ++$ i );
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ If you do not want to specify a certain field, just leave it blank.<br/><br/>
3333 <td class =" LabelV" >Name:</td >
3434 <td style =" width:80%;" >{{ player .name }}</td >
3535 </tr >
36+ {{ hook(' HOOK_ACCOUNT_CHARACTERS_CHANGE_COMMENT_AFTER_NAME' ) }}
3637 <tr >
3738 <td class =" LabelV" >Hide Account:</td >
3839 <td >
@@ -42,6 +43,7 @@ If you do not want to specify a certain field, just leave it blank.<br/><br/>
4243 {% if player .group_id > 1 %} (you will be also hidden on the Team page!){% endif %}
4344 </td >
4445 </tr >
46+ {{ hook(' HOOK_ACCOUNT_CHARACTERS_CHANGE_COMMENT_AFTER_HIDE_ACCOUNT' ) }}
4547 </table >
4648 </div >
4749 </div >
@@ -65,6 +67,7 @@ If you do not want to specify a certain field, just leave it blank.<br/><br/>
6567 <td class =" LabelV" ><span >Comment:</span ></td >
6668 <td style =" width:80%;" ><textarea name =" comment" rows =" 10" cols =" 50" wrap =" virtual" >{{ player .comment | raw }}</textarea ><br >[max. length: 2000 chars, 50 lines (ENTERs)]</td >
6769 </tr >
70+ {{ hook(' HOOK_ACCOUNT_CHARACTERS_CHANGE_COMMENT_AFTER_COMMENT' ) }}
6871 </table >
6972 </div >
7073 </div >
You can’t perform that action at this time.
0 commit comments