Ejemplo n.º 1
0
 function _format(&$objDBCat)
 {
     global $_DOCMAN;
     $user = $_DOCMAN->getUser();
     // format category data
     $this->objFormatData = DOCMAN_Utils::get_object_vars($objDBCat);
     $this->objFormatData->files = DOCMAN_Cats::countDocsInCatByUser($objDBCat->id, $user, true);
     // format category links
     $this->objFormatLink->view = $this->_formatLink('cat_view');
     // format category paths
     $this->objFormatPath->thumb = DOCMAN_Utils::pathThumb($objDBCat->image);
     $this->objFormatPath->icon = DOCMAN_Utils::pathIcon('folder.png', 1);
 }
Ejemplo n.º 2
0
$params =& $menu->getParams($Itemid);
// Request vars
$task = JRequest::getVar("task", "");
$gid = JRequest::getInt("gid", $params->get('cat_id', 0));
$script = JRequest::getInt("script", 0);
$ordering = JRequest::getCmd("order", $_DOCMAN->getCfg('default_order'));
$direction = strtoupper(JRequest::getCmd("dir", $_DOCMAN->getCfg('default_order2')));
if (!in_array($direction, array('ASC', 'DESC'))) {
    $direction = 'ASC';
}
$revision = JRequest::getInt("revision", 0);
$archive = JRequest::getInt("archive", 0);
$limitstart = JRequest::getInt("limitstart", 0);
// $limit 		= (int) mosGetParam($_REQUEST, "limit", $_DOCMAN->getCfg('perpage'));
$limit = $_DOCMAN->getCfg('perpage');
$total = DOCMAN_Cats::countDocsInCatByUser($gid, $_DMUSER);
if ($total <= $limit) {
    $limitstart = 0;
}
// check if the user actually has access to see this document
switch ($_DMUSER->canAccess()) {
    case 0:
        showMsgBox(_DML_NOLOG);
        return;
    case -1:
        showMsgBox(_DML_ISDOWN);
        return;
}
// component tasks
switch ($task) {
    //standard operations