Beispiel #1
0
 function _dmSearchSection($id, &$cache, $sep)
 {
     global $database;
     if (!$id) {
         return "";
     }
     if (isset($cache[$id])) {
         return $cache[$id];
     }
     // Find it...
     $query = "SELECT parent_id, name FROM #__categories WHERE id = " . (int) $id;
     $database->setQuery($query);
     $row = $database->loadObjectList();
     if (count($row)) {
         if ($row[0]->parent_id) {
             $cache[$id] = DOCMAN_Docs::_dmSearchSection($row[0]->parent_id, $cache, $sep) . $sep . $row[0]->name;
         } else {
             $cache[$id] = $row[0]->name;
         }
     }
     return $cache[$id];
 }