- md5
- 0038d1379a2e9da69bdaecee3fdfd04e
- sha1
- 34e66bcdafc465c47fafe632ec5b683a0585df9f
- sha256
- 70c59123679e1609065e283efa8f9399aec86580b5797c622dfba647b2c2f4cc
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
require_once dirname(dirname(__DIR__)) . '/helper/component.php';
/**
* View for the global configuration
*
* @package Joomla.Administrator
* @subpackage com_config
* @since 1.5
*/
class ConfigViewApplication extends JViewLegacy
{
public $state;
public $form;
public $data;
/**
* Method to display the view.
*/
public function display($tpl = null)
{
$form = $this->get('Form');
$data = $this->get('Data');
$user = JFactory::getUser();
// Check for model errors.
if ($errors = $this->get('Errors'))
{
JError::raiseError(500, implode('<br />', $errors));
return false;
}
// Bind the form to the data.
if ($form && $data)
{
$form->bind($data);
}
// Get the params for com_users.
$usersParams = JComponentHelper::getParams('com_users');
// Get the params for com_media.
$mediaParams = JComponentHelper::getParams('com_media');
// Load settings for the FTP layer.
$ftp = JClientHelper::setCredentialsFromRequest('ftp');
$this->form = &$form;
$this->data = &$data;
$this->ftp = &$ftp;
$this->usersParams = &$usersParams;
$this->mediaParams = &$mediaParams;
$this->components = ConfigHelperComponent::getComponentsWithConfig();
ConfigHelperComponent::loadLanguageForComponents($this->components);
$this->userIsSuperAdmin = $user->authorise('core.admin');
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'), 'config.png');
JToolbarHelper::apply('application.apply');
JToolbarHelper::save('application.save');
JToolbarHelper::divider();
JToolbarHelper::cancel('application.cancel');
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_SITE_GLOBAL_CONFIGURATION');
}
}
The same content is in 3 releases, Joomla 3.1.4 to 3.1.6. See them all, or every version of this file.