Merge remote-tracking branch 'origin/develop'
This commit is contained in:
@@ -890,7 +890,8 @@ class Helper
|
|||||||
// If upload_max_size is less, then reduce. Except if upload_max_size is
|
// If upload_max_size is less, then reduce. Except if upload_max_size is
|
||||||
// zero, which indicates no limit.
|
// zero, which indicates no limit.
|
||||||
$upload_max = Helper::parse_size(ini_get('upload_max_filesize'));
|
$upload_max = Helper::parse_size(ini_get('upload_max_filesize'));
|
||||||
if ($upload_max > 0 && $upload_max < $max_size) {
|
|
||||||
|
if ($upload_max > 0 && $upload_max < $post_max_size) {
|
||||||
$max_size = ini_get('upload_max_filesize');
|
$max_size = ini_get('upload_max_filesize');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
|
|||||||
use App\Models\License;
|
use App\Models\License;
|
||||||
use App\Models\LicenseSeat;
|
use App\Models\LicenseSeat;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use App\Models\Asset;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Input;
|
use Illuminate\Support\Facades\Input;
|
||||||
@@ -80,7 +81,12 @@ class LicenseCheckinController extends Controller
|
|||||||
// Ooops.. something went wrong
|
// Ooops.. something went wrong
|
||||||
return redirect()->back()->withInput()->withErrors($validator);
|
return redirect()->back()->withInput()->withErrors($validator);
|
||||||
}
|
}
|
||||||
$return_to = User::find($licenseSeat->assigned_to);
|
|
||||||
|
if($licenseSeat->assigned_to != null){
|
||||||
|
$return_to = User::find($licenseSeat->assigned_to);
|
||||||
|
} else {
|
||||||
|
$return_to = Asset::find($licenseSeat->asset_id);
|
||||||
|
}
|
||||||
|
|
||||||
// Update the asset data
|
// Update the asset data
|
||||||
$licenseSeat->assigned_to = null;
|
$licenseSeat->assigned_to = null;
|
||||||
@@ -88,7 +94,6 @@ class LicenseCheckinController extends Controller
|
|||||||
|
|
||||||
// Was the asset updated?
|
// Was the asset updated?
|
||||||
if ($licenseSeat->save()) {
|
if ($licenseSeat->save()) {
|
||||||
|
|
||||||
event(new CheckoutableCheckedIn($licenseSeat, $return_to, Auth::user(), $request->input('note')));
|
event(new CheckoutableCheckedIn($licenseSeat, $return_to, Auth::user(), $request->input('note')));
|
||||||
|
|
||||||
if ($backTo=='user') {
|
if ($backTo=='user') {
|
||||||
|
|||||||
Reference in New Issue
Block a user