Ejemplo n.º 1
0
/**
* changes the access level of a record
* @param integer The increment to reorder by
*/
function accessMenu($uid, $access, $option)
{
    global $database;
    josSpoofCheck();
    $row = new mosSection($database);
    $row->load((int) $uid);
    $row->access = $access;
    if (!$row->check()) {
        return $row->getError();
    }
    if (!$row->store()) {
        return $row->getError();
    }
    // clean any existing cache files
    mosCache::cleanCache('com_content');
    mosRedirect('index2.php?option=' . $option . '&scope=' . $row->scope);
}
Ejemplo n.º 2
0
/**
* changes the access level of a record
* @param integer The increment to reorder by
*/
function accessMenu($uid, $access, $option)
{
    global $database;
    $row = new mosSection($database);
    $row->load($uid);
    $row->access = $access;
    if (!$row->check()) {
        return $row->getError();
    }
    if (!$row->store()) {
        return $row->getError();
    }
    mosRedirect('index2.php?option=' . $option . '&scope=' . $row->scope);
}