Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
PK�[1uĽ��
access.xmlnu�[���<?xml version="1.0"
encoding="utf-8"?>
<access component="com_config">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN"
description="JACTION_ADMIN_COMPONENT_DESC" />
</section>
</access>
PK�[��*���
config.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('behavior.tabstate');
// Access checks are done internally because of different requirements for
the two controllers.
// Tell the browser not to cache this page.
JFactory::getApplication()->setHeader('Expires', 'Mon, 26
Jul 1997 05:00:00 GMT', true);
// Load classes
JLoader::registerPrefix('Config', JPATH_COMPONENT);
JLoader::registerPrefix('Config', JPATH_ROOT .
'/components/com_config');
// Application
$app = JFactory::getApplication();
$controllerHelper = new ConfigControllerHelper;
$controller = $controllerHelper->parseController($app);
$controller->prefix = 'Config';
// Perform the Request task
$controller->execute();
PK�[�R���
config.xmlnu�[���<?xml version="1.0"
encoding="utf-8"?>
<extension type="component" version="3.1"
method="upgrade">
<name>com_config</name>
<author>Joomla! Project</author>
<creationDate>April 2006</creationDate>
<copyright>(C) 2005 - 2020 Open Source Matters. All rights
reserved.</copyright>
<license>GNU General Public License version 2 or later; see
LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.0.0</version>
<description>COM_CONFIG_XML_DESCRIPTION</description>
<administration>
<files folder="admin">
<filename>config.php</filename>
<filename>controller.php</filename>
<folder>controllers</folder>
<folder>models</folder>
<folder>controller</folder>
<folder>model</folder>
<folder>view</folder>
</files>
<languages folder="admin">
<language
tag="en-GB">language/en-GB.com_config.ini</language>
<language
tag="en-GB">language/en-GB.com_config.sys.ini</language>
</languages>
</administration>
</extension>
PK�[����!controller/application/cancel.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Cancel Controller for global configuration
*
* @since 3.2
*/
class ConfigControllerApplicationCancel extends ConfigControllerCanceladmin
{
/**
* Method to cancel global configuration.
*
* @return boolean True on success.
*
* @since 3.2
*/
public function execute()
{
// Check if the user is authorized to do this.
if (!JFactory::getUser()->authorise('core.admin',
'com_config'))
{
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'));
$this->app->redirect('index.php');
}
$this->context = 'com_config.config.global';
$this->redirect = 'index.php?option=com_cpanel';
parent::execute();
}
}
PK�[��q33"controller/application/display.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Base Display Controller
*
* @since 3.2
* @note Needed for front end view
*/
class ConfigControllerApplicationDisplay extends ConfigControllerDisplay
{
/**
* Prefix for the view and model classes
*
* @var string
* @since 3.2
*/
public $prefix = 'Config';
}
PK�[=e���%controller/application/removeroot.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Remove Root Controller for global configuration
*
* @since 3.2
*/
class ConfigControllerApplicationRemoveroot extends JControllerBase
{
/**
* Application object - Redeclared for proper typehinting
*
* @var JApplicationCms
* @since 3.2
*/
protected $app;
/**
* Method to remove root in global configuration.
*
* @return boolean True on success.
*
* @since 3.2
*/
public function execute()
{
// Check for request forgeries.
if (!JSession::checkToken('get'))
{
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'));
$this->app->redirect('index.php');
}
// Check if the user is authorized to do this.
if (!JFactory::getUser()->authorise('core.admin'))
{
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'));
$this->app->redirect('index.php');
}
// Initialise model.
$model = new ConfigModelApplication;
// Attempt to save the configuration and remove root.
try
{
$model->removeroot();
}
catch (RuntimeException $e)
{
// Save failed, go back to the screen and display a notice.
$this->app->enqueueMessage(JText::sprintf('JERROR_SAVE_FAILED',
$e->getMessage()), 'error');
$this->app->redirect(JRoute::_('index.php', false));
}
// Set the redirect based on the task.
$this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'));
$this->app->redirect(JRoute::_('index.php', false));
}
}
PK�[��KX
X
controller/application/save.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Save Controller for global configuration
*
* @since 3.2
*/
class ConfigControllerApplicationSave extends JControllerBase
{
/**
* Application object - Redeclared for proper typehinting
*
* @var JApplicationCms
* @since 3.2
*/
protected $app;
/**
* Method to save global configuration.
*
* @return mixed Calls $app->redirect() for all cases except JSON
*
* @since 3.2
*/
public function execute()
{
// Check for request forgeries.
if (!JSession::checkToken())
{
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'),
'error');
$this->app->redirect('index.php');
}
// Check if the user is authorized to do this.
if (!JFactory::getUser()->authorise('core.admin'))
{
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
$this->app->redirect('index.php');
}
// Clear the data from the session.
$this->app->setUserState('com_config.config.global.data',
null);
// Set FTP credentials, if given.
JClientHelper::setCredentialsFromRequest('ftp');
$model = new ConfigModelApplication;
$data = $this->input->post->get('jform', array(),
'array');
// Complete data array if needed
$oldData = $model->getData();
$data = array_replace($oldData, $data);
// Get request type
$saveFormat = JFactory::getDocument()->getType();
// Handle service requests
if ($saveFormat == 'json')
{
$form = $model->getForm();
$return = $model->validate($form, $data);
if ($return === false)
{
$this->app->setHeader('Status', 422, true);
return false;
}
return $model->save($return);
}
// Must load after serving service-requests
$form = $model->getForm();
// Validate the posted data.
$return = $model->validate($form, $data);
// Check for validation errors.
if ($return === false)
{
/*
* The validate method enqueued all messages for us, so we just need to
redirect back.
*/
// Save the posted data in the session.
$this->app->setUserState('com_config.config.global.data',
$data);
// Redirect back to the edit screen.
$this->app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.application',
false));
}
// Attempt to save the configuration.
$data = $return;
$return = $model->save($data);
// Check the return value.
if ($return === false)
{
/*
* The save method enqueued all messages for us, so we just need to
redirect back.
*/
// Save the validated data in the session.
$this->app->setUserState('com_config.config.global.data',
$data);
// Save failed, go back to the screen and display a notice.
$this->app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.application',
false));
}
// Set the success message.
$this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'),
'message');
// Set the redirect based on the task.
switch ($this->options[3])
{
case 'apply':
$this->app->redirect(JRoute::_('index.php?option=com_config',
false));
break;
case 'save':
default:
$this->app->redirect(JRoute::_('index.php', false));
break;
}
}
}
PK�["�'controller/application/sendtestmail.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Send Test Mail Controller from global configuration
*
* @since 3.5
*/
class ConfigControllerApplicationSendtestmail extends JControllerBase
{
/**
* Method to send the test mail.
*
* @return string
*
* @since 3.5
*/
public function execute()
{
// Send json mime type.
$this->app->mimeType = 'application/json';
$this->app->setHeader('Content-Type',
$this->app->mimeType . '; charset=' .
$this->app->charSet);
$this->app->sendHeaders();
// Check if user token is valid.
if (!JSession::checkToken('get'))
{
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'),
'error');
echo new JResponseJson;
$this->app->close();
}
// Check if the user is authorized to do this.
if (!JFactory::getUser()->authorise('core.admin'))
{
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
echo new JResponseJson;
$this->app->close();
}
$model = new ConfigModelApplication;
echo new JResponseJson($model->sendTestMail());
$this->app->close();
}
}
PK�[�G��
controller/application/store.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Controller for global configuration, Store Permissions in Database
*
* @since 3.5
*/
class ConfigControllerApplicationStore extends JControllerBase
{
/**
* Method to GET permission value and give it to the model for storing in
the database.
*
* @return boolean true on success, false when failed
*
* @since 3.5
*/
public function execute()
{
// Send json mime type.
$this->app->mimeType = 'application/json';
$this->app->setHeader('Content-Type',
$this->app->mimeType . '; charset=' .
$this->app->charSet);
$this->app->sendHeaders();
// Check if user token is valid.
if (!JSession::checkToken('get'))
{
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'),
'error');
echo new JResponseJson;
$this->app->close();
}
$model = new ConfigModelApplication;
echo new JResponseJson($model->storePermissions());
$this->app->close();
}
}
PK�[͚[��controller/component/cancel.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Cancel Controller for global configuration components
*
* @since 3.2
*/
class ConfigControllerComponentCancel extends ConfigControllerCanceladmin
{
/**
* Method to cancel global configuration component.
*
* @return void
*
* @since 3.2
*/
public function execute()
{
$this->context = 'com_config.config.global';
$this->component = $this->input->get('component');
$this->redirect = 'index.php?option=' . $this->component;
parent::execute();
}
}
PK�[��j�11
controller/component/display.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Base Display Controller
*
* @since 3.2
* @note Needed for front end view
*/
class ConfigControllerComponentDisplay extends ConfigControllerDisplay
{
/**
* Prefix for the view and model classes
*
* @var string
* @since 3.2
*/
public $prefix = 'Config';
}
PK�[.���controller/component/save.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Save Controller for global configuration
*
* @since 3.2
*/
class ConfigControllerComponentSave extends JControllerBase
{
/**
* Application object - Redeclared for proper typehinting
*
* @var JApplicationCms
* @since 3.2
*/
protected $app;
/**
* Method to save global configuration.
*
* @return mixed Calls $app->redirect()
*
* @since 3.2
*/
public function execute()
{
// Check for request forgeries.
if (!JSession::checkToken())
{
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'),
'error');
$this->app->redirect('index.php');
}
// Set FTP credentials, if given.
JClientHelper::setCredentialsFromRequest('ftp');
$model = new ConfigModelComponent;
$form = $model->getForm();
$data = $this->input->get('jform', array(),
'array');
$id = $this->input->getInt('id');
$option = $this->input->get('component');
$user = JFactory::getUser();
// Make sure com_joomlaupdate and com_privacy can only be accessed by
SuperUser
if (in_array(strtolower($option), array('com_joomlaupdate',
'com_privacy'))
&& !JFactory::getUser()->authorise('core.admin'))
{
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
return;
}
// Check if the user is authorised to do this.
if (!$user->authorise('core.admin', $option) &&
!$user->authorise('core.options', $option))
{
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
$this->app->redirect('index.php');
}
// Remove the permissions rules data if user isn't allowed to edit
them.
if (!$user->authorise('core.admin', $option) &&
isset($data['params']) &&
isset($data['params']['rules']))
{
unset($data['params']['rules']);
}
$returnUri = $this->input->post->get('return', null,
'base64');
$redirect = '';
if (!empty($returnUri))
{
$redirect = '&return=' . urlencode($returnUri);
}
// Validate the posted data.
$return = $model->validate($form, $data);
// Check for validation errors.
if ($return === false)
{
/*
* The validate method enqueued all messages for us, so we just need to
redirect back.
*/
// Save the data in the session.
$this->app->setUserState('com_config.config.global.data',
$data);
// Redirect back to the edit screen.
$this->app->redirect(JRoute::_('index.php?option=com_config&view=component&component='
. $option . $redirect, false));
}
// Attempt to save the configuration.
$data = array(
'params' => $return,
'id' => $id,
'option' => $option
);
try
{
$model->save($data);
}
catch (RuntimeException $e)
{
// Save the data in the session.
$this->app->setUserState('com_config.config.global.data',
$data);
// Save failed, go back to the screen and display a notice.
$this->app->enqueueMessage(JText::sprintf('JERROR_SAVE_FAILED',
$e->getMessage()), 'error');
$this->app->redirect(JRoute::_('index.php?option=com_config&view=component&component='
. $option . $redirect, false));
}
// Set the redirect based on the task.
switch ($this->options[3])
{
case 'apply':
$this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'),
'message');
$this->app->redirect(JRoute::_('index.php?option=com_config&view=component&component='
. $option . $redirect, false));
break;
case 'save':
$this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'),
'message');
default:
$redirect = 'index.php?option=' . $option;
if (!empty($returnUri))
{
$redirect = base64_decode($returnUri);
}
// Don't redirect to an external URL.
if (!JUri::isInternal($redirect))
{
$redirect = JUri::base();
}
$this->app->redirect(JRoute::_($redirect, false));
break;
}
return true;
}
}
PK�[«w6��controller.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Config Component Controller
*
* @since 1.5
*/
class ConfigController extends JControllerLegacy
{
/**
* @var string The default view.
* @since 1.6
*/
protected $default_view = 'application';
/**
* Method to display the view.
*
* @param boolean $cachable If true, the view output will be cached
* @param array $urlparams An array of safe URL parameters and their
variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return ConfigController This object to support chaining.
*
* @since 1.5
*/
public function display($cachable = false, $urlparams = array())
{
// Set the default view name and format from the Request.
$vName = $this->input->get('view',
'application');
if (ucfirst($vName) == 'Application')
{
$controller = new ConfigControllerApplicationDisplay;
}
elseif (ucfirst($vName) == 'Component')
{
$controller = new ConfigControllerComponentDisplay;
}
return $controller->execute();
}
}
PK�[)�^� � controllers/application.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Controller for global configuration
*
* @since 1.5
* @deprecated 4.0
*/
class ConfigControllerApplication extends JControllerLegacy
{
/**
* Class Constructor
*
* @param array $config An optional associative array of configuration
settings.
*
* @since 1.5
* @deprecated 4.0
*/
public function __construct($config = array())
{
parent::__construct($config);
// Map the apply task to the save method.
$this->registerTask('apply', 'save');
}
/**
* Method to save the configuration.
*
* @return boolean True on success, false on failure.
*
* @since 1.5
* @deprecated 4.0 Use ConfigControllerApplicationSave instead.
*/
public function save()
{
try
{
JLog::add(
sprintf('%s() is deprecated. Use ConfigControllerApplicationSave
instead.', __METHOD__),
JLog::WARNING,
'deprecated'
);
}
catch (RuntimeException $exception)
{
// Informational log only
}
$controller = new ConfigControllerApplicationSave;
return $controller->execute();
}
/**
* Cancel operation.
*
* @return boolean True if successful; false otherwise.
*
* @deprecated 4.0 Use ConfigControllerApplicationCancel instead.
*/
public function cancel()
{
try
{
JLog::add(
sprintf('%s() is deprecated. Use ConfigControllerApplicationCancel
instead.', __METHOD__),
JLog::WARNING,
'deprecated'
);
}
catch (RuntimeException $exception)
{
// Informational log only
}
$controller = new ConfigControllerApplicationCancel;
return $controller->execute();
}
/**
* Method to remove the root property from the configuration.
*
* @return boolean True on success, false on failure.
*
* @since 1.5
* @deprecated 4.0 Use ConfigControllerApplicationRemoveroot instead.
*/
public function removeroot()
{
try
{
JLog::add(
sprintf('%s() is deprecated. Use
ConfigControllerApplicationRemoveroot instead.', __METHOD__),
JLog::WARNING,
'deprecated'
);
}
catch (RuntimeException $exception)
{
// Informational log only
}
$controller = new ConfigControllerApplicationRemoveroot;
return $controller->execute();
}
}
PK�[`M�� controllers/component.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Note: this view is intended only to be opened in a popup
*
* @since 1.5
* @deprecated 4.0
*/
class ConfigControllerComponent extends JControllerLegacy
{
/**
* Class Constructor
*
* @param array $config An optional associative array of configuration
settings.
*
* @since 1.5
* @deprecated 4.0
*/
public function __construct($config = array())
{
parent::__construct($config);
// Map the apply task to the save method.
$this->registerTask('apply', 'save');
}
/**
* Cancel operation
*
* @return void
*
* @since 3.0
* @deprecated 4.0 Use ConfigControllerComponentCancel instead.
*/
public function cancel()
{
try
{
JLog::add(
sprintf('%s() is deprecated. Use ConfigControllerComponentCancel
instead.', __METHOD__),
JLog::WARNING,
'deprecated'
);
}
catch (RuntimeException $exception)
{
// Informational log only
}
$controller = new ConfigControllerComponentCancel;
$controller->execute();
}
/**
* Save the configuration.
*
* @return boolean True if successful; false otherwise.
*
* @deprecated 4.0 Use ConfigControllerComponentSave instead.
*/
public function save()
{
try
{
JLog::add(
sprintf('%s() is deprecated. Use ConfigControllerComponentSave
instead.', __METHOD__),
JLog::WARNING,
'deprecated'
);
}
catch (RuntimeException $exception)
{
// Informational log only
}
$controller = new ConfigControllerComponentSave;
return $controller->execute();
}
}
PK�[k7��helper/config.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Components helper for com_config
*
* @since 3.0
*/
class ConfigHelperConfig extends JHelperContent
{
/**
* Get an array of all enabled components.
*
* @return array
*
* @since 3.0
*/
public static function getAllComponents()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('element')
->from('#__extensions')
->where('type = ' . $db->quote('component'))
->where('enabled = 1');
$db->setQuery($query);
$result = $db->loadColumn();
return $result;
}
/**
* Returns true if the component has configuration options.
*
* @param string $component Component name
*
* @return boolean
*
* @since 3.0
*/
public static function hasComponentConfig($component)
{
return is_file(JPATH_ADMINISTRATOR . '/components/' .
$component . '/config.xml');
}
/**
* Returns an array of all components with configuration options.
* Optionally return only those components for which the current user has
'core.manage' rights.
*
* @param boolean $authCheck True to restrict to components where
current user has 'core.manage' rights.
*
* @return array
*
* @since 3.0
*/
public static function getComponentsWithConfig($authCheck = true)
{
$result = array();
$components = self::getAllComponents();
$user = JFactory::getUser();
// Remove com_config from the array as that may have weird side effects
$components = array_diff($components, array('com_config'));
foreach ($components as $component)
{
if (self::hasComponentConfig($component) && (!$authCheck ||
$user->authorise('core.manage', $component)))
{
self::loadLanguageForComponent($component);
$result[$component] =
JApplicationHelper::stringURLSafe(JText::_($component)) . '_' .
$component;
}
}
asort($result);
return array_keys($result);
}
/**
* Load the sys language for the given component.
*
* @param array $components Array of component names.
*
* @return void
*
* @since 3.0
*/
public static function loadLanguageForComponents($components)
{
foreach ($components as $component)
{
self::loadLanguageForComponent($component);
}
}
/**
* Load the sys language for the given component.
*
* @param string $component component name.
*
* @return void
*
* @since 3.5
*/
public static function loadLanguageForComponent($component)
{
if (empty($component))
{
return;
}
$lang = JFactory::getLanguage();
// Load the core file then
// Load extension-local file.
$lang->load($component . '.sys', JPATH_BASE, null, false,
true)
|| $lang->load($component . '.sys', JPATH_ADMINISTRATOR .
'/components/' . $component, null, false, true);
}
}
PK�[��'q�qmodel/application.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
/**
* Model for the global configuration
*
* @since 3.2
*/
class ConfigModelApplication extends ConfigModelForm
{
/**
* Array of protected password fields from the configuration.php
*
* @var array
* @since 3.9.23
*/
private $protectedConfigurationFields = array('password',
'secret', 'ftp_pass', 'smtppass',
'redis_server_auth', 'session_redis_server_auth');
/**
* Method to get a form object.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data
(default case), false if not.
*
* @return mixed A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm('com_config.application',
'application', array('control' => 'jform',
'load_data' => $loadData));
if (empty($form))
{
return false;
}
return $form;
}
/**
* Method to get the configuration data.
*
* This method will load the global configuration data straight from
* JConfig. If configuration data has been saved in the session, that
* data will be merged into the original data, overwriting it.
*
* @return array An array containing all global config data.
*
* @since 1.6
*/
public function getData()
{
// Get the config data.
$config = new JConfig;
$data = ArrayHelper::fromObject($config);
// Get the correct driver at runtime
$data['dbtype'] = JFactory::getDbo()->getName();
// Prime the asset_id for the rules.
$data['asset_id'] = 1;
// Get the text filter data
$params = JComponentHelper::getParams('com_config');
$data['filters'] =
ArrayHelper::fromObject($params->get('filters'));
// If no filter data found, get from com_content (update of 1.6/1.7 site)
if (empty($data['filters']))
{
$contentParams = JComponentHelper::getParams('com_content');
$data['filters'] =
ArrayHelper::fromObject($contentParams->get('filters'));
}
// Check for data in the session.
$temp =
JFactory::getApplication()->getUserState('com_config.config.global.data');
// Merge in the session data.
if (!empty($temp))
{
$data = array_merge($data, $temp);
}
return $data;
}
/**
* Method to save the configuration data.
*
* @param array $data An array containing all global config data.
*
* @return boolean True on success, false on failure.
*
* @since 1.6
*/
public function save($data)
{
$app = JFactory::getApplication();
$dispatcher = JEventDispatcher::getInstance();
$config = JFactory::getConfig();
// Try to load the values from the configuration file
foreach ($this->protectedConfigurationFields as $fieldKey)
{
if (!isset($data[$fieldKey]))
{
$data[$fieldKey] = $config->get($fieldKey);
}
}
// Check that we aren't setting wrong database configuration
$options = array(
'driver' => $data['dbtype'],
'host' => $data['host'],
'user' => $data['user'],
'password' => $data['password'],
'database' => $data['db'],
'prefix' => $data['dbprefix']
);
try
{
JDatabaseDriver::getInstance($options)->getVersion();
}
catch (Exception $e)
{
$app->enqueueMessage(JText::_('JLIB_DATABASE_ERROR_DATABASE_CONNECT'),
'error');
return false;
}
// Check if we can set the Force SSL option
if ((int) $data['force_ssl'] !== 0 && (int)
$data['force_ssl'] !== (int)
JFactory::getConfig()->get('force_ssl', '0'))
{
try
{
// Make an HTTPS request to check if the site is available in HTTPS.
$host = JUri::getInstance()->getHost();
$options = new \Joomla\Registry\Registry;
$options->set('userAgent', 'Mozilla/5.0 (Windows NT
6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0');
// Do not check for valid server certificate here, leave this to the
user, moreover disable using a proxy if any is configured.
$options->set('transport.curl',
array(
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_PROXY => null,
CURLOPT_PROXYUSERPWD => null,
)
);
$response =
JHttpFactory::getHttp($options)->get('https://' . $host .
JUri::root(true) . '/', array('Host' => $host), 10);
// If available in HTTPS check also the status code.
if (!in_array($response->code, array(200, 503, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 401), true))
{
throw new
RuntimeException(JText::_('COM_CONFIG_ERROR_SSL_NOT_AVAILABLE_HTTP_CODE'));
}
}
catch (RuntimeException $e)
{
$data['force_ssl'] = 0;
// Also update the user state
$app->setUserState('com_config.config.global.data.force_ssl',
0);
// Inform the user
$app->enqueueMessage(JText::sprintf('COM_CONFIG_ERROR_SSL_NOT_AVAILABLE',
$e->getMessage()), 'warning');
}
}
// Save the rules
if (isset($data['rules']))
{
$rules = new JAccessRules($data['rules']);
// Check that we aren't removing our Super User permission
// Need to get groups from database, since they might have changed
$myGroups =
JAccess::getGroupsByUser(JFactory::getUser()->get('id'));
$myRules = $rules->getData();
$hasSuperAdmin = $myRules['core.admin']->allow($myGroups);
if (!$hasSuperAdmin)
{
$app->enqueueMessage(JText::_('COM_CONFIG_ERROR_REMOVING_SUPER_ADMIN'),
'error');
return false;
}
$asset = JTable::getInstance('asset');
if ($asset->loadByName('root.1'))
{
$asset->rules = (string) $rules;
if (!$asset->check() || !$asset->store())
{
$app->enqueueMessage($asset->getError(), 'error');
return;
}
}
else
{
$app->enqueueMessage(JText::_('COM_CONFIG_ERROR_ROOT_ASSET_NOT_FOUND'),
'error');
return false;
}
unset($data['rules']);
}
// Save the text filters
if (isset($data['filters']))
{
$registry = new Registry(array('filters' =>
$data['filters']));
$extension = JTable::getInstance('extension');
// Get extension_id
$extensionId = $extension->find(array('name' =>
'com_config'));
if ($extension->load((int) $extensionId))
{
$extension->params = (string) $registry;
if (!$extension->check() || !$extension->store())
{
$app->enqueueMessage($extension->getError(), 'error');
return;
}
}
else
{
$app->enqueueMessage(JText::_('COM_CONFIG_ERROR_CONFIG_EXTENSION_NOT_FOUND'),
'error');
return false;
}
unset($data['filters']);
}
// Get the previous configuration.
$prev = new JConfig;
$prev = ArrayHelper::fromObject($prev);
// Merge the new data in. We do this to preserve values that were not in
the form.
$data = array_merge($prev, $data);
/*
* Perform miscellaneous options based on configuration settings/changes.
*/
// Escape the offline message if present.
if (isset($data['offline_message']))
{
$data['offline_message'] =
JFilterOutput::ampReplace($data['offline_message']);
}
// Purge the database session table if we are changing to the database
handler.
if ($prev['session_handler'] != 'database' &&
$data['session_handler'] == 'database')
{
$table = JTable::getInstance('session');
$table->purge(-1);
}
// Set the shared session configuration
if (isset($data['shared_session']))
{
$currentShared = isset($prev['shared_session']) ?
$prev['shared_session'] : '0';
// Has the user enabled shared sessions?
if ($data['shared_session'] == 1 && $currentShared ==
0)
{
// Generate a random shared session name
$data['session_name'] = JUserHelper::genRandomPassword(16);
}
// Has the user disabled shared sessions?
if ($data['shared_session'] == 0 && $currentShared ==
1)
{
// Remove the session name value
unset($data['session_name']);
}
}
if (empty($data['cache_handler']))
{
$data['caching'] = 0;
}
/*
* Look for a custom cache_path
* First check if a path is given in the submitted data, then check if a
path exists in the previous data, otherwise use the default
*/
if (!empty($data['cache_path']))
{
$path = $data['cache_path'];
}
elseif (!empty($prev['cache_path']))
{
$path = $prev['cache_path'];
}
else
{
$path = JPATH_SITE . '/cache';
}
// Give a warning if the cache-folder can not be opened
if ($data['caching'] > 0 &&
$data['cache_handler'] == 'file' &&
@opendir($path) == false)
{
$error = true;
// If a custom path is in use, try using the system default instead of
disabling cache
if ($path !== JPATH_SITE . '/cache' &&
@opendir(JPATH_SITE . '/cache') != false)
{
try
{
JLog::add(
JText::sprintf('COM_CONFIG_ERROR_CUSTOM_CACHE_PATH_NOTWRITABLE_USING_DEFAULT',
$path, JPATH_SITE . '/cache'),
JLog::WARNING,
'jerror'
);
}
catch (RuntimeException $logException)
{
$app->enqueueMessage(
JText::sprintf('COM_CONFIG_ERROR_CUSTOM_CACHE_PATH_NOTWRITABLE_USING_DEFAULT',
$path, JPATH_SITE . '/cache'),
'warning'
);
}
$path = JPATH_SITE . '/cache';
$error = false;
$data['cache_path'] = '';
}
if ($error)
{
try
{
JLog::add(JText::sprintf('COM_CONFIG_ERROR_CACHE_PATH_NOTWRITABLE',
$path), JLog::WARNING, 'jerror');
}
catch (RuntimeException $exception)
{
$app->enqueueMessage(JText::sprintf('COM_CONFIG_ERROR_CACHE_PATH_NOTWRITABLE',
$path), 'warning');
}
$data['caching'] = 0;
}
}
// Did the user remove their custom cache path? Don't save the
variable to the config
if (empty($data['cache_path']))
{
unset($data['cache_path']);
}
// Clean the cache if disabled but previously enabled or changing cache
handlers; these operations use the `$prev` data already in memory
if ((!$data['caching'] && $prev['caching'])
|| $data['cache_handler'] !== $prev['cache_handler'])
{
try
{
JFactory::getCache()->clean();
}
catch (JCacheExceptionConnecting $exception)
{
try
{
JLog::add(JText::_('COM_CONFIG_ERROR_CACHE_CONNECTION_FAILED'),
JLog::WARNING, 'jerror');
}
catch (RuntimeException $logException)
{
$app->enqueueMessage(JText::_('COM_CONFIG_ERROR_CACHE_CONNECTION_FAILED'),
'warning');
}
}
catch (JCacheExceptionUnsupported $exception)
{
try
{
JLog::add(JText::_('COM_CONFIG_ERROR_CACHE_DRIVER_UNSUPPORTED'),
JLog::WARNING, 'jerror');
}
catch (RuntimeException $logException)
{
$app->enqueueMessage(JText::_('COM_CONFIG_ERROR_CACHE_DRIVER_UNSUPPORTED'),
'warning');
}
}
}
// Create the new configuration object.
$config = new Registry($data);
// Overwrite the old FTP credentials with the new ones.
$temp = JFactory::getConfig();
$temp->set('ftp_enable', $data['ftp_enable']);
$temp->set('ftp_host', $data['ftp_host']);
$temp->set('ftp_port', $data['ftp_port']);
$temp->set('ftp_user', $data['ftp_user']);
$temp->set('ftp_pass', $data['ftp_pass']);
$temp->set('ftp_root', $data['ftp_root']);
// Clear cache of com_config component.
$this->cleanCache('_system', 0);
$this->cleanCache('_system', 1);
$result = $dispatcher->trigger('onApplicationBeforeSave',
array($config));
// Store the data.
if (in_array(false, $result, true))
{
throw new
RuntimeException(JText::_('COM_CONFIG_ERROR_UNKNOWN_BEFORE_SAVING'));
}
// Write the configuration file.
$result = $this->writeConfigFile($config);
// Trigger the after save event.
$dispatcher->trigger('onApplicationAfterSave',
array($config));
return $result;
}
/**
* Method to unset the root_user value from configuration data.
*
* This method will load the global configuration data straight from
* JConfig and remove the root_user value for security, then save the
configuration.
*
* @return boolean True on success, false on failure.
*
* @since 1.6
*/
public function removeroot()
{
$dispatcher = JEventDispatcher::getInstance();
// Get the previous configuration.
$prev = new JConfig;
$prev = ArrayHelper::fromObject($prev);
// Create the new configuration object, and unset the root_user property
unset($prev['root_user']);
$config = new Registry($prev);
$result = $dispatcher->trigger('onApplicationBeforeSave',
array($config));
// Store the data.
if (in_array(false, $result, true))
{
throw new
RuntimeException(JText::_('COM_CONFIG_ERROR_UNKNOWN_BEFORE_SAVING'));
}
// Write the configuration file.
$result = $this->writeConfigFile($config);
// Trigger the after save event.
$dispatcher->trigger('onApplicationAfterSave',
array($config));
return $result;
}
/**
* Method to write the configuration to a file.
*
* @param Registry $config A Registry object containing all global
config data.
*
* @return boolean True on success, false on failure.
*
* @since 2.5.4
* @throws RuntimeException
*/
private function writeConfigFile(Registry $config)
{
jimport('joomla.filesystem.path');
jimport('joomla.filesystem.file');
// Set the configuration file path.
$file = JPATH_CONFIGURATION . '/configuration.php';
// Get the new FTP credentials.
$ftp = JClientHelper::getCredentials('ftp', true);
$app = JFactory::getApplication();
// Attempt to make the file writeable if using FTP.
if (!$ftp['enabled'] && JPath::isOwner($file)
&& !JPath::setPermissions($file, '0644'))
{
$app->enqueueMessage(JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'),
'notice');
}
// Attempt to write the configuration file as a PHP class named JConfig.
$configuration = $config->toString('PHP',
array('class' => 'JConfig', 'closingtag'
=> false));
if (!JFile::write($file, $configuration))
{
throw new
RuntimeException(JText::_('COM_CONFIG_ERROR_WRITE_FAILED'));
}
// Invalidates the cached configuration file
if (function_exists('opcache_invalidate'))
{
opcache_invalidate($file);
}
// Attempt to make the file unwriteable if NOT using FTP.
if (!$ftp['enabled'] && JPath::isOwner($file)
&& !JPath::setPermissions($file, '0444'))
{
$app->enqueueMessage(JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'),
'notice');
}
return true;
}
/**
* Method to store the permission values in the asset table.
*
* This method will get an array with permission key value pairs and
transform it
* into json and update the asset table in the database.
*
* @param string $permission Need an array with Permissions
(component, rule, value and title)
*
* @return array A list of result data.
*
* @since 3.5
*/
public function storePermissions($permission = null)
{
$app = JFactory::getApplication();
$user = JFactory::getUser();
if (is_null($permission))
{
// Get data from input.
$permission = array(
'component' => $app->input->get('comp'),
'action' => $app->input->get('action'),
'rule' => $app->input->get('rule'),
'value' => $app->input->get('value'),
'title' => $app->input->get('title',
'', 'RAW')
);
}
// We are creating a new item so we don't have an item id so
don't allow.
if (substr($permission['component'], -6) ===
'.false')
{
$app->enqueueMessage(JText::_('JLIB_RULES_SAVE_BEFORE_CHANGE_PERMISSIONS'),
'error');
return false;
}
// Check if the user is authorized to do this.
if (!$user->authorise('core.admin',
$permission['component']))
{
$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
return false;
}
$permission['component'] =
empty($permission['component']) ? 'root.1' :
$permission['component'];
// Current view is global config?
$isGlobalConfig = $permission['component'] ===
'root.1';
// Check if changed group has Super User permissions.
$isSuperUserGroupBefore =
JAccess::checkGroup($permission['rule'], 'core.admin');
// Check if current user belongs to changed group.
$currentUserBelongsToGroup = in_array((int)
$permission['rule'], $user->groups) ? true : false;
// Get current user groups tree.
$currentUserGroupsTree = JAccess::getGroupsByUser($user->id, true);
// Check if current user belongs to changed group.
$currentUserSuperUser = $user->authorise('core.admin');
// If user is not Super User cannot change the permissions of a group it
belongs to.
if (!$currentUserSuperUser && $currentUserBelongsToGroup)
{
$app->enqueueMessage(JText::_('JLIB_USER_ERROR_CANNOT_CHANGE_OWN_GROUPS'),
'error');
return false;
}
// If user is not Super User cannot change the permissions of a group it
belongs to.
if (!$currentUserSuperUser && in_array((int)
$permission['rule'], $currentUserGroupsTree))
{
$app->enqueueMessage(JText::_('JLIB_USER_ERROR_CANNOT_CHANGE_OWN_PARENT_GROUPS'),
'error');
return false;
}
// If user is not Super User cannot change the permissions of a Super
User Group.
if (!$currentUserSuperUser && $isSuperUserGroupBefore &&
!$currentUserBelongsToGroup)
{
$app->enqueueMessage(JText::_('JLIB_USER_ERROR_CANNOT_CHANGE_SUPER_USER'),
'error');
return false;
}
// If user is not Super User cannot change the Super User permissions in
any group it belongs to.
if ($isSuperUserGroupBefore && $currentUserBelongsToGroup
&& $permission['action'] === 'core.admin')
{
$app->enqueueMessage(JText::_('JLIB_USER_ERROR_CANNOT_DEMOTE_SELF'),
'error');
return false;
}
try
{
$asset = JTable::getInstance('asset');
$result = $asset->loadByName($permission['component']);
if ($result === false)
{
$data = array($permission['action'] =>
array($permission['rule'] => $permission['value']));
$rules = new JAccessRules($data);
$asset->rules = (string) $rules;
$asset->name = (string) $permission['component'];
$asset->title = (string) $permission['title'];
// Get the parent asset id so we have a correct tree.
$parentAsset = JTable::getInstance('Asset');
if (strpos($asset->name, '.') !== false)
{
$assetParts = explode('.', $asset->name);
$parentAsset->loadByName($assetParts[0]);
$parentAssetId = $parentAsset->id;
}
else
{
$parentAssetId = $parentAsset->getRootId();
}
/**
* @to do: incorrect ACL stored
* When changing a permission of an item that doesn't have a row
in the asset table the row a new row is created.
* This works fine for item <-> component <-> global config
scenario and component <-> global config scenario.
* But doesn't work properly for item <-> section(s)
<-> component <-> global config scenario,
* because a wrong parent asset id (the component) is stored.
* Happens when there is no row in the asset table (ex: deleted or not
created on update).
*/
$asset->setLocation($parentAssetId, 'last-child');
}
else
{
// Decode the rule settings.
$temp = json_decode($asset->rules, true);
// Check if a new value is to be set.
if (isset($permission['value']))
{
// Check if we already have an action entry.
if (!isset($temp[$permission['action']]))
{
$temp[$permission['action']] = array();
}
// Check if we already have a rule entry.
if
(!isset($temp[$permission['action']][$permission['rule']]))
{
$temp[$permission['action']][$permission['rule']]
= array();
}
// Set the new permission.
$temp[$permission['action']][$permission['rule']]
= (int) $permission['value'];
// Check if we have an inherited setting.
if ($permission['value'] === '')
{
unset($temp[$permission['action']][$permission['rule']]);
}
// Check if we have any rules.
if (!$temp[$permission['action']])
{
unset($temp[$permission['action']]);
}
}
else
{
// There is no value so remove the action as it's not needed.
unset($temp[$permission['action']]);
}
$asset->rules = json_encode($temp, JSON_FORCE_OBJECT);
}
if (!$asset->check() || !$asset->store())
{
$app->enqueueMessage(JText::_('JLIB_UNKNOWN'),
'error');
return false;
}
}
catch (Exception $e)
{
$app->enqueueMessage($e->getMessage(), 'error');
return false;
}
// All checks done.
$result = array(
'text' => '',
'class' => '',
'result' => true,
);
// Show the current effective calculated permission considering current
group, path and cascade.
try
{
// Get the asset id by the name of the component.
$query = $this->db->getQuery(true)
->select($this->db->quoteName('id'))
->from($this->db->quoteName('#__assets'))
->where($this->db->quoteName('name') . ' =
' . $this->db->quote($permission['component']));
$this->db->setQuery($query);
$assetId = (int) $this->db->loadResult();
// Fetch the parent asset id.
$parentAssetId = null;
/**
* @to do: incorrect info
* When creating a new item (not saving) it uses the calculated
permissions from the component (item <-> component <-> global
config).
* But if we have a section too (item <-> section(s) <->
component <-> global config) this is not correct.
* Also, currently it uses the component permission, but should use the
calculated permissions for achild of the component/section.
*/
// If not in global config we need the parent_id asset to calculate
permissions.
if (!$isGlobalConfig)
{
// In this case we need to get the component rules too.
$query->clear()
->select($this->db->quoteName('parent_id'))
->from($this->db->quoteName('#__assets'))
->where($this->db->quoteName('id') . ' =
' . $assetId);
$this->db->setQuery($query);
$parentAssetId = (int) $this->db->loadResult();
}
// Get the group parent id of the current group.
$query->clear()
->select($this->db->quoteName('parent_id'))
->from($this->db->quoteName('#__usergroups'))
->where($this->db->quoteName('id') . ' = '
. (int) $permission['rule']);
$this->db->setQuery($query);
$parentGroupId = (int) $this->db->loadResult();
// Count the number of child groups of the current group.
$query->clear()
->select('COUNT(' .
$this->db->quoteName('id') . ')')
->from($this->db->quoteName('#__usergroups'))
->where($this->db->quoteName('parent_id') . ' =
' . (int) $permission['rule']);
$this->db->setQuery($query);
$totalChildGroups = (int) $this->db->loadResult();
}
catch (Exception $e)
{
$app->enqueueMessage($e->getMessage(), 'error');
return false;
}
// Clear access statistics.
JAccess::clearStatics();
// After current group permission is changed we need to check again if
the group has Super User permissions.
$isSuperUserGroupAfter =
JAccess::checkGroup($permission['rule'], 'core.admin');
// Get the rule for just this asset (non-recursive) and get the actual
setting for the action for this group.
$assetRule = JAccess::getAssetRules($assetId, false,
false)->allow($permission['action'],
$permission['rule']);
// Get the group, group parent id, and group global config recursive
calculated permission for the chosen action.
$inheritedGroupRule = JAccess::checkGroup($permission['rule'],
$permission['action'], $assetId);
if (!empty($parentAssetId))
{
$inheritedGroupParentAssetRule =
JAccess::checkGroup($permission['rule'],
$permission['action'], $parentAssetId);
}
else
{
$inheritedGroupParentAssetRule = null;
}
$inheritedParentGroupRule = !empty($parentGroupId) ?
JAccess::checkGroup($parentGroupId, $permission['action'],
$assetId) : null;
// Current group is a Super User group, so calculated setting is
"Allowed (Super User)".
if ($isSuperUserGroupAfter)
{
$result['class'] = 'label label-success';
$result['text'] = '<span class="icon-lock
icon-white" aria-hidden="true"></span>' .
JText::_('JLIB_RULES_ALLOWED_ADMIN');
}
// Not super user.
else
{
// First get the real recursive calculated setting and add (Inherited)
to it.
// If recursive calculated setting is "Denied" or null.
Calculated permission is "Not Allowed (Inherited)".
if ($inheritedGroupRule === null || $inheritedGroupRule === false)
{
$result['class'] = 'label label-important';
$result['text'] =
JText::_('JLIB_RULES_NOT_ALLOWED_INHERITED');
}
// If recursive calculated setting is "Allowed". Calculated
permission is "Allowed (Inherited)".
else
{
$result['class'] = 'label label-success';
$result['text'] =
JText::_('JLIB_RULES_ALLOWED_INHERITED');
}
// Second part: Overwrite the calculated permissions labels if there is
an explicit permission in the current group.
/**
* @todo: incorrect info
* If a component has a permission that doesn't exists in global
config (ex: frontend editing in com_modules) by default
* we get "Not Allowed (Inherited)" when we should get
"Not Allowed (Default)".
*/
// If there is an explicit permission "Not Allowed".
Calculated permission is "Not Allowed".
if ($assetRule === false)
{
$result['class'] = 'label label-important';
$result['text'] =
JText::_('JLIB_RULES_NOT_ALLOWED');
}
// If there is an explicit permission is "Allowed". Calculated
permission is "Allowed".
elseif ($assetRule === true)
{
$result['class'] = 'label label-success';
$result['text'] = JText::_('JLIB_RULES_ALLOWED');
}
// Third part: Overwrite the calculated permissions labels for special
cases.
// Global configuration with "Not Set" permission. Calculated
permission is "Not Allowed (Default)".
if (empty($parentGroupId) && $isGlobalConfig === true &&
$assetRule === null)
{
$result['class'] = 'label label-important';
$result['text'] =
JText::_('JLIB_RULES_NOT_ALLOWED_DEFAULT');
}
/**
* Component/Item with explicit "Denied" permission at parent
Asset (Category, Component or Global config) configuration.
* Or some parent group has an explicit "Denied".
* Calculated permission is "Not Allowed (Locked)".
*/
elseif ($inheritedGroupParentAssetRule === false ||
$inheritedParentGroupRule === false)
{
$result['class'] = 'label label-important';
$result['text'] = '<span class="icon-lock
icon-white" aria-hidden="true"></span>' .
JText::_('JLIB_RULES_NOT_ALLOWED_LOCKED');
}
}
// If removed or added super user from group, we need to refresh the page
to recalculate all settings.
if ($isSuperUserGroupBefore != $isSuperUserGroupAfter)
{
$app->enqueueMessage(JText::_('JLIB_RULES_NOTICE_RECALCULATE_GROUP_PERMISSIONS'),
'notice');
}
// If this group has child groups, we need to refresh the page to
recalculate the child settings.
if ($totalChildGroups > 0)
{
$app->enqueueMessage(JText::_('JLIB_RULES_NOTICE_RECALCULATE_GROUP_CHILDS_PERMISSIONS'),
'notice');
}
return $result;
}
/**
* Method to send a test mail which is called via an AJAX request
*
* @return boolean
*
* @since 3.5
* @throws Exception
*/
public function sendTestMail()
{
// Set the new values to test with the current settings
$app = JFactory::getApplication();
$input = $app->input;
$smtppass = $input->get('smtppass', null, 'RAW');
$app->set('smtpauth', $input->get('smtpauth'));
$app->set('smtpuser', $input->get('smtpuser',
'', 'STRING'));
$app->set('smtphost', $input->get('smtphost'));
$app->set('smtpsecure',
$input->get('smtpsecure'));
$app->set('smtpport', $input->get('smtpport'));
$app->set('mailfrom', $input->get('mailfrom',
'', 'STRING'));
$app->set('fromname', $input->get('fromname',
'', 'STRING'));
$app->set('mailer', $input->get('mailer'));
$app->set('mailonline',
$input->get('mailonline'));
// Use smtppass only if it was submitted
if ($smtppass !== null)
{
$app->set('smtppass', $smtppass);
}
$mail = JFactory::getMailer();
// Prepare email and send try to send it
$mailSubject = JText::sprintf('COM_CONFIG_SENDMAIL_SUBJECT',
$app->get('sitename'));
$mailBody = JText::sprintf('COM_CONFIG_SENDMAIL_BODY',
JText::_('COM_CONFIG_SENDMAIL_METHOD_' .
strtoupper($mail->Mailer)));
if ($mail->sendMail($app->get('mailfrom'),
$app->get('fromname'), $app->get('mailfrom'),
$mailSubject, $mailBody) === true)
{
$methodName = JText::_('COM_CONFIG_SENDMAIL_METHOD_' .
strtoupper($mail->Mailer));
// If JMail send the mail using PHP Mail as fallback.
if ($mail->Mailer != $app->get('mailer'))
{
$app->enqueueMessage(JText::sprintf('COM_CONFIG_SENDMAIL_SUCCESS_FALLBACK',
$app->get('mailfrom'), $methodName), 'warning');
}
else
{
$app->enqueueMessage(JText::sprintf('COM_CONFIG_SENDMAIL_SUCCESS',
$app->get('mailfrom'), $methodName), 'message');
}
return true;
}
$app->enqueueMessage(JText::_('COM_CONFIG_SENDMAIL_ERROR'),
'error');
return false;
}
}
PK�[����oomodel/component.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Model for component configuration
*
* @since 3.2
*/
class ConfigModelComponent extends ConfigModelForm
{
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 3.2
*/
protected function populateState()
{
$input = JFactory::getApplication()->input;
// Set the component (option) we are dealing with.
$component = $input->get('component');
$state = $this->loadState();
$state->set('component.option', $component);
// Set an alternative path for the configuration file.
if ($path = $input->getString('path'))
{
$path = JPath::clean(JPATH_SITE . '/' . $path);
JPath::check($path);
$state->set('component.path', $path);
}
$this->setState($state);
}
/**
* Method to get a form object.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data
(default case), false if not.
*
* @return mixed A JForm object on success, false on failure
*
* @since 3.2
*/
public function getForm($data = array(), $loadData = true)
{
$state = $this->getState();
$option = $state->get('component.option');
if ($path = $state->get('component.path'))
{
// Add the search path for the admin component config.xml file.
JForm::addFormPath($path);
}
else
{
// Add the search path for the admin component config.xml file.
JForm::addFormPath(JPATH_ADMINISTRATOR . '/components/' .
$option);
}
// Get the form.
$form = $this->loadForm(
'com_config.component',
'config',
array('control' => 'jform', 'load_data'
=> $loadData),
false,
'/config'
);
if (empty($form))
{
return false;
}
$lang = JFactory::getLanguage();
$lang->load($option, JPATH_BASE, null, false, true)
|| $lang->load($option, JPATH_BASE . "/components/$option",
null, false, true);
return $form;
}
/**
* Get the component information.
*
* @return object
*
* @since 3.2
*/
public function getComponent()
{
$state = $this->getState();
$option = $state->get('component.option');
// Load common and local language files.
$lang = JFactory::getLanguage();
$lang->load($option, JPATH_BASE, null, false, true)
|| $lang->load($option, JPATH_BASE . "/components/$option",
null, false, true);
$result = JComponentHelper::getComponent($option);
return $result;
}
/**
* Method to save the configuration data.
*
* @param array $data An array containing all global config data.
*
* @return boolean True on success, false on failure.
*
* @since 3.2
* @throws RuntimeException
*/
public function save($data)
{
$table = JTable::getInstance('extension');
$dispatcher = JEventDispatcher::getInstance();
$context = $this->option . '.' . $this->name;
JPluginHelper::importPlugin('extension');
// Check super user group.
if (isset($data['params']) &&
!JFactory::getUser()->authorise('core.admin'))
{
$form = $this->getForm(array(), false);
foreach ($form->getFieldsets() as $fieldset)
{
foreach ($form->getFieldset($fieldset->name) as $field)
{
if ($field->type === 'UserGroupList' &&
isset($data['params'][$field->fieldname])
&& (int)
$field->getAttribute('checksuperusergroup', 0) === 1
&&
JAccess::checkGroup($data['params'][$field->fieldname],
'core.admin'))
{
throw new
RuntimeException(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'));
}
}
}
}
// Save the rules.
if (isset($data['params']) &&
isset($data['params']['rules']))
{
if (!JFactory::getUser()->authorise('core.admin',
$data['option']))
{
throw new
RuntimeException(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'));
}
$rules = new JAccessRules($data['params']['rules']);
$asset = JTable::getInstance('asset');
if (!$asset->loadByName($data['option']))
{
$root = JTable::getInstance('asset');
$root->loadByName('root.1');
$asset->name = $data['option'];
$asset->title = $data['option'];
$asset->setLocation($root->id, 'last-child');
}
$asset->rules = (string) $rules;
if (!$asset->check() || !$asset->store())
{
throw new RuntimeException($asset->getError());
}
// We don't need this anymore
unset($data['option']);
unset($data['params']['rules']);
}
// Load the previous Data
if (!$table->load($data['id']))
{
throw new RuntimeException($table->getError());
}
unset($data['id']);
// Bind the data.
if (!$table->bind($data))
{
throw new RuntimeException($table->getError());
}
// Check the data.
if (!$table->check())
{
throw new RuntimeException($table->getError());
}
$result = $dispatcher->trigger('onExtensionBeforeSave',
array($context, $table, false));
// Store the data.
if (in_array(false, $result, true) || !$table->store())
{
throw new RuntimeException($table->getError());
}
// Trigger the after save event.
$dispatcher->trigger('onExtensionAfterSave', array($context,
$table, false));
// Clean the component cache.
$this->cleanCache('_system', 0);
$this->cleanCache('_system', 1);
return true;
}
}
PK�[`%311
model/field/configcomponents.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\Utilities\ArrayHelper;
JFormHelper::loadFieldClass('List');
/**
* Text Filters form field.
*
* @since 3.7.0
*/
class JFormFieldConfigComponents extends JFormFieldList
{
/**
* The form field type.
*
* @var string
* @since 3.7.0
*/
public $type = 'ConfigComponents';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*
* @since 3.7.0
*/
protected function getOptions()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('name AS text, element AS value')
->from('#__extensions')
->where('enabled >= 1')
->where('type =' . $db->quote('component'));
$items = $db->setQuery($query)->loadObjectList();
if ($items)
{
$lang = JFactory::getLanguage();
foreach ($items as &$item)
{
// Load language
$extension = $item->value;
if (JFile::exists(JPATH_ADMINISTRATOR . '/components/' .
$extension . '/config.xml'))
{
$source = JPATH_ADMINISTRATOR . '/components/' . $extension;
$lang->load("$extension.sys", JPATH_ADMINISTRATOR, null,
false, true)
|| $lang->load("$extension.sys", $source, null, false,
true);
// Translate component name
$item->text = JText::_($item->text);
}
else
{
$item = null;
}
}
// Sort by component name
$items = ArrayHelper::sortObjects(array_filter($items),
'text', 1, true, true);
}
// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), $items);
return $options;
}
}
PK�[=�4fmodel/field/filters.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Text Filters form field.
*
* @since 1.6
*/
class JFormFieldFilters extends JFormField
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
public $type = 'Filters';
/**
* Method to get the field input markup.
*
* TODO: Add access check.
*
* @return string The field input markup.
*
* @since 1.6
*/
protected function getInput()
{
// Load Framework
JHtml::_('jquery.framework');
// Add translation string for notification
JText::script('COM_CONFIG_TEXT_FILTERS_NOTE');
// Add Javascript
$doc = JFactory::getDocument();
$doc->addScriptDeclaration('
jQuery( document ).ready(function( $ ) {
$("#filter-config select").change(function() {
var currentFilter =
$(this).children("option:selected").val();
if($(this).children("option:selected").val() ===
"NONE") {
var child = $("#filter-config select[data-parent=" +
$(this).attr("data-id") + "]");
while(child.length !== 0) {
if(child.children("option:selected").val() !==
"NONE") {
alert(Joomla.JText._("COM_CONFIG_TEXT_FILTERS_NOTE"));
break;
}
child = $("#filter-config select[data-parent=" +
child.attr("data-id") + "]");
}
return;
}
var parent = $("#filter-config select[data-id=" +
$(this).attr("data-parent") + "]");
while(parent.length !== 0) {
if(parent.children("option:selected").val() ===
"NONE") {
alert(Joomla.JText._("COM_CONFIG_TEXT_FILTERS_NOTE"));
break;
}
parent = $("#filter-config select[data-id=" +
parent.attr("data-parent") + "]")
}
});
});
');
// Get the available user groups.
$groups = $this->getUserGroups();
// Build the form control.
$html = array();
// Open the table.
$html[] = '<table id="filter-config" class="table
table-striped">';
// The table heading.
$html[] = ' <thead>';
$html[] = ' <tr>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action">' .
JText::_('JGLOBAL_FILTER_GROUPS_LABEL') .
'</span>';
$html[] = ' </th>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action">' .
JText::_('JGLOBAL_FILTER_TYPE_LABEL') .
'</span>';
$html[] = ' </th>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action">' .
JText::_('JGLOBAL_FILTER_TAGS_LABEL') .
'</span>';
$html[] = ' </th>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action">' .
JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') .
'</span>';
$html[] = ' </th>';
$html[] = ' </tr>';
$html[] = ' </thead>';
// The table body.
$html[] = ' <tbody>';
foreach ($groups as $group)
{
if (!isset($this->value[$group->value]))
{
$this->value[$group->value] = array('filter_type' =>
'BL', 'filter_tags' => '',
'filter_attributes' => '');
}
$group_filter = $this->value[$group->value];
$group_filter['filter_tags'] =
!empty($group_filter['filter_tags']) ?
$group_filter['filter_tags'] : '';
$group_filter['filter_attributes'] =
!empty($group_filter['filter_attributes']) ?
$group_filter['filter_attributes'] : '';
$html[] = ' <tr>';
$html[] = ' <td class="acl-groups left">';
$html[] = ' ' .
JLayoutHelper::render('joomla.html.treeprefix',
array('level' => $group->level + 1)) . $group->text;
$html[] = ' </td>';
$html[] = ' <td>';
$html[] = ' <select'
. ' name="' . $this->name . '[' .
$group->value . '][filter_type]"'
. ' id="' . $this->id . $group->value .
'_filter_type"'
. ' data-parent="' . ($group->parent) . '"
'
. ' data-id="' . ($group->value) . '"
'
. ' class="novalidate"'
. '>';
$html[] = ' <option value="BL"' .
($group_filter['filter_type'] == 'BL' ? '
selected="selected"' : '') . '>'
. JText::_('COM_CONFIG_FIELD_FILTERS_DEFAULT_BLACK_LIST') .
'</option>';
$html[] = ' <option value="CBL"' .
($group_filter['filter_type'] == 'CBL' ? '
selected="selected"' : '') . '>'
. JText::_('COM_CONFIG_FIELD_FILTERS_CUSTOM_BLACK_LIST') .
'</option>';
$html[] = ' <option value="WL"' .
($group_filter['filter_type'] == 'WL' ? '
selected="selected"' : '') . '>'
. JText::_('COM_CONFIG_FIELD_FILTERS_WHITE_LIST') .
'</option>';
$html[] = ' <option value="NH"' .
($group_filter['filter_type'] == 'NH' ? '
selected="selected"' : '') . '>'
. JText::_('COM_CONFIG_FIELD_FILTERS_NO_HTML') .
'</option>';
$html[] = ' <option value="NONE"' .
($group_filter['filter_type'] == 'NONE' ? '
selected="selected"' : '') . '>'
. JText::_('COM_CONFIG_FIELD_FILTERS_NO_FILTER') .
'</option>';
$html[] = ' </select>';
$html[] = ' </td>';
$html[] = ' <td>';
$html[] = ' <input'
. ' name="' . $this->name . '[' .
$group->value . '][filter_tags]"'
. ' type="text"'
. ' id="' . $this->id . $group->value .
'_filter_tags" class="novalidate"'
. ' value="' .
htmlspecialchars($group_filter['filter_tags'], ENT_QUOTES) .
'"'
. '/>';
$html[] = ' </td>';
$html[] = ' <td>';
$html[] = ' <input'
. ' name="' . $this->name . '[' .
$group->value . '][filter_attributes]"'
. ' type="text"'
. ' id="' . $this->id . $group->value .
'_filter_attributes" class="novalidate"'
. ' value="' .
htmlspecialchars($group_filter['filter_attributes'], ENT_QUOTES)
. '"'
. '/>';
$html[] = ' </td>';
$html[] = ' </tr>';
}
$html[] = ' </tbody>';
// Close the table.
$html[] = '</table>';
// Add notes
$html[] = '<div class="alert">';
$html[] = '<p>' .
JText::_('JGLOBAL_FILTER_TYPE_DESC') . '</p>';
$html[] = '<p>' .
JText::_('JGLOBAL_FILTER_TAGS_DESC') . '</p>';
$html[] = '<p>' .
JText::_('JGLOBAL_FILTER_ATTRIBUTES_DESC') .
'</p>';
$html[] = '</div>';
return implode("\n", $html);
}
/**
* A helper to get the list of user groups.
*
* @return array
*
* @since 1.6
*/
protected function getUserGroups()
{
// Get a database object.
$db = JFactory::getDbo();
// Get the user groups from the database.
$query = $db->getQuery(true);
$query->select('a.id AS value, a.title AS text, COUNT(DISTINCT
b.id) AS level, a.parent_id as parent');
$query->from('#__usergroups AS a');
$query->join('LEFT', '#__usergroups AS b on a.lft >
b.lft AND a.rgt < b.rgt');
$query->group('a.id, a.title, a.lft');
$query->order('a.lft ASC');
$db->setQuery($query);
$options = $db->loadObjectList();
return $options;
}
}
PK�[�5���u�umodel/form/application.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<form>
<fieldset
name="cache"
label="COM_CONFIG_CACHE_SETTINGS_LABEL">
<field
name="cache_handler"
type="cachehandler"
label="COM_CONFIG_FIELD_CACHE_HANDLER_LABEL"
description="COM_CONFIG_FIELD_CACHE_HANDLER_DESC"
default=""
filter="word"
/>
<field
name="cache_path"
type="text"
label="COM_CONFIG_FIELD_CACHE_PATH_LABEL"
description="COM_CONFIG_FIELD_CACHE_PATH_DESC"
showon="cache_handler:file"
filter="string"
size="50"
/>
<field
name="memcache_persist"
type="radio"
label="COM_CONFIG_FIELD_MEMCACHE_PERSISTENT_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_PERSISTENT_DESC"
class="btn-group btn-group-yesno"
default="1"
showon="cache_handler:memcache"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="memcache_compress"
type="radio"
label="COM_CONFIG_FIELD_MEMCACHE_COMPRESSION_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_COMPRESSION_DESC"
class="btn-group btn-group-yesno"
default="0"
showon="cache_handler:memcache"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="memcache_server_host"
type="text"
label="COM_CONFIG_FIELD_MEMCACHE_HOST_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_HOST_DESC"
default="localhost"
showon="cache_handler:memcache"
filter="string"
size="25"
/>
<field
name="memcache_server_port"
type="number"
label="COM_CONFIG_FIELD_MEMCACHE_PORT_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_PORT_DESC"
showon="cache_handler:memcache"
min="1"
max="65535"
default="11211"
filter="integer"
validate="number"
size="5"
/>
<field
name="memcached_persist"
type="radio"
label="COM_CONFIG_FIELD_MEMCACHE_PERSISTENT_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_PERSISTENT_DESC"
class="btn-group btn-group-yesno"
default="1"
showon="cache_handler:memcached"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="memcached_compress"
type="radio"
label="COM_CONFIG_FIELD_MEMCACHE_COMPRESSION_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_COMPRESSION_DESC"
class="btn-group btn-group-yesno"
default="0"
showon="cache_handler:memcached"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="memcached_server_host"
type="text"
label="COM_CONFIG_FIELD_MEMCACHE_HOST_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_HOST_DESC"
default="localhost"
showon="cache_handler:memcached"
filter="string"
size="25"
/>
<field
name="memcached_server_port"
type="number"
label="COM_CONFIG_FIELD_MEMCACHE_PORT_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_PORT_DESC"
showon="cache_handler:memcached"
min="1"
max="65535"
default="11211"
filter="integer"
validate="number"
size="5"
/>
<field
name="redis_persist"
type="radio"
label="COM_CONFIG_FIELD_REDIS_PERSISTENT_LABEL"
description="COM_CONFIG_FIELD_REDIS_PERSISTENT_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
showon="cache_handler:redis"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="redis_server_host"
type="text"
label="COM_CONFIG_FIELD_REDIS_HOST_LABEL"
description="COM_CONFIG_FIELD_REDIS_HOST_DESC"
default="localhost"
filter="string"
showon="cache_handler:redis"
size="25"
/>
<field
name="redis_server_port"
type="number"
label="COM_CONFIG_FIELD_REDIS_PORT_LABEL"
description="COM_CONFIG_FIELD_REDIS_PORT_DESC"
showon="cache_handler:redis"
min="1"
max="65535"
default="6379"
filter="integer"
validate="number"
size="5"
/>
<field
name="redis_server_auth"
type="password"
label="COM_CONFIG_FIELD_REDIS_AUTH_LABEL"
description="COM_CONFIG_FIELD_REDIS_AUTH_DESC"
filter="raw"
showon="cache_handler:redis"
autocomplete="off"
size="30"
hint="***************"
lock="true"
/>
<field
name="redis_server_db"
type="number"
label="COM_CONFIG_FIELD_REDIS_DB_LABEL"
description="COM_CONFIG_FIELD_REDIS_DB_DESC"
default="0"
filter="integer"
showon="cache_handler:redis"
size="4"
/>
<field
name="cachetime"
type="number"
label="COM_CONFIG_FIELD_CACHE_TIME_LABEL"
description="COM_CONFIG_FIELD_CACHE_TIME_DESC"
min="1"
default="15"
filter="integer"
validate="number"
size="6"
/>
<field
name="cache_platformprefix"
type="radio"
label="COM_CONFIG_FIELD_CACHE_PLATFORMPREFIX_LABEL"
description="COM_CONFIG_FIELD_CACHE_PLATFORMPREFIX_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="caching"
type="list"
label="COM_CONFIG_FIELD_CACHE_LABEL"
description="COM_CONFIG_FIELD_CACHE_DESC"
default="2"
filter="integer"
>
<option
value="0">COM_CONFIG_FIELD_VALUE_CACHE_OFF</option>
<option
value="1">COM_CONFIG_FIELD_VALUE_CACHE_CONSERVATIVE</option>
<option
value="2">COM_CONFIG_FIELD_VALUE_CACHE_PROGRESSIVE</option>
</field>
</fieldset>
<fieldset
name="memcache"
label="COM_CONFIG_MEMCACHE_SETTINGS_LABEL">
</fieldset>
<fieldset
name="database"
label="CONFIG_DATABASE_SETTINGS_LABEL">
<field
name="dbtype"
type="databaseconnection"
label="COM_CONFIG_FIELD_DATABASE_TYPE_LABEL"
description="COM_CONFIG_FIELD_DATABASE_TYPE_DESC"
supported="mysql,mysqli,pgsql,pdomysql,postgresql,sqlsrv,sqlazure"
filter="string"
/>
<field
name="host"
type="text"
label="COM_CONFIG_FIELD_DATABASE_HOST_LABEL"
description="COM_CONFIG_FIELD_DATABASE_HOST_DESC"
required="true"
filter="string"
size="30"
/>
<field
name="user"
type="text"
label="COM_CONFIG_FIELD_DATABASE_USERNAME_LABEL"
description="COM_CONFIG_FIELD_DATABASE_USERNAME_DESC"
required="true"
filter="string"
size="30"
/>
<field
name="password"
type="password"
label="COM_CONFIG_FIELD_DATABASE_PASSWORD_LABEL"
description="COM_CONFIG_FIELD_DATABASE_PASSWORD_DESC"
filter="raw"
autocomplete="off"
size="30"
lock="true"
/>
<field
name="db"
type="text"
label="COM_CONFIG_FIELD_DATABASE_NAME_LABEL"
description="COM_CONFIG_FIELD_DATABASE_NAME_DESC"
required="true"
filter="string"
size="30"
/>
<field
name="dbprefix"
type="text"
label="COM_CONFIG_FIELD_DATABASE_PREFIX_LABEL"
description="COM_CONFIG_FIELD_DATABASE_PREFIX_DESC"
default="jos_"
filter="string"
size="10"
/>
</fieldset>
<fieldset
name="debug"
label="CONFIG_DEBUG_SETTINGS_LABEL">
<field
name="debug"
type="radio"
label="COM_CONFIG_FIELD_DEBUG_SYSTEM_LABEL"
description="COM_CONFIG_FIELD_DEBUG_SYSTEM_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="debug_lang"
type="radio"
label="COM_CONFIG_FIELD_DEBUG_LANG_LABEL"
description="COM_CONFIG_FIELD_DEBUG_LANG_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="debug_lang_const"
type="radio"
label="COM_CONFIG_FIELD_DEBUG_CONST_LANG_LABEL"
description="COM_CONFIG_FIELD_DEBUG_CONST_LANG_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
showon="debug_lang:1"
>
<option
value="0">COM_CONFIG_FIELD_DEBUG_CONST</option>
<option
value="1">COM_CONFIG_FIELD_DEBUG_VALUE</option>
</field>
</fieldset>
<fieldset name="ftp"
label="CONFIG_FTP_SETTINGS_LABEL">
<field
name="ftp_enable"
type="radio"
label="COM_CONFIG_FIELD_FTP_ENABLE_LABEL"
description="COM_CONFIG_FIELD_FTP_ENABLE_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="ftp_host"
type="text"
label="COM_CONFIG_FIELD_FTP_HOST_LABEL"
description="COM_CONFIG_FIELD_FTP_HOST_DESC"
filter="string"
showon="ftp_enable:1"
size="14"
/>
<field
name="ftp_port"
type="number"
label="COM_CONFIG_FIELD_FTP_PORT_LABEL"
description="COM_CONFIG_FIELD_FTP_PORT_DESC"
showon="ftp_enable:1"
min="1"
max="65535"
hint="21"
validate="number"
filter="integer"
size="5"
/>
<field
name="ftp_user"
type="text"
label="COM_CONFIG_FIELD_FTP_USERNAME_LABEL"
description="COM_CONFIG_FIELD_FTP_USERNAME_DESC"
filter="string"
showon="ftp_enable:1"
autocomplete="off"
size="25"
/>
<field
name="ftp_pass"
type="password"
label="COM_CONFIG_FIELD_FTP_PASSWORD_LABEL"
description="COM_CONFIG_FIELD_FTP_PASSWORD_DESC"
filter="raw"
showon="ftp_enable:1"
autocomplete="off"
size="25"
lock="true"
/>
<field
name="ftp_root"
type="text"
label="COM_CONFIG_FIELD_FTP_ROOT_LABEL"
description="COM_CONFIG_FIELD_FTP_ROOT_DESC"
showon="ftp_enable:1"
filter="string"
size="50"
/>
</fieldset>
<fieldset
name="proxy"
label="CONFIG_PROXY_SETTINGS_LABEL">
<field
name="proxy_enable"
type="radio"
label="COM_CONFIG_FIELD_PROXY_ENABLE_LABEL"
description="COM_CONFIG_FIELD_PROXY_ENABLE_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="proxy_host"
type="text"
label="COM_CONFIG_FIELD_PROXY_HOST_LABEL"
description="COM_CONFIG_FIELD_PROXY_HOST_DESC"
filter="string"
showon="proxy_enable:1"
size="14"
/>
<field
name="proxy_port"
type="number"
label="COM_CONFIG_FIELD_PROXY_PORT_LABEL"
description="COM_CONFIG_FIELD_PROXY_PORT_DESC"
showon="proxy_enable:1"
min="1"
max="65535"
hint="8080"
validate="number"
filter="integer"
size="5"
/>
<field
name="proxy_user"
type="text"
label="COM_CONFIG_FIELD_PROXY_USERNAME_LABEL"
description="COM_CONFIG_FIELD_PROXY_USERNAME_DESC"
filter="string"
showon="proxy_enable:1"
autocomplete="off"
size="25"
/>
<field
name="proxy_pass"
type="password"
label="COM_CONFIG_FIELD_PROXY_PASSWORD_LABEL"
description="COM_CONFIG_FIELD_PROXY_PASSWORD_DESC"
filter="raw"
showon="proxy_enable:1"
autocomplete="off"
size="25"
lock="true"
/>
</fieldset>
<fieldset
name="locale"
label="CONFIG_LOCATION_SETTINGS_LABEL">
<field
name="offset"
type="timezone"
label="COM_CONFIG_FIELD_SERVER_TIMEZONE_LABEL"
description="COM_CONFIG_FIELD_SERVER_TIMEZONE_DESC"
default="UTC"
>
<option
value="UTC">JLIB_FORM_VALUE_TIMEZONE_UTC</option>
</field>
</fieldset>
<fieldset
name="mail"
label="CONFIG_MAIL_SETTINGS_LABEL">
<field
name="mailonline"
type="radio"
label="COM_CONFIG_FIELD_MAIL_MAILONLINE_LABEL"
description="COM_CONFIG_FIELD_MAIL_MAILONLINE_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="massmailoff"
type="radio"
label="COM_CONFIG_FIELD_MAIL_MASSMAILOFF_LABEL"
description="COM_CONFIG_FIELD_MAIL_MASSMAILOFF_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
showon="mailonline:1"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="mailfrom"
type="email"
label="COM_CONFIG_FIELD_MAIL_FROM_EMAIL_LABEL"
description="COM_CONFIG_FIELD_MAIL_FROM_EMAIL_DESC"
filter="string"
size="30"
validate="email"
showon="mailonline:1"
/>
<field
name="fromname"
type="text"
label="COM_CONFIG_FIELD_MAIL_FROM_NAME_LABEL"
description="COM_CONFIG_FIELD_MAIL_FROM_NAME_DESC"
filter="string"
size="30"
showon="mailonline:1"
/>
<field
name="replyto"
type="email"
label="COM_CONFIG_FIELD_MAIL_REPLY_TO_EMAIL_LABEL"
description="COM_CONFIG_FIELD_MAIL_REPLY_TO_EMAIL_DESC"
filter="string"
size="30"
validate="email"
showon="mailonline:1"
/>
<field
name="replytoname"
type="text"
label="COM_CONFIG_FIELD_MAIL_REPLY_TO_NAME_LABEL"
description="COM_CONFIG_FIELD_MAIL_REPLY_TO_NAME_DESC"
filter="string"
size="30"
showon="mailonline:1"
/>
<field
name="mailer"
type="list"
label="COM_CONFIG_FIELD_MAIL_MAILER_LABEL"
description="COM_CONFIG_FIELD_MAIL_MAILER_DESC"
default="mail"
filter="word"
showon="mailonline:1"
>
<option
value="mail">COM_CONFIG_FIELD_VALUE_PHP_MAIL</option>
<option
value="sendmail">COM_CONFIG_FIELD_VALUE_SENDMAIL</option>
<option
value="smtp">COM_CONFIG_FIELD_VALUE_SMTP</option>
</field>
<field
name="sendmail"
type="text"
label="COM_CONFIG_FIELD_MAIL_SENDMAIL_PATH_LABEL"
description="COM_CONFIG_FIELD_MAIL_SENDMAIL_PATH_DESC"
default="/usr/sbin/sendmail"
showon="mailonline:1[AND]mailer:sendmail"
filter="string"
size="30"
/>
<field
name="smtphost"
type="text"
label="COM_CONFIG_FIELD_MAIL_SMTP_HOST_LABEL"
description="COM_CONFIG_FIELD_MAIL_SMTP_HOST_DESC"
default="localhost"
showon="mailonline:1[AND]mailer:smtp"
filter="string"
size="30"
/>
<field
name="smtpport"
type="number"
label="COM_CONFIG_FIELD_MAIL_SMTP_PORT_LABEL"
description="COM_CONFIG_FIELD_MAIL_SMTP_PORT_DESC"
showon="mailonline:1[AND]mailer:smtp"
min="1"
max="65535"
default="25"
hint="25"
validate="number"
filter="integer"
size="5"
/>
<field
name="smtpsecure"
type="list"
label="COM_CONFIG_FIELD_MAIL_SMTP_SECURE_LABEL"
description="COM_CONFIG_FIELD_MAIL_SMTP_SECURE_DESC"
default="none"
showon="mailonline:1[AND]mailer:smtp"
filter="word"
>
<option
value="none">COM_CONFIG_FIELD_VALUE_NONE</option>
<option
value="ssl">COM_CONFIG_FIELD_VALUE_SSL</option>
<option
value="tls">COM_CONFIG_FIELD_VALUE_TLS</option>
</field>
<field
name="smtpauth"
type="radio"
label="COM_CONFIG_FIELD_MAIL_SMTP_AUTH_LABEL"
description="COM_CONFIG_FIELD_MAIL_SMTP_AUTH_DESC"
class="btn-group btn-group-yesno"
default="0"
showon="mailonline:1[AND]mailer:smtp"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="smtpuser"
type="text"
label="COM_CONFIG_FIELD_MAIL_SMTP_USERNAME_LABEL"
description="COM_CONFIG_FIELD_MAIL_SMTP_USERNAME_DESC"
showon="mailonline:1[AND]mailer:smtp[AND]smtpauth:1"
filter="string"
autocomplete="off"
size="30"
/>
<field
name="smtppass"
type="password"
label="COM_CONFIG_FIELD_MAIL_SMTP_PASSWORD_LABEL"
description="COM_CONFIG_FIELD_MAIL_SMTP_PASSWORD_DESC"
showon="mailonline:1[AND]mailer:smtp[AND]smtpauth:1"
filter="raw"
autocomplete="off"
size="30"
lock="true"
/>
</fieldset>
<fieldset
name="metadata"
label="COM_CONFIG_METADATA_SETTINGS">
<field
name="MetaDesc"
type="textarea"
label="COM_CONFIG_FIELD_METADESC_LABEL"
description="COM_CONFIG_FIELD_METADESC_DESC"
filter="string"
cols="60"
rows="3"
/>
<field
name="MetaKeys"
type="textarea"
label="COM_CONFIG_FIELD_METAKEYS_LABEL"
description="COM_CONFIG_FIELD_METAKEYS_DESC"
filter="string"
cols="60"
rows="3"
/>
<field
name="robots"
type="list"
label="JFIELD_METADATA_ROBOTS_LABEL"
description="JFIELD_METADATA_ROBOTS_DESC"
default=""
>
<option value="">index, follow</option>
<option value="noindex, follow"></option>
<option value="index, nofollow"></option>
<option value="noindex, nofollow"></option>
</field>
<field
name="MetaRights"
type="textarea"
label="JFIELD_META_RIGHTS_LABEL"
description="JFIELD_META_RIGHTS_DESC"
filter="string"
cols="60"
rows="2"
/>
<field
name="MetaAuthor"
type="radio"
label="COM_CONFIG_FIELD_METAAUTHOR_LABEL"
description="COM_CONFIG_FIELD_METAAUTHOR_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="MetaVersion"
type="radio"
label="COM_CONFIG_FIELD_METAVERSION_LABEL"
description="COM_CONFIG_FIELD_METAVERSION_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
</fieldset>
<fieldset
name="seo"
label="CONFIG_SEO_SETTINGS_LABEL">
<field
name="sef"
type="radio"
label="COM_CONFIG_FIELD_SEF_URL_LABEL"
description="COM_CONFIG_FIELD_SEF_URL_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="sef_rewrite"
type="radio"
label="COM_CONFIG_FIELD_SEF_REWRITE_LABEL"
description="COM_CONFIG_FIELD_SEF_REWRITE_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
showon="sef:1"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="sef_suffix"
type="radio"
label="COM_CONFIG_FIELD_SEF_SUFFIX_LABEL"
description="COM_CONFIG_FIELD_SEF_SUFFIX_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
showon="sef:1"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="unicodeslugs"
type="radio"
label="COM_CONFIG_FIELD_UNICODESLUGS_LABEL"
description="COM_CONFIG_FIELD_UNICODESLUGS_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
showon="sef:1"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="sitename_pagetitles"
type="list"
label="COM_CONFIG_FIELD_SITENAME_PAGETITLES_LABEL"
description="COM_CONFIG_FIELD_SITENAME_PAGETITLES_DESC"
default="0"
filter="integer"
>
<option
value="2">COM_CONFIG_FIELD_VALUE_AFTER</option>
<option
value="1">COM_CONFIG_FIELD_VALUE_BEFORE</option>
<option value="0">JNO</option>
</field>
</fieldset>
<fieldset
name="server"
label="CONFIG_SERVER_SETTINGS_LABEL">
<field
name="tmp_path"
type="text"
label="COM_CONFIG_FIELD_TEMP_PATH_LABEL"
description="COM_CONFIG_FIELD_TEMP_PATH_DESC"
filter="string"
size="50"
/>
<field
name="gzip"
type="radio"
label="COM_CONFIG_FIELD_GZIP_COMPRESSION_LABEL"
description="COM_CONFIG_FIELD_GZIP_COMPRESSION_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="error_reporting"
type="list"
label="COM_CONFIG_FIELD_ERROR_REPORTING_LABEL"
description="COM_CONFIG_FIELD_ERROR_REPORTING_DESC"
default="default"
filter="cmd"
>
<option
value="default">COM_CONFIG_FIELD_VALUE_SYSTEM_DEFAULT</option>
<option
value="none">COM_CONFIG_FIELD_VALUE_NONE</option>
<option
value="simple">COM_CONFIG_FIELD_VALUE_SIMPLE</option>
<option
value="maximum">COM_CONFIG_FIELD_VALUE_MAXIMUM</option>
<option
value="development">COM_CONFIG_FIELD_VALUE_DEVELOPMENT</option>
</field>
<field
name="force_ssl"
type="list"
label="COM_CONFIG_FIELD_FORCE_SSL_LABEL"
description="COM_CONFIG_FIELD_FORCE_SSL_DESC"
default="-1"
filter="integer"
>
<option
value="0">COM_CONFIG_FIELD_VALUE_NONE</option>
<option
value="1">COM_CONFIG_FIELD_VALUE_ADMINISTRATOR_ONLY</option>
<option
value="2">COM_CONFIG_FIELD_VALUE_ENTIRE_SITE</option>
</field>
</fieldset>
<fieldset
name="session"
label="CONFIG_SESSION_SETTINGS_LABEL">
<field
name="session_handler"
type="sessionhandler"
label="COM_CONFIG_FIELD_SESSION_HANDLER_LABEL"
description="COM_CONFIG_FIELD_SESSION_HANDLER_DESC"
default="none"
filter="word"
/>
<field
name="session_memcache_server_host"
type="text"
label="COM_CONFIG_FIELD_MEMCACHE_HOST_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_HOST_DESC"
default="localhost"
filter="string"
showon="session_handler:memcache"
size="25"
/>
<field
name="session_memcache_server_port"
type="number"
label="COM_CONFIG_FIELD_MEMCACHE_PORT_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_PORT_DESC"
showon="session_handler:memcache"
min="1"
max="65535"
default="11211"
validate="number"
filter="integer"
size="5"
/>
<field
name="session_memcached_server_host"
type="text"
label="COM_CONFIG_FIELD_MEMCACHE_HOST_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_HOST_DESC"
default="localhost"
filter="string"
showon="session_handler:memcached"
size="25"
/>
<field
name="session_memcached_server_port"
type="number"
label="COM_CONFIG_FIELD_MEMCACHE_PORT_LABEL"
description="COM_CONFIG_FIELD_MEMCACHE_PORT_DESC"
showon="session_handler:memcached"
min="1"
max="65535"
default="11211"
validate="number"
filter="integer"
size="5"
/>
<field
name="session_redis_persist"
type="radio"
label="COM_CONFIG_FIELD_REDIS_PERSISTENT_LABEL"
description="COM_CONFIG_FIELD_REDIS_PERSISTENT_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
showon="session_handler:redis"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="session_redis_server_host"
type="text"
label="COM_CONFIG_FIELD_REDIS_HOST_LABEL"
description="COM_CONFIG_FIELD_REDIS_HOST_DESC"
default="localhost"
filter="string"
showon="session_handler:redis"
size="25"
/>
<field
name="session_redis_server_port"
type="number"
label="COM_CONFIG_FIELD_REDIS_PORT_LABEL"
description="COM_CONFIG_FIELD_REDIS_PORT_DESC"
showon="session_handler:redis"
min="1"
max="65535"
default="6379"
validate="number"
filter="integer"
size="5"
/>
<field
name="session_redis_server_auth"
type="password"
label="COM_CONFIG_FIELD_REDIS_AUTH_LABEL"
description="COM_CONFIG_FIELD_REDIS_AUTH_DESC"
filter="raw"
showon="session_handler:redis"
autocomplete="off"
size="30"
lock="true"
/>
<field
name="session_redis_server_db"
type="number"
label="COM_CONFIG_FIELD_REDIS_DB_LABEL"
description="COM_CONFIG_FIELD_REDIS_DB_DESC"
default="0"
filter="integer"
showon="session_handler:redis"
size="4"
/>
<field
name="lifetime"
type="number"
label="COM_CONFIG_FIELD_SESSION_TIME_LABEL"
description="COM_CONFIG_FIELD_SESSION_TIME_DESC"
min="1"
max="16383"
default="15"
filter="integer"
validate="number"
size="6"
/>
<field
name="shared_session"
type="radio"
label="COM_CONFIG_FIELD_SHARED_SESSION_LABEL"
description="COM_CONFIG_FIELD_SHARED_SESSION_DESC"
class="btn-group btn-group-yesno"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
</fieldset>
<fieldset
name="site"
label="CONFIG_SITE_SETTINGS_LABEL">
<field
name="sitename"
type="text"
label="COM_CONFIG_FIELD_SITE_NAME_LABEL"
description="COM_CONFIG_FIELD_SITE_NAME_DESC"
required="true"
filter="string"
size="50"
/>
<field
name="offline"
type="radio"
label="COM_CONFIG_FIELD_SITE_OFFLINE_LABEL"
description="COM_CONFIG_FIELD_SITE_OFFLINE_DESC"
class="btn-group btn-group-yesno btn-group-reversed"
default="0"
filter="integer"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="display_offline_message"
type="list"
label="COM_CONFIG_FIELD_SITE_DISPLAY_MESSAGE_LABEL"
description="COM_CONFIG_FIELD_SITE_DISPLAY_MESSAGE_DESC"
default="1"
filter="integer"
showon="offline:1"
>
<option value="0">JHIDE</option>
<option
value="1">COM_CONFIG_FIELD_VALUE_DISPLAY_OFFLINE_MESSAGE_CUSTOM</option>
<option
value="2">COM_CONFIG_FIELD_VALUE_DISPLAY_OFFLINE_MESSAGE_LANGUAGE</option>
</field>
<field
name="offline_message"
type="textarea"
label="COM_CONFIG_FIELD_OFFLINE_MESSAGE_LABEL"
description="COM_CONFIG_FIELD_OFFLINE_MESSAGE_DESC"
filter="safehtml"
cols="60"
rows="2"
showon="offline:1[AND]display_offline_message:1"
/>
<field
name="offline_image"
type="media"
label="COM_CONFIG_FIELD_OFFLINE_IMAGE_LABEL"
description="COM_CONFIG_FIELD_OFFLINE_IMAGE_DESC"
showon="offline:1"
/>
<field
name="frontediting"
type="list"
label="COM_CONFIG_FRONTEDITING_LABEL"
description="COM_CONFIG_FRONTEDITING_DESC"
default="1"
filter="integer"
>
<option
value="2">COM_CONFIG_FRONTEDITING_MENUSANDMODULES</option>
<option
value="1">COM_CONFIG_FRONTEDITING_MODULES</option>
<option value="0">JNONE</option>
</field>
<field
name="editor"
type="plugins"
label="COM_CONFIG_FIELD_DEFAULT_EDITOR_LABEL"
description="COM_CONFIG_FIELD_DEFAULT_EDITOR_DESC"
folder="editors"
default="tinymce"
filter="cmd"
/>
<field
name="captcha"
type="plugins"
label="COM_CONFIG_FIELD_DEFAULT_CAPTCHA_LABEL"
description="COM_CONFIG_FIELD_DEFAULT_CAPTCHA_DESC"
folder="captcha"
default="0"
filter="cmd"
>
<option value="0">JOPTION_DO_NOT_USE</option>
</field>
<field
name="access"
type="accesslevel"
label="COM_CONFIG_FIELD_DEFAULT_ACCESS_LEVEL_LABEL"
description="COM_CONFIG_FIELD_DEFAULT_ACCESS_LEVEL_DESC"
default="1"
filter="integer"
/>
<field
name="list_limit"
type="list"
label="COM_CONFIG_FIELD_DEFAULT_LIST_LIMIT_LABEL"
description="COM_CONFIG_FIELD_DEFAULT_LIST_LIMIT_DESC"
default="20"
filter="integer"
>
<option value="5">J5</option>
<option value="10">J10</option>
<option value="15">J15</option>
<option value="20">J20</option>
<option value="25">J25</option>
<option value="30">J30</option>
<option value="50">J50</option>
<option value="100">J100</option>
<option value="200">J200</option>
<option value="500">J500</option>
</field>
<field
name="feed_limit"
type="list"
label="COM_CONFIG_FIELD_DEFAULT_FEED_LIMIT_LABEL"
description="COM_CONFIG_FIELD_DEFAULT_FEED_LIMIT_DESC"
default="10"
filter="integer"
>
<option value="5">J5</option>
<option value="10">J10</option>
<option value="15">J15</option>
<option value="20">J20</option>
<option value="25">J25</option>
<option value="30">J30</option>
<option value="50">J50</option>
<option value="100">J100</option>
</field>
<field
name="feed_email"
type="list"
label="COM_CONFIG_FIELD_FEED_EMAIL_LABEL"
description="COM_CONFIG_FIELD_FEED_EMAIL_DESC"
default="none"
filter="word"
>
<option
value="author">COM_CONFIG_FIELD_VALUE_AUTHOR_EMAIL</option>
<option
value="site">COM_CONFIG_FIELD_VALUE_SITE_EMAIL</option>
<option
value="none">COM_CONFIG_FIELD_VALUE_NO_EMAIL</option>
</field>
</fieldset>
<fieldset
name="system"
label="CONFIG_SYSTEM_SETTINGS_LABEL">
<field
name="log_path"
type="text"
label="COM_CONFIG_FIELD_LOG_PATH_LABEL"
description="COM_CONFIG_FIELD_LOG_PATH_DESC"
required="true"
filter="string"
size="50"
/>
</fieldset>
<fieldset
name="cookie"
label="CONFIG_COOKIE_SETTINGS_LABEL">
<field
name="cookie_domain"
type="text"
label="COM_CONFIG_FIELD_COOKIE_DOMAIN_LABEL"
description="COM_CONFIG_FIELD_COOKIE_DOMAIN_DESC"
filter="string"
size="40"
/>
<field
name="cookie_path"
type="text"
label="COM_CONFIG_FIELD_COOKIE_PATH_LABEL"
description="COM_CONFIG_FIELD_COOKIE_PATH_DESC"
filter="string"
size="40"
/>
</fieldset>
<fieldset
name="permissions"
label="CONFIG_PERMISSION_SETTINGS_LABEL">
<field
name="rules"
type="rules"
label="FIELD_RULES_LABEL"
translate_label="false"
validate="rules"
filter="rules"
>
<action
name="core.login.site"
title="JACTION_LOGIN_SITE"
description="COM_CONFIG_ACTION_LOGIN_SITE_DESC"
/>
<action
name="core.login.admin"
title="JACTION_LOGIN_ADMIN"
description="COM_CONFIG_ACTION_LOGIN_ADMIN_DESC"
/>
<action
name="core.login.offline"
title="JACTION_LOGIN_OFFLINE"
description="COM_CONFIG_ACTION_LOGIN_OFFLINE_DESC"
/>
<action
name="core.admin"
title="JACTION_ADMIN_GLOBAL"
description="COM_CONFIG_ACTION_ADMIN_DESC"
/>
<action
name="core.options"
title="JACTION_OPTIONS"
description="COM_CONFIG_ACTION_OPTIONS_DESC"
/>
<action
name="core.manage"
title="JACTION_MANAGE"
description="COM_CONFIG_ACTION_MANAGE_DESC"
/>
<action
name="core.create"
title="JACTION_CREATE"
description="COM_CONFIG_ACTION_CREATE_DESC"
/>
<action
name="core.delete"
title="JACTION_DELETE"
description="COM_CONFIG_ACTION_DELETE_DESC"
/>
<action
name="core.edit"
title="JACTION_EDIT"
description="COM_CONFIG_ACTION_EDIT_DESC"
/>
<action
name="core.edit.state"
title="JACTION_EDITSTATE"
description="COM_CONFIG_ACTION_EDITSTATE_DESC"
/>
<action
name="core.edit.own"
title="JACTION_EDITOWN"
description="COM_CONFIG_ACTION_EDITOWN_DESC"
/>
<action
name="core.edit.value"
title="JACTION_EDITVALUE"
description="COM_CONFIG_ACTION_EDITVALUE_DESC"
/>
</field>
</fieldset>
<fieldset
name="filters"
label="COM_CONFIG_TEXT_FILTERS"
description="COM_CONFIG_TEXT_FILTERS_DESC">
<field
name="filters"
type="filters"
label="COM_CONFIG_TEXT_FILTERS"
filter=""
/>
</fieldset>
<fieldset>
<field
name="asset_id"
type="hidden"
/>
</fieldset>
</form>
PK�[>�Uy\\models/application.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
try
{
JLog::add(
sprintf('ConfigModelApplication has moved from %1$s to %2$s',
__FILE__, dirname(__DIR__) . '/model/application.php'),
JLog::WARNING,
'deprecated'
);
}
catch (RuntimeException $exception)
{
// Informational log only
}
include_once JPATH_ADMINISTRATOR .
'/components/com_config/model/application.php';
PK�[ �,�VVmodels/component.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
try
{
JLog::add(
sprintf('ConfigModelComponent has moved from %1$s to %2$s',
__FILE__, dirname(__DIR__) . '/model/component.php'),
JLog::WARNING,
'deprecated'
);
}
catch (RuntimeException $exception)
{
// Informational log only
}
include_once JPATH_ADMINISTRATOR .
'/components/com_config/model/component.php';
PK�[���zbbview/application/html.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View for the global configuration
*
* @since 3.2
*/
class ConfigViewApplicationHtml extends ConfigViewCmsHtml
{
public $state;
public $form;
public $data;
/**
* Method to display the view.
*
* @return string The rendered view.
*
* @since 3.2
*/
public function render()
{
$form = null;
$data = null;
try
{
// Load Form and Data
$form = $this->model->getForm();
$data = $this->model->getData();
$user = JFactory::getUser();
}
catch (Exception $e)
{
JFactory::getApplication()->enqueueMessage($e->getMessage(),
'error');
return false;
}
// Bind 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 = ConfigHelperConfig::getComponentsWithConfig();
ConfigHelperConfig::loadLanguageForComponents($this->components);
$this->userIsSuperAdmin = $user->authorise('core.admin');
$this->addToolbar();
return parent::render();
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 3.2
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'),
'equalizer config');
JToolbarHelper::apply('config.save.application.apply');
JToolbarHelper::save('config.save.application.save');
JToolbarHelper::divider();
JToolbarHelper::cancel('config.cancel.application');
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_SITE_GLOBAL_CONFIGURATION');
}
}
PK�[�й�view/application/json.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View for the component configuration
*
* @since 3.2
*/
class ConfigViewApplicationJson extends ConfigViewCmsJson
{
public $state;
public $data;
/**
* Display the view
*
* @return string The rendered view.
*
* @since 3.2
*/
public function render()
{
try
{
$this->data = $this->model->getData();
$user = JFactory::getUser();
}
catch (Exception $e)
{
JFactory::getApplication()->enqueueMessage($e->getMessage(),
'error');
return false;
}
$this->userIsSuperAdmin = $user->authorise('core.admin');
// Required data
$requiredData = array(
'sitename' => null,
'offline' => null,
'access' => null,
'list_limit' => null,
'MetaDesc' => null,
'MetaKeys' => null,
'MetaRights' => null,
'sef' => null,
'sitename_pagetitles' => null,
'debug' => null,
'debug_lang' => null,
'error_reporting' => null,
'mailfrom' => null,
'fromname' => null
);
$this->data = array_intersect_key($this->data, $requiredData);
return json_encode($this->data);
}
}
PK�[�o]���!view/application/tmpl/default.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\Registry\Registry;
// Load tooltips behavior
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('bootstrap.tooltip');
JHtml::_('formbehavior.chosen', 'select');
// Load JS message titles
JText::script('ERROR');
JText::script('WARNING');
JText::script('NOTICE');
JText::script('MESSAGE');
JFactory::getDocument()->addScriptDeclaration('
Joomla.submitbutton = function(task)
{
if (task === "config.cancel.application" ||
document.formvalidator.isValid(document.getElementById("application-form")))
{
jQuery("#permissions-sliders
select").attr("disabled", "disabled");
Joomla.submitform(task,
document.getElementById("application-form"));
}
};
');
?>
<form action="<?php echo
JRoute::_('index.php?option=com_config'); ?>"
id="application-form" method="post"
name="adminForm" class="form-validate">
<div class="row-fluid">
<!-- Begin Sidebar -->
<div id="sidebar" class="span2">
<div class="sidebar-nav">
<?php echo $this->loadTemplate('navigation'); ?>
<?php
// Display the submenu position modules
$this->submenumodules =
JModuleHelper::getModules('submenu');
foreach ($this->submenumodules as $submenumodule)
{
$output = JModuleHelper::renderModule($submenumodule);
$params = new Registry($submenumodule->params);
echo $output;
}
?>
</div>
</div>
<!-- End Sidebar -->
<!-- Begin Content -->
<div class="span10">
<ul class="nav nav-tabs">
<li class="active"><a href="#page-site"
data-toggle="tab"><?php echo JText::_('JSITE');
?></a></li>
<li><a href="#page-system"
data-toggle="tab"><?php echo
JText::_('COM_CONFIG_SYSTEM'); ?></a></li>
<li><a href="#page-server"
data-toggle="tab"><?php echo
JText::_('COM_CONFIG_SERVER'); ?></a></li>
<li><a href="#page-filters"
data-toggle="tab"><?php echo
JText::_('COM_CONFIG_TEXT_FILTERS'); ?></a></li>
<?php if ($this->ftp) : ?>
<li><a href="#page-ftp"
data-toggle="tab"><?php echo
JText::_('COM_CONFIG_FTP_SETTINGS'); ?></a></li>
<?php endif; ?>
<li><a href="#page-permissions"
data-toggle="tab"><?php echo
JText::_('COM_CONFIG_PERMISSIONS'); ?></a></li>
</ul>
<div id="config-document" class="tab-content">
<div id="page-site" class="tab-pane active">
<div class="row-fluid">
<div class="span6">
<?php echo $this->loadTemplate('site'); ?>
<?php echo $this->loadTemplate('metadata'); ?>
</div>
<div class="span6">
<?php echo $this->loadTemplate('seo'); ?>
<?php echo $this->loadTemplate('cookie'); ?>
</div>
</div>
</div>
<div id="page-system" class="tab-pane">
<div class="row-fluid">
<div class="span12">
<?php echo $this->loadTemplate('system'); ?>
<?php echo $this->loadTemplate('debug'); ?>
<?php echo $this->loadTemplate('cache'); ?>
<?php echo $this->loadTemplate('session'); ?>
</div>
</div>
</div>
<div id="page-server" class="tab-pane">
<div class="row-fluid">
<div class="span6">
<?php echo $this->loadTemplate('server'); ?>
<?php echo $this->loadTemplate('locale'); ?>
<?php echo $this->loadTemplate('ftp'); ?>
<?php echo $this->loadTemplate('proxy'); ?>
</div>
<div class="span6">
<?php echo $this->loadTemplate('database'); ?>
<?php echo $this->loadTemplate('mail'); ?>
</div>
</div>
</div>
<div id="page-filters" class="tab-pane">
<div class="row-fluid">
<?php echo $this->loadTemplate('filters'); ?>
</div>
</div>
<?php if ($this->ftp) : ?>
<div id="page-ftp" class="tab-pane">
<?php echo $this->loadTemplate('ftplogin'); ?>
</div>
<?php endif; ?>
<div id="page-permissions" class="tab-pane">
<div class="row-fluid">
<?php echo $this->loadTemplate('permissions'); ?>
</div>
</div>
<input type="hidden" name="task"
value="" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
<!-- End Content -->
</div>
</form>
PK�[7�����!view/application/tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_CONFIG_CONFIG_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_CONFIG_CONFIG_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>
PK�[�N���'view/application/tmpl/default_cache.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_CACHE_SETTINGS');
$this->fieldsname = 'cache';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[���ɮ�(view/application/tmpl/default_cookie.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_COOKIE_SETTINGS');
$this->fieldsname = 'cookie';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[���"��*view/application/tmpl/default_database.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_DATABASE_SETTINGS');
$this->fieldsname = 'database';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[T��'view/application/tmpl/default_debug.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_DEBUG_SETTINGS');
$this->fieldsname = 'debug';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[,����)view/application/tmpl/default_filters.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_TEXT_FILTER_SETTINGS');
$this->fieldsname = 'filters';
$this->description = JText::_('COM_CONFIG_TEXT_FILTERS_DESC');
echo JLayoutHelper::render('joomla.content.text_filters', $this);
PK�[�"
ب�%view/application/tmpl/default_ftp.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_FTP_SETTINGS');
$this->fieldsname = 'ftp';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[U�`yy*view/application/tmpl/default_ftplogin.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<fieldset title="<?php echo
JText::_('COM_CONFIG_FTP_DETAILS'); ?>"
class="form-horizontal">
<legend><?php echo JText::_('COM_CONFIG_FTP_DETAILS');
?></legend>
<?php echo JText::_('COM_CONFIG_FTP_DETAILS_TIP'); ?>
<?php if ($this->ftp instanceof Exception) : ?>
<p><?php echo JText::_($this->ftp->message);
?></p>
<?php endif; ?>
<div class="control-group">
<div class="control-label"><label
for="username"><?php echo
JText::_('JGLOBAL_USERNAME'); ?></label></div>
<div class="controls">
<input type="text" id="username"
name="username" class="input_box" size="70"
value="" />
</div>
</div>
<div class="control-group">
<div class="control-label"><?php echo
JText::_('JGLOBAL_PASSWORD'); ?></div>
<div class="controls">
<input type="password" id="password"
name="password" class="input_box" size="70"
value="" />
</div>
</div>
</fieldset>
PK�[�C�k��(view/application/tmpl/default_locale.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_LOCATION_SETTINGS');
$this->fieldsname = 'locale';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[8<Q��&view/application/tmpl/default_mail.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('jquery.token');
JHtml::_('script', 'system/sendtestmail.js',
array('version' => 'auto', 'relative'
=> true));
// Load JavaScript message titles
JText::script('ERROR');
JText::script('WARNING');
JText::script('NOTICE');
JText::script('MESSAGE');
// Add strings for JavaScript error translations.
JText::script('JLIB_JS_AJAX_ERROR_CONNECTION_ABORT');
JText::script('JLIB_JS_AJAX_ERROR_NO_CONTENT');
JText::script('JLIB_JS_AJAX_ERROR_OTHER');
JText::script('JLIB_JS_AJAX_ERROR_PARSE');
JText::script('JLIB_JS_AJAX_ERROR_TIMEOUT');
// Ajax request data.
$ajaxUri =
JRoute::_('index.php?option=com_config&task=config.sendtestmail.application&format=json');
$this->name = JText::_('COM_CONFIG_MAIL_SETTINGS');
$this->fieldsname = 'mail';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
echo '<button class="btn btn-small"
data-ajaxuri="' . $ajaxUri . '"
type="button" id="sendtestmail">
<span>' .
JText::_('COM_CONFIG_SENDMAIL_ACTION_BUTTON') .
'</span>
</button>';
PK�[�̤���*view/application/tmpl/default_metadata.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_METADATA_SETTINGS');
$this->fieldsname = 'metadata';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[G�a[��,view/application/tmpl/default_navigation.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<ul class="nav nav-list">
<?php if ($this->userIsSuperAdmin) : ?>
<li class="nav-header"><?php echo
JText::_('COM_CONFIG_SYSTEM'); ?></li>
<li class="active">
<a href="index.php?option=com_config"><?php echo
JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'); ?></a>
</li>
<li class="divider"></li>
<?php endif; ?>
<li class="nav-header"><?php echo
JText::_('COM_CONFIG_COMPONENT_FIELDSET_LABEL'); ?></li>
<?php foreach ($this->components as $component) : ?>
<li>
<a
href="index.php?option=com_config&view=component&component=<?php
echo $component; ?>"><?php echo JText::_($component);
?></a>
</li>
<?php endforeach; ?>
</ul>
PK�[��8-view/application/tmpl/default_permissions.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name =
JText::_('COM_CONFIG_PERMISSION_SETTINGS');
$this->description = '';
$this->fieldsname = 'permissions';
$this->formclass = 'form-vertical';
$this->showlabel = false;
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[p)Y���'view/application/tmpl/default_proxy.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_PROXY_SETTINGS');
$this->fieldsname = 'proxy';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[�8�Z��%view/application/tmpl/default_seo.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_SEO_SETTINGS');
$this->fieldsname = 'seo';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[�*�E��(view/application/tmpl/default_server.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_SERVER_SETTINGS');
$this->fieldsname = 'server';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[f�q���)view/application/tmpl/default_session.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_SESSION_SETTINGS');
$this->fieldsname = 'session';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[�źr��&view/application/tmpl/default_site.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_SITE_SETTINGS');
$this->fieldsname = 'site';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[�S>��(view/application/tmpl/default_system.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$this->name = JText::_('COM_CONFIG_SYSTEM_SETTINGS');
$this->fieldsname = 'system';
echo JLayoutHelper::render('joomla.content.options_default',
$this);
PK�[�\��� � view/component/html.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View for the component configuration
*
* @since 3.2
*/
class ConfigViewComponentHtml extends ConfigViewCmsHtml
{
public $state;
public $form;
public $component;
/**
* Display the view
*
* @return string The rendered view.
*
* @since 3.2
*
*/
public function render()
{
$form = null;
$component = null;
try
{
$component = $this->model->getComponent();
if (!$component->enabled)
{
return false;
}
$form = $this->model->getForm();
$user = JFactory::getUser();
}
catch (Exception $e)
{
JFactory::getApplication()->enqueueMessage($e->getMessage(),
'error');
return false;
}
// Bind the form to the data.
if ($form && $component->params)
{
$form->bind($component->params);
}
$this->fieldsets = $form ? $form->getFieldsets() : null;
$this->formControl = $form ? $form->getFormControl() : null;
// Don't show permissions fieldset if not authorised.
if (!$user->authorise('core.admin', $component->option)
&& isset($this->fieldsets['permissions']))
{
unset($this->fieldsets['permissions']);
}
$this->form = &$form;
$this->component = &$component;
$this->components = ConfigHelperConfig::getComponentsWithConfig();
$this->userIsSuperAdmin = $user->authorise('core.admin');
$this->currentComponent =
JFactory::getApplication()->input->get('component');
$this->return =
JFactory::getApplication()->input->get('return',
'', 'base64');
$this->addToolbar();
return parent::render();
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 3.2
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_($this->component->option .
'_configuration'), 'equalizer config');
JToolbarHelper::apply('config.save.component.apply');
JToolbarHelper::save('config.save.component.save');
JToolbarHelper::divider();
JToolbarHelper::cancel('config.cancel.component');
JToolbarHelper::divider();
$helpUrl = $this->form->getData()->get('helpURL');
$helpKey = (string)
$this->form->getXml()->config->help['key'];
$helpKey = $helpKey ?: 'JHELP_COMPONENTS_' .
strtoupper($this->currentComponent) . '_OPTIONS';
JToolbarHelper::help($helpKey, (boolean) $helpUrl, null,
$this->currentComponent);
}
}
PK�[:�PPview/component/tmpl/default.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$template = $app->getTemplate();
// Load the tooltip behavior.
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', '.chzn-custom-value',
null, array('disable_search_threshold' => 0));
JHtml::_('formbehavior.chosen', 'select');
// Load JS message titles
JText::script('ERROR');
JText::script('WARNING');
JText::script('NOTICE');
JText::script('MESSAGE');
JFactory::getDocument()->addScriptDeclaration(
'
Joomla.submitbutton = function(task)
{
if (task === "config.cancel.component" ||
document.formvalidator.isValid(document.getElementById("component-form")))
{
jQuery("#permissions-sliders
select").attr("disabled", "disabled");
Joomla.submitform(task,
document.getElementById("component-form"));
}
};
// Select first tab
jQuery(document).ready(function() {
jQuery("#configTabs a:first").tab("show");
});'
);
?>
<form action="<?php echo
JRoute::_('index.php?option=com_config'); ?>"
id="component-form" method="post"
name="adminForm" autocomplete="off"
class="form-validate form-horizontal">
<div class="row-fluid">
<!-- Begin Sidebar -->
<div class="span2" id="sidebar">
<div class="sidebar-nav">
<?php echo $this->loadTemplate('navigation'); ?>
</div>
</div><!-- End Sidebar -->
<div class="span10" id="config">
<?php if ($this->fieldsets): ?>
<ul class="nav nav-tabs" id="configTabs">
<?php foreach ($this->fieldsets as $name => $fieldSet) : ?>
<?php $dataShowOn = ''; ?>
<?php if (!empty($fieldSet->showon)) : ?>
<?php JHtml::_('jquery.framework'); ?>
<?php JHtml::_('script', 'jui/cms.js',
array('version' => 'auto', 'relative'
=> true)); ?>
<?php $dataShowOn = ' data-showon=\'' .
json_encode(JFormHelper::parseShowOnConditions($fieldSet->showon,
$this->formControl)) . '\''; ?>
<?php endif; ?>
<?php $label = empty($fieldSet->label) ? 'COM_CONFIG_'
. $name . '_FIELDSET_LABEL' : $fieldSet->label; ?>
<li<?php echo $dataShowOn; ?>><a
data-toggle="tab" href="#<?php echo $name;
?>"><?php echo JText::_($label); ?></a></li>
<?php endforeach; ?>
</ul><!-- /configTabs -->
<div class="tab-content" id="configContent">
<?php foreach ($this->fieldsets as $name => $fieldSet) : ?>
<div class="tab-pane" id="<?php echo $name;
?>">
<?php if (isset($fieldSet->description) &&
!empty($fieldSet->description)) : ?>
<div class="tab-description alert alert-info">
<span class="icon-info"
aria-hidden="true"></span> <?php echo
JText::_($fieldSet->description); ?>
</div>
<?php endif; ?>
<?php foreach ($this->form->getFieldset($name) as $field) :
?>
<?php
$dataShowOn = '';
$groupClass = $field->type === 'Spacer' ? '
field-spacer' : '';
?>
<?php if ($field->showon) : ?>
<?php JHtml::_('jquery.framework'); ?>
<?php JHtml::_('script', 'jui/cms.js',
array('version' => 'auto', 'relative'
=> true)); ?>
<?php $dataShowOn = ' data-showon=\'' .
json_encode(JFormHelper::parseShowOnConditions($field->showon,
$field->formControl, $field->group)) . '\''; ?>
<?php endif; ?>
<?php if ($field->hidden) : ?>
<?php echo $field->input; ?>
<?php else : ?>
<div class="control-group<?php echo $groupClass;
?>"<?php echo $dataShowOn; ?>>
<?php if ($name != 'permissions') : ?>
<div class="control-label">
<?php echo $field->label; ?>
</div>
<?php endif; ?>
<div class="<?php if ($name != 'permissions')
: ?>controls<?php endif; ?>">
<?php echo $field->input; ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div><!-- /configContent -->
<?php else: ?>
<div class="alert alert-info"><span
class="icon-info" aria-hidden="true"></span>
<?php echo
JText::_('COM_CONFIG_COMPONENT_NO_CONFIG_FIELDS_MESSAGE');
?></div>
<?php endif; ?>
</div><!-- /config -->
<input type="hidden" name="id"
value="<?php echo $this->component->id; ?>" />
<input type="hidden" name="component"
value="<?php echo $this->component->option; ?>" />
<input type="hidden" name="return"
value="<?php echo $this->return; ?>" />
<input type="hidden" name="task"
value="" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
PK�[�t�pview/component/tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_CONFIG_COMPONENT_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_CONFIG_COMPONENT_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<fields name="request">
<fieldset name="request"
addfieldpath="administrator/components/com_config/model/field">
<field
name="component"
type="configComponents"
label="JGLOBAL_CHOOSE_COMPONENT_LABEL"
description="JGLOBAL_CHOOSE_COMPONENT_DESC"
required="true"
/>
</fieldset>
</fields>
</metadata>
PK�[��q*view/component/tmpl/default_navigation.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<ul class="nav nav-list">
<?php if ($this->userIsSuperAdmin) : ?>
<li class="nav-header"><?php echo
JText::_('COM_CONFIG_SYSTEM'); ?></li>
<li><a href="index.php?option=com_config"><?php
echo JText::_('COM_CONFIG_GLOBAL_CONFIGURATION');
?></a></li>
<li class="divider"></li>
<?php endif; ?>
<li class="nav-header"><?php echo
JText::_('COM_CONFIG_COMPONENT_FIELDSET_LABEL'); ?></li>
<?php foreach ($this->components as $component) : ?>
<?php
$active = '';
if ($this->currentComponent === $component)
{
$active = ' class="active"';
}
?>
<li<?php echo $active; ?>>
<a
href="index.php?option=com_config&view=component&component=<?php
echo $component; ?>"><?php echo JText::_($component);
?></a>
</li>
<?php endforeach; ?>
</ul>
PK�[1uĽ��
access.xmlnu�[���PK�[��*���
config.phpnu�[���PK�[�R���
�config.xmlnu�[���PK�[����! controller/application/cancel.phpnu�[���PK�[��q33"
controller/application/display.phpnu�[���PK�[=e���%�controller/application/removeroot.phpnu�[���PK�[��KX
X
xcontroller/application/save.phpnu�[���PK�["�'$controller/application/sendtestmail.phpnu�[���PK�[�G��
�)controller/application/store.phpnu�[���PK�[͚[��l.controller/component/cancel.phpnu�[���PK�[��j�11
�1controller/component/display.phpnu�[���PK�[.���54controller/component/save.phpnu�[���PK�[«w6��WDcontroller.phpnu�[���PK�[)�^� � �Icontrollers/application.phpnu�[���PK�[`M�� sScontrollers/component.phpnu�[���PK�[k7���Zhelper/config.phpnu�[���PK�[��'q�q�fmodel/application.phpnu�[���PK�[����oo��model/component.phpnu�[���PK�[`%311
4�model/field/configcomponents.phpnu�[���PK�[=�4f��model/field/filters.phpnu�[���PK�[�5���u�umodel/form/application.xmlnu�[���PK�[>�Uy\\�models/application.phpnu�[���PK�[
�,�VV��models/component.phpnu�[���PK�[���zbb*�view/application/html.phpnu�[���PK�[�й�Փview/application/json.phpnu�[���PK�[�o]���!יview/application/tmpl/default.phpnu�[���PK�[7�����!��view/application/tmpl/default.xmlnu�[���PK�[�N���'�view/application/tmpl/default_cache.phpnu�[���PK�[���ɮ�(�view/application/tmpl/default_cookie.phpnu�[���PK�[���"��*%�view/application/tmpl/default_database.phpnu�[���PK�[T��'1�view/application/tmpl/default_debug.phpnu�[���PK�[,����)4�view/application/tmpl/default_filters.phpnu�[���PK�[�"
ب�%}�view/application/tmpl/default_ftp.phpnu�[���PK�[U�`yy*z�view/application/tmpl/default_ftplogin.phpnu�[���PK�[�C�k��(M�view/application/tmpl/default_locale.phpnu�[���PK�[8<Q��&U�view/application/tmpl/default_mail.phpnu�[���PK�[�̤���*��view/application/tmpl/default_metadata.phpnu�[���PK�[G�a[��,��view/application/tmpl/default_navigation.phpnu�[���PK�[��8-��view/application/tmpl/default_permissions.phpnu�[���PK�[p)Y���'
�view/application/tmpl/default_proxy.phpnu�[���PK�[�8�Z��%#�view/application/tmpl/default_seo.phpnu�[���PK�[�*�E��(
�view/application/tmpl/default_server.phpnu�[���PK�[f�q���)&�view/application/tmpl/default_session.phpnu�[���PK�[�źr��&/�view/application/tmpl/default_site.phpnu�[���PK�[�S>��(/�view/application/tmpl/default_system.phpnu�[���PK�[�\��� � 5�view/component/html.phpnu�[���PK�[:�PPi�view/component/tmpl/default.phpnu�[���PK�[�t�p�view/component/tmpl/default.xmlnu�[���PK�[��q*f�view/component/tmpl/default_navigation.phpnu�[���PK11E�