mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-12 11:40:26 +01:00
[ticket/15925] Add core.sync_modify_forum_data
Allow fieldnames and forum_data to be updated before synced with the database Used in conjunction with post_info to pull that data PHPBB3-15925
This commit is contained in:
parent
6728497434
commit
740b2ffbf2
@ -1877,7 +1877,6 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($post_info);
|
||||
}
|
||||
|
||||
// 6: Now do that thing
|
||||
@ -1888,6 +1887,23 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
array_push($fieldnames, 'posts_approved', 'posts_unapproved', 'posts_softdeleted', 'topics_approved', 'topics_unapproved', 'topics_softdeleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to modify the SQL array to get the post and user data from all forums' last posts
|
||||
*
|
||||
* @event core.sync_modify_forum_data
|
||||
* @var array forum_data Array with data to update for all forum ids
|
||||
* @var array post_info Array with some post and user data from the last posts list
|
||||
* @var array fieldnames Array with the partial column names that are being updated
|
||||
* @since 3.2.6-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'forum_data',
|
||||
'post_info',
|
||||
'fieldnames',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.sync_modify_forum_data', compact($vars)));
|
||||
unset($post_info);
|
||||
|
||||
foreach ($forum_data as $forum_id => $row)
|
||||
{
|
||||
$sql_ary = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user