Esempio n. 1
0
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&section=documents', $msg);
}
Esempio n. 2
0
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&section=documents', $msg);
}