mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-27 16:14:39 -06:00
fix category text title
This commit is contained in:
parent
8f39d05d42
commit
b3e930d692
@ -409,12 +409,12 @@ class AdvsController extends PublicController
|
||||
if ($city) {
|
||||
$catText = "$city->name $catText";
|
||||
} elseif (count($mainCats) == 1 || count($mainCats) == 2) {
|
||||
$catText = end($mainCats)['val'];
|
||||
$catText = end($mainCats)->name;
|
||||
} elseif (count($mainCats) > 2) {
|
||||
$catArray = array_slice($mainCats, 2);
|
||||
$loop = 0;
|
||||
foreach ($catArray as $cat) {
|
||||
$catText = !$loop ? $catText . $cat['val'] : $catText . ' ' . $cat['val'];
|
||||
$catText = !$loop ? $catText . $cat->name : $catText . ' ' . $cat->name;
|
||||
$loop++;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user