function __construct()
 {
     parent::__construct();
     $this->object = 'dir';
     $this->subtype = 'content';
     $this->method = 'api';
 }
Exemplo n.º 2
0
 protected function init()
 {
     parent::init();
     // Get the language name
     $this->enabled = true;
     switch ($this->params->type) {
         case 'component':
             $this->params->langfiles[] = 'com_' . $this->params->name;
             break;
         case 'module':
             $this->params->langfiles[] = 'mod_' . $this->params->name;
             break;
         case 'plugin':
             // Process core files
             $this->params->langfiles[] = 'plg_' . $this->params->group . '_' . $this->params->name;
             $this->allowedfiles[] = 'plugins/' . $this->params->group . '/' . $this->params->name . '.php';
             $this->allowedfiles[] = 'plugins/' . $this->params->group . '/' . $this->params->name . '.xml';
             $this->filtereddir = 'plugins/' . $this->params->group;
             break;
         case 'template':
             $this->params->langfiles[] = 'tpl_' . $this->params->name;
             break;
         default:
             $this->enabled = false;
             break;
     }
 }
Exemplo n.º 3
0
 protected function init()
 {
     parent::init();
     // Get the language name
     $this->enabled = true;
     for ($i = 0; $i < count($this->params->type); $i++) {
         $info['name'] = $this->params->name[$i];
         $info['group'] = $this->params->group[$i];
         $this->addFiles($this->params->type[$i], $info);
     }
     // Sanitization
     if (!is_array($this->params->customfiles)) {
         $this->params->customfiles = array();
     }
     if (!is_array($this->allowedfiles)) {
         $this->allowedfiles = array();
     }
 }