Update DownloadController.php (#1267)
* Update DownloadController.php * StyleFix * Another StyleFix ! * Update DownloadController.php * Last StyleFix and Update * Apply StyleCI fix Co-authored-by: Nabeel Shahzad <nabeel@nabeel.sh>
This commit is contained in:
@@ -41,22 +41,25 @@ class DownloadController extends Controller
|
|||||||
$klass = new $class();
|
$klass = new $class();
|
||||||
$obj = $klass->find($id);
|
$obj = $klass->find($id);
|
||||||
|
|
||||||
$category = explode('\\', $class);
|
// Check if the object is there first
|
||||||
$category = end($category);
|
if (isset($obj)) {
|
||||||
|
$category = explode('\\', $class);
|
||||||
|
$category = end($category);
|
||||||
|
|
||||||
if ($category == 'Aircraft' && $airlines > 1) {
|
if ($category == 'Aircraft' && $airlines > 1) {
|
||||||
$group_name = $category.' > '.$obj->subfleet->airline->name.' '.$obj->icao.' '.$obj->registration;
|
$group_name = $category.' > '.$obj->subfleet->airline->name.' '.$obj->icao.' '.$obj->registration;
|
||||||
} elseif ($category == 'Aircraft') {
|
} elseif ($category == 'Aircraft') {
|
||||||
$group_name = $category.' > '.$obj->icao.' '.$obj->registration;
|
$group_name = $category.' > '.$obj->icao.' '.$obj->registration;
|
||||||
} elseif ($category == 'Airport') {
|
} elseif ($category == 'Airport') {
|
||||||
$group_name = $category.' > '.$obj->icao.' : '.$obj->name.' ('.$obj->country.')';
|
$group_name = $category.' > '.$obj->icao.' : '.$obj->name.' ('.$obj->country.')';
|
||||||
} elseif ($category == 'Subfleet' && $airlines > 1) {
|
} elseif ($category == 'Subfleet' && $airlines > 1) {
|
||||||
$group_name = $category.' > '.$obj->airline->name.' '.$obj->name;
|
$group_name = $category.' > '.$obj->airline->name.' '.$obj->name;
|
||||||
} else {
|
} else {
|
||||||
$group_name = $category.' > '.$obj->name;
|
$group_name = $category.' > '.$obj->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
$regrouped_files[$group_name] = $files;
|
||||||
}
|
}
|
||||||
|
|
||||||
$regrouped_files[$group_name] = $files;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ksort($regrouped_files, SORT_STRING);
|
ksort($regrouped_files, SORT_STRING);
|
||||||
|
|||||||
1
resources/lang/zh/aircraft.php
Normal file
1
resources/lang/zh/aircraft.php
Normal file
@@ -0,0 +1 @@
|
|||||||
|
'stored' => '保存',
|
||||||
Reference in New Issue
Block a user