Esempio n. 1
0
/**
* Moves the order of a record
* @param integer The increment to reorder by
*/
function orderContent($uid, $inc, $option)
{
    global $database;
    $row = new mosContent($database);
    $row->load($uid);
    $row->move($inc, "catid='{$row->catid}' AND state >= 0");
    $redirect = mosGetParam($_POST, 'redirect', $row->sectionid);
    mosRedirect('index2.php?option=' . $option . '&sectionid=' . $redirect);
}
Esempio n. 2
0
/**
* Moves the order of a record
* @param integer The increment to reorder by
*/
function orderContent($uid, $inc, $option)
{
    global $database;
    josSpoofCheck();
    $row = new mosContent($database);
    $row->load((int) $uid);
    $row->move($inc, "catid = " . (int) $row->catid . " AND state >= 0");
    $redirect = mosGetParam($_POST, 'redirect', $row->sectionid);
    // clean any existing cache files
    mosCache::cleanCache('com_content');
    mosRedirect('index2.php?option=' . $option . '&sectionid=' . $redirect);
}