Fix for searching on child location names (#7646)
* Fix for child locations * Reverts temp changes to indenter
This commit is contained in:
@@ -150,11 +150,13 @@ class Location extends SnipeModel
|
||||
|
||||
public static function indenter($locations_with_children, $parent_id = null, $prefix = '') {
|
||||
$results = Array();
|
||||
|
||||
|
||||
if (!array_key_exists($parent_id, $locations_with_children)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
foreach ($locations_with_children[$parent_id] as $location) {
|
||||
$location->use_text = $prefix.' '.$location->name;
|
||||
$location->use_image = ($location->image) ? url('/').'/uploads/locations/'.$location->image : null;
|
||||
|
||||
Reference in New Issue
Block a user