/** * changes the access level of a record * * @param integer $ The increment to reorder by */ function accessCategory($uid, $access) { DOCMAN_token::check() or die('Invalid Token'); $database = JFactory::getDBO(); $mainframe = JFactory::getApplication(); $row = new mosDMCategory($database); $row->load($uid); $row->access = $access; if (!$row->check()) { return $row->getError(); } if (!$row->store()) { return $row->getError(); } $mainframe->redirect('index.php?option=com_docman§ion=categories'); }
function copyDocumentProcess($cid) { DOCMAN_token::check() or die('Invalid Token'); global $database, $my; // get the id of the category to copy the document to $categoryCopy = mosGetParam($_POST, 'catid', ''); // preform move $doc = new mosDMDocument($database); $doc->copy($cid, $categoryCopy); // output status message $cids = implode(',', $cid); $total = count($cid); $cat = new mosDMCategory($database); $cat->load($categoryCopy); $msg = $total . ' ' . _DML_DOCUMENTS_COPIED_TO . ' ' . $cat->name; mosRedirect('index2.php?option=com_docman§ion=documents', $msg); }
function copyDocumentProcess($cid) { DOCMAN_token::check() or die('Invalid Token'); $mainframe = JFactory::getApplication(); $database = JFactory::getDBO(); $my = JFactory::getUser(); // get the id of the category to copy the document to $categoryCopy = JRequest::getInt('catid', '', 'post'); // preform move $doc = new mosDMDocument($database); $doc->copy($cid, $categoryCopy); // output status message $cids = implode(',', $cid); $total = count($cid); $cat = new mosDMCategory($database); $cat->load($categoryCopy); $msg = $total . ' ' . _DML_DOCUMENTS_COPIED_TO . ' ' . $cat->name; $mainframe->redirect('index.php?option=com_docman§ion=documents', $msg); }
/** * changes the access level of a record * * @param integer $ The increment to reorder by */ function accessCategory($uid, $access) { DOCMAN_token::check() or die('Invalid Token'); global $database; $row = new mosDMCategory($database); $row->load($uid); $row->access = $access; if (!$row->check()) { return $row->getError(); } if (!$row->store()) { return $row->getError(); } mosRedirect('index2.php?option=com_docman§ion=categories'); }