mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02:00
[feature/events] Adding ledge ucp_zebra_remove
Used by phpBB Gallery PHPBB3-9550
This commit is contained in:
@@ -25,7 +25,7 @@ class ucp_zebra
|
|||||||
|
|
||||||
function main($id, $mode)
|
function main($id, $mode)
|
||||||
{
|
{
|
||||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request;
|
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher;
|
||||||
|
|
||||||
$submit = (isset($_POST['submit']) || isset($_GET['add']) || isset($_GET['remove'])) ? true : false;
|
$submit = (isset($_POST['submit']) || isset($_GET['add']) || isset($_GET['remove'])) ? true : false;
|
||||||
$s_hidden_fields = '';
|
$s_hidden_fields = '';
|
||||||
@@ -54,6 +54,11 @@ class ucp_zebra
|
|||||||
// Remove users
|
// Remove users
|
||||||
if (!empty($data['usernames']))
|
if (!empty($data['usernames']))
|
||||||
{
|
{
|
||||||
|
$vars = array('data');
|
||||||
|
$event = new phpbb_event_data(compact($vars));
|
||||||
|
$phpbb_dispatcher->dispatch('core.ucp_zebra_remove', $event);
|
||||||
|
extract($event->get_data_filtered($vars));
|
||||||
|
|
||||||
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
|
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
|
||||||
WHERE user_id = ' . $user->data['user_id'] . '
|
WHERE user_id = ' . $user->data['user_id'] . '
|
||||||
AND ' . $db->sql_in_set('zebra_id', $data['usernames']);
|
AND ' . $db->sql_in_set('zebra_id', $data['usernames']);
|
||||||
|
Reference in New Issue
Block a user