mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/events] Adding ledge ucp_zebra_remove
Used by phpBB Gallery PHPBB3-9550
This commit is contained in:
parent
8d4c7d2e80
commit
02244397d1
1 changed files with 6 additions and 1 deletions
|
@ -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']);
|
||||||
|
|
Loading…
Add table
Reference in a new issue