modified : new method get_category_names
added in category class
This commit is contained in:
parent
511334a3b1
commit
999a0dd9f8
1 changed files with 23 additions and 0 deletions
23
upload/includes/classes/category.class.php
Normal file → Executable file
23
upload/includes/classes/category.class.php
Normal file → Executable file
|
@ -873,6 +873,29 @@ abstract class CBCategory
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function used to get multiple category names
|
||||||
|
*/
|
||||||
|
function get_category_names($cid_array)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$cat_name = array();
|
||||||
|
$cid = explode(' ', $cid_array);
|
||||||
|
$cid = array_slice($cid,0,-1);
|
||||||
|
$test = '';
|
||||||
|
foreach ($cid as $key => $value)
|
||||||
|
{
|
||||||
|
$cat_id = str_replace('#','', $value);
|
||||||
|
$results = $this->get_category($cat_id);
|
||||||
|
|
||||||
|
$cat_name[]= $results;
|
||||||
|
|
||||||
|
}
|
||||||
|
return $cat_name;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue