Esempio n. 1
0
function approveDocument($cid, $approved = 1)
{
    DOCMAN_token::check() or die('Invalid Token');
    $database = JFactory::getDBO();
    $mainframe = JFactory::getApplication();
    $redirect = JRequest::getString('redirect', "index.php?option=com_docman&section=documents");
    $doc = new mosDMDocument($database);
    if ($doc->approve($cid, $approved)) {
        $mainframe->redirect($redirect);
    }
}
Esempio n. 2
0
function approveDocument($cid, $approved = 1)
{
    DOCMAN_token::check() or die('Invalid Token');
    global $database;
    $redirect = mosGetParam($_REQUEST, 'redirect', "index2.php?option=com_docman&section=documents");
    $doc = new mosDMDocument($database);
    if ($doc->approve($cid, $approved)) {
        mosRedirect($redirect);
    }
}