Added system polling
This commit is contained in:
@@ -12,6 +12,7 @@ use Illuminate\Support\Facades\Notification;
|
||||
use Illuminate\Support\ViewErrorBag;
|
||||
|
||||
use App\Http\Requests\SystemRegister;
|
||||
use App\Jobs\AddressPoll;
|
||||
use App\Models\{Address,Echoarea,Filearea,Setup,System,SystemZone,Zone};
|
||||
use App\Notifications\Netmails\AddressLink;
|
||||
use App\Rules\{FidoInteger,TwoByteInteger};
|
||||
@@ -279,6 +280,13 @@ class SystemController extends Controller
|
||||
foreach (['name','location','sysop','hold','phone','address','port','active','method','notes','zt_id','pkt_type'] as $key)
|
||||
$o->{$key} = $request->post($key);
|
||||
|
||||
switch ($request->post('pollmode')) {
|
||||
case 1: $o->pollmode = FALSE; break;
|
||||
case 2: $o->pollmode = TRUE; break;
|
||||
default: $o->pollmode = NULL;
|
||||
}
|
||||
|
||||
$o->autohold = FALSE;
|
||||
$o->save();
|
||||
|
||||
$mailers = collect($request->post('mailer_details'))
|
||||
@@ -653,8 +661,10 @@ class SystemController extends Controller
|
||||
break;
|
||||
}
|
||||
|
||||
if ($ca->count() && $la=$ca->pop())
|
||||
if ($ca->count() && $la=$ca->pop()) {
|
||||
Notification::route('netmail',$la)->notify(new AddressLink(Auth::user()));
|
||||
AddressPoll::dispatch($la)->delay(15);
|
||||
}
|
||||
|
||||
return view('user.system.register_send')
|
||||
->with('la',$la)
|
||||
|
Reference in New Issue
Block a user