19 lines
		
	
	
		
			556 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			556 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
use Bdp\Modules\Gruppen\Controllers\MainController;
 | 
						|
 | 
						|
class UpdateGroupAction
 | 
						|
{
 | 
						|
	public static function execute(array $newData, int $groupId)
 | 
						|
    {
 | 
						|
	    global $dbHandler;
 | 
						|
	    if (!current_user_can('edit_groups')) {
 | 
						|
		    kompass_print_message_box(__('You are not allowed to update a group', BDP_LV_PLUGIN_SLUG), 'error');
 | 
						|
	    }
 | 
						|
 | 
						|
	    global $dbHandler;
 | 
						|
	    $dbHandler->updateRows(MainController::KOMPASS_STAMMESGRUPPEN_GRUPPEN, $newData, ['id' => $groupId]);
 | 
						|
 | 
						|
		kompass_print_message_box(__('The group was updated.', BDP_LV_PLUGIN_SLUG));
 | 
						|
    }
 | 
						|
} |