Exemplo n.º 1
0
         case "remove":
             $fields = new fields();
             $fields->removeFields($cid);
             $mainframe->redirect("index.php?option=com_caddy&action=fields&task=show&field={$field}&order={$order}&search={$search}", JText::_('SC_FIELDDELETED'));
             break;
         case "publish":
         case "unpublish":
             $fields = new fields();
             $fields->publishfield($cid, $task == 'publish');
             $mainframe->redirect("index.php?option=com_caddy&action=fields&task=show&field={$field}&order={$order}&search={$search}");
             break;
         case "show":
         default:
             JRequest::setvar('task', "fields");
             $fields = new fields();
             $alist = $fields->getAllFields();
             display::showFields($alist);
             break;
     }
     break;
 case "options":
 case "optiongroups":
     if (!$task) {
         $task = "show";
     }
     // make sure we have a task value here
     $c = new $action();
     $c->{$task}();
     // execute the task
     // no redirect!
     break;