mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 15:16:30 +02:00
Merge pull request #1273 from lonalore/master
Forum post created event: Append last inserted ID to data array for passing…
This commit is contained in:
@@ -3178,7 +3178,7 @@ class e_parser
|
|||||||
$title = (ADMIN) ? $image : $tp->toAttribute($userData['user_name']);
|
$title = (ADMIN) ? $image : $tp->toAttribute($userData['user_name']);
|
||||||
$shape = (vartrue($options['shape'])) ? "img-".$options['shape'] : "img-rounded";
|
$shape = (vartrue($options['shape'])) ? "img-".$options['shape'] : "img-rounded";
|
||||||
|
|
||||||
$text = "<img class='".$shape." img-responsive user-avatar e-tip' title=\"".$title."\" src='".$img."' alt='' style='width:".$width."px; height:".$height."px' />";
|
$text = "<img class='".$shape." img-responsive user-avatar e-tip' title=\"".$title."\" src='".$img."' alt='' width='".$width."' height='".$height."' />";
|
||||||
// return $img;
|
// return $img;
|
||||||
return $text;
|
return $text;
|
||||||
|
|
||||||
|
@@ -676,6 +676,8 @@ class e107forum
|
|||||||
|
|
||||||
$info['data'] = $postInfo;
|
$info['data'] = $postInfo;
|
||||||
$postId = $sql->insert('forum_post', $info);
|
$postId = $sql->insert('forum_post', $info);
|
||||||
|
// Append last inserted ID to data array for passing it to event callbacks.
|
||||||
|
$info['data']['post_id'] = $postId;
|
||||||
e107::getEvent()->trigger('user_forum_post_created', $info);
|
e107::getEvent()->trigger('user_forum_post_created', $info);
|
||||||
$forumInfo = array();
|
$forumInfo = array();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user