Beispiel #1
0
/**
* 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&section=categories');
}
Beispiel #2
0
/**
* 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&section=categories');
}