Esempio n. 1
0
// get parameters from the URL or submitted form
$section = JRequest::getCmd('section', 'com_content');
$cid = JRequest::getVar('cid', array(0), '', 'array');
JArrayHelper::toInteger($cid, array(0));
switch (JRequest::getCmd('task')) {
    case 'add':
        editCategory(false);
        break;
    case 'edit':
        editCategory(true);
        break;
    case 'moveselect':
        moveCategorySelect($option, $cid, $section);
        break;
    case 'movesave':
        moveCategorySave($cid, $section);
        break;
    case 'copyselect':
        copyCategorySelect($option, $cid, $section);
        break;
    case 'copysave':
        copyCategorySave($cid, $section);
        break;
    case 'go2menu':
    case 'go2menuitem':
    case 'save':
    case 'apply':
        saveCategory();
        break;
    case 'remove':
        removeCategories($section, $cid);
Esempio n. 2
0
$cid = mosGetParam($_REQUEST, 'cid', array(0));
if (!is_array($cid)) {
    $cid = array(0);
}
switch ($task) {
    case "new":
        editCategory(0, $section);
        break;
    case "edit":
        editCategory(intval($cid[0]));
        break;
    case "moveselect":
        moveCategorySelect($option, $cid, $section);
        break;
    case "movesave":
        moveCategorySave($option, $cid, $section);
        break;
    case "copyselect":
        copyCategorySelect($option, $cid, $section);
        break;
    case "copysave":
        copyCategorySave($option, $cid, $section);
        break;
    case "save":
        saveCategory();
        break;
    case "remove":
        removeCategories($section, $cid);
        break;
    case "publish":
        publishCategories($section, $id, $cid, 1);