mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#2505 Advanced Package ad limit is required
This commit is contained in:
parent
9492618ee1
commit
7c00659645
@ -15,7 +15,7 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
||||
->first();
|
||||
}
|
||||
|
||||
public function getParentCats($id, $type = null)
|
||||
public function getParentCats($id, $type = null, $noMainCat = true)
|
||||
{
|
||||
$cat = $this->getCat($id);
|
||||
$catNames = array();
|
||||
@ -30,7 +30,9 @@ class CategoryModel extends CatsCategoryEntryModel implements CategoryInterface
|
||||
if ($parCat->parent_category_id == "") {
|
||||
if ($type == "add_main")
|
||||
$catNames[] = $parCat->name;
|
||||
break;
|
||||
if ($noMainCat) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$catNames[] = $parCat->name;
|
||||
$cat_ids[] = $parCat->id;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user