- md5
- ff9f607af657c3ca23783ac247348e67
- sha1
- 32e29519847874fad789430e918e07fd98e6daf0
- sha256
- 8d943fdcac8a14805acbf3a2dfd32f70ad072da97509e98cbbfc232332bc45b1
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Admin\Administrator\View\Sysinfo;
defined('_JEXEC') or die;
use Joomla\CMS\Access\Exception\Notallowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\ToolbarHelper;
/**
* Sysinfo View class for the Admin component
*
* @since 1.6
*/
class HtmlView extends BaseHtmlView
{
/**
* Some PHP settings
*
* @var array
* @since 1.6
*/
protected $php_settings = array();
/**
* Config values
*
* @var array
* @since 1.6
*/
protected $config = array();
/**
* Some system values
*
* @var array
* @since 1.6
*/
protected $info = array();
/**
* PHP info
*
* @var string
* @since 1.6
*/
protected $php_info = null;
/**
* Information about writable state of directories
*
* @var array
* @since 1.6
*/
protected $directory = array();
/**
* Execute and display a template script.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*
* @since 1.6
*/
public function display($tpl = null)
{
// Access check.
if (!Factory::getUser()->authorise('core.admin'))
{
throw new Notallowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
$this->php_settings = $this->get('PhpSettings');
$this->config = $this->get('config');
$this->info = $this->get('info');
$this->php_info = $this->get('PhpInfo');
$this->directory = $this->get('directory');
$this->addToolbar();
return parent::display($tpl);
}
/**
* Setup the Toolbar
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
ToolbarHelper::title(Text::_('COM_ADMIN_SYSTEM_INFORMATION'), 'info-2 systeminfo');
ToolbarHelper::link(Route::_('index.php?option=com_admin&view=sysinfo&format=text'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_TEXT', 'download');
ToolbarHelper::link(Route::_('index.php?option=com_admin&view=sysinfo&format=json'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_JSON', 'download');
ToolbarHelper::help('JHELP_SITE_SYSTEM_INFORMATION');
}
}
The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.