protected function _initialize(KConfig $config) { $component_config = KFactory::get('com://admin/files.model.configs')->getItem(); $allowed = array_map('strtolower', $component_config->upload_extensions); $ignored = array_map('strtolower', $component_config->ignore_extensions); $config->append(array( 'allowed' => $allowed, 'ignored' => $ignored )); parent::_initialize($config); }
protected function _initialize(KConfig $config) { $component_config = KFactory::get('com://admin/files.database.row.config'); $allowed_mimetypes = array_map('strtolower', $component_config->upload_mime); $illegal_mimetypes = array_map('strtolower', $component_config->upload_mime_illegal); $ignored_extensions = array_map('strtolower', $component_config->ignore_extensions); $config->append(array( 'restrict' => $component_config->restrict_uploads, 'authorized' => JFactory::getUser()->authorize('login', 'administrator'), 'check_mime' => $component_config->check_mime, 'allowed_mimetypes' => $allowed_mimetypes, 'illegal_mimetypes' => $illegal_mimetypes, 'ignored_extensions' => $ignored_extensions )); parent::_initialize($config); }
protected function _initialize(KConfig $config) { $component_config = $this->getService('com://admin/files.database.row.config'); $config->append(array('check_mime' => $component_config->check_mime, 'allowed_mimetypes' => array_map('strtolower', $component_config->upload_mime))); parent::_initialize($config); }
protected function _initialize(KConfig $config) { $component_config = $this->getService('com://admin/files.model.configs')->getItem(); $config->append(array('allowed' => array_map('strtolower', $component_config->upload_extensions))); parent::_initialize($config); }