Exemplo n.º 1
0
 /**
  * Custom Constructor
  */
 function __construct($default = array())
 {
     parent::__construct();
     $this->registerTask('disable', 'enable');
     $language = JFactory::getLanguage();
     $language->load('com_installer', JPATH_ADMINISTRATOR);
 }
Exemplo n.º 2
0
 /**
  * Custom Constructor
  */
 public function __construct($default = array())
 {
     parent::__construct();
     $this->registerTask('apply', 'save');
     $this->registerTask('unpublish', 'publish');
     $this->registerTask('enable', 'publish');
     $this->registerTask('disable', 'publish');
     $this->registerTask('orderup', 'order');
     $this->registerTask('orderdown', 'order');
 }
Exemplo n.º 3
0
 /**
  * Custom Constructor
  */
 function __construct($default = array())
 {
     parent::__construct();
     $this->registerTask('apply', 'save');
 }
Exemplo n.º 4
0
 function __construct($config = array())
 {
     parent::__construct($config);
 }
Exemplo n.º 5
0
    JRequest::setVar('task', null);
}
// import library dependencies
jimport('joomla.application.component.helper');
jimport('joomla.application.component.controller');
// Require the base controller
require_once WF_ADMINISTRATOR . '/controller.php';
// Load controller
$controllerPath = WF_ADMINISTRATOR . '/controller/' . $view . '.php';
if (file_exists($controllerPath)) {
    require_once $controllerPath;
    $controllerClass = 'WFController' . ucfirst($view);
    $controller = new $controllerClass(array('base_path' => WF_ADMINISTRATOR));
    // load default controller
} else {
    $controller = new WFController(array('base_path' => WF_ADMINISTRATOR));
}
// check Authorisations
switch ($view) {
    case 'editor':
    case 'help':
    case 'popup':
        break;
    default:
        $app = JFactory::getApplication();
        if ($app->isAdmin() === false) {
            $app->redirect('index.php', WFText::_('ALERTNOTAUTH'), 'error');
        }
        if ($view == 'cpanel') {
            $view = 'manage';
        }
Exemplo n.º 6
0
 function display()
 {
     parent::display();
 }
Exemplo n.º 7
0
 /**
  * Custom Constructor
  */
 function __construct($default = array())
 {
     parent::__construct();
 }
Exemplo n.º 8
0
// get task
$task = JRequest::getCmd('task');
// import library dependencies
jimport('joomla.application.component.helper');
jimport('joomla.application.component.controller');
// Require the base controller
require_once dirname(__FILE__) . DS . 'controller.php';
// Load controller
$controllerPath = dirname(__FILE__) . DS . 'controller' . DS . $view . '.php';
if (file_exists($controllerPath)) {
    require_once $controllerPath;
    $controllerClass = 'WFController' . ucfirst($view);
    $controller = new $controllerClass(array('base_path' => dirname(__FILE__)));
    // load default controller
} else {
    $controller = new WFController(array('base_path' => dirname(__FILE__)));
}
// check Authorisations
switch ($view) {
    case 'editor':
    case 'help':
    case 'popup':
        break;
    case 'cpanel':
        // Authorise
        $controller->authorize('admin');
        break;
    default:
        // Authorise
        $controller->authorize($view);
        break;