Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
PK��[��m�
access.xmlnu�[���<?xml version="1.0"
encoding="utf-8" ?>
<access component="com_plugins">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN"
description="JACTION_ADMIN_COMPONENT_DESC" />
<action name="core.manage" title="JACTION_MANAGE"
description="JACTION_MANAGE_COMPONENT_DESC" />
<action name="core.edit" title="JACTION_EDIT"
description="JACTION_EDIT_COMPONENT_DESC" />
<action name="core.edit.state"
title="JACTION_EDITSTATE"
description="JACTION_EDITSTATE_COMPONENT_DESC" />
</section>
</access>
PK��[ok�bb
config.xmlnu�[���<?xml version="1.0"
encoding="utf-8"?>
<config>
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC">
<field
name="rules"
type="rules"
label="JCONFIG_PERMISSIONS_LABEL"
filter="rules"
validate="rules"
component="com_plugins"
section="component"
/>
</fieldset>
</config>
PK��[��VVcontroller.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
/**
* Plugins master display controller.
*
* @since 1.5
*/
class PluginsController extends JControllerLegacy
{
/**
* Method to display a 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 JController This object to support chaining.
*
* @since 1.5
*/
public function display($cachable = false, $urlparams = false)
{
JLoader::register('PluginsHelper', JPATH_ADMINISTRATOR .
'/components/com_plugins/helpers/plugins.php');
// Load the submenu.
PluginsHelper::addSubmenu($this->input->get('view',
'plugins'));
$view = $this->input->get('view', 'plugins');
$layout = $this->input->get('layout',
'default');
$id = $this->input->getInt('extension_id');
// Check for edit form.
if ($view == 'plugin' && $layout == 'edit'
&& !$this->checkEditId('com_plugins.edit.plugin',
$id))
{
// Somehow the person just went to the form - we don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID',
$id));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=com_plugins&view=plugins',
false));
return false;
}
parent::display();
}
}
PK��[W�controllers/plugin.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
/**
* Plugin controller class.
*
* @since 1.6
*/
class PluginsControllerPlugin extends JControllerForm
{
}
PK��[J
�9sscontrollers/plugins.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
/**
* Plugins list controller class.
*
* @since 1.6
*/
class PluginsControllerPlugins extends JControllerAdmin
{
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return object The model.
*
* @since 1.6
*/
public function getModel($name = 'Plugin', $prefix =
'PluginsModel', $config = array('ignore_request' =>
true))
{
return parent::getModel($name, $prefix, $config);
}
}
PK��[C2J_
_
helpers/plugins.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
/**
* Plugins component helper.
*
* @since 1.6
*/
class PluginsHelper
{
public static $extension = 'com_plugins';
/**
* Configure the Linkbar.
*
* @param string $vName The name of the active view.
*
* @return void
*/
public static function addSubmenu($vName)
{
// No submenu for this component.
}
/**
* Gets a list of the actions that can be performed.
*
* @return JObject
*
* @deprecated 3.2 Use JHelperContent::getActions() instead
*/
public static function getActions()
{
// Log usage of deprecated function.
try
{
JLog::add(
sprintf('%s() is deprecated. Use JHelperContent::getActions() with
new arguments order instead.', __METHOD__),
JLog::WARNING,
'deprecated'
);
}
catch (RuntimeException $exception)
{
// Informational log only
}
// Get list of actions.
return JHelperContent::getActions('com_plugins');
}
/**
* Returns an array of standard published state filter options.
*
* @return array The HTML code for the select tag
*/
public static function publishedOptions()
{
// Build the active state filter options.
$options = array();
$options[] = JHtml::_('select.option', '1',
'JENABLED');
$options[] = JHtml::_('select.option', '0',
'JDISABLED');
return $options;
}
/**
* Returns a list of folders filter options.
*
* @return string The HTML code for the select tag
*/
public static function folderOptions()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('DISTINCT(folder) AS value, folder AS text')
->from('#__extensions')
->where($db->quoteName('type') . ' = ' .
$db->quote('plugin'))
->order('folder');
$db->setQuery($query);
try
{
$options = $db->loadObjectList();
}
catch (RuntimeException $e)
{
JError::raiseWarning(500, $e->getMessage());
}
return $options;
}
/**
* Returns a list of elements filter options.
*
* @return string The HTML code for the select tag
*/
public static function elementOptions()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('DISTINCT(element) AS value, element AS text')
->from('#__extensions')
->where($db->quoteName('type') . ' = ' .
$db->quote('plugin'))
->order('element');
$db->setQuery($query);
try
{
$options = $db->loadObjectList();
}
catch (RuntimeException $e)
{
JError::raiseWarning(500, $e->getMessage());
}
return $options;
}
/**
* Parse the template file.
*
* @param string $templateBaseDir Base path to the template directory.
* @param string $templateDir Template directory.
*
* @return JObject
*/
public function parseXMLTemplateFile($templateBaseDir, $templateDir)
{
$data = new JObject;
// Check of the xml file exists.
$filePath = JPath::clean($templateBaseDir . '/templates/' .
$templateDir . '/templateDetails.xml');
if (is_file($filePath))
{
$xml = JInstaller::parseXMLInstallFile($filePath);
if ($xml['type'] != 'template')
{
return false;
}
foreach ($xml as $key => $value)
{
$data->set($key, $value);
}
}
return $data;
}
}
PK��[�_��models/fields/pluginelement.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
JLoader::register('PluginsHelper', JPATH_ADMINISTRATOR .
'/components/com_plugins/helpers/plugins.php');
JFormHelper::loadFieldClass('list');
/**
* Plugin Element field.
*
* @since 3.9.0
*/
class JFormFieldPluginElement extends JFormFieldList
{
/**
* The form field type.
*
* @var string
* @since 3.9.0
*/
protected $type = 'PluginElement';
/**
* Method to get the field options.
*
* @return array The field option objects.
*
* @since 3.9.0
*/
public function getOptions()
{
$options = PluginsHelper::elementOptions();
return array_merge(parent::getOptions(), $options);
}
}
PK��[7\��
models/fields/pluginordering.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
JFormHelper::loadFieldClass('ordering');
/**
* Supports an HTML select list of plugins.
*
* @since 1.6
*/
class JFormFieldPluginordering extends JFormFieldOrdering
{
/**
* The form field type.
*
* @var string
* @since 1.6
*/
protected $type = 'Pluginordering';
/**
* Builds the query for the ordering list.
*
* @return JDatabaseQuery The query for the ordering form field.
*/
protected function getQuery()
{
$db = JFactory::getDbo();
$folder = $this->form->getValue('folder');
// Build the query for the ordering list.
$query = $db->getQuery(true)
->select(
array(
$db->quoteName('ordering', 'value'),
$db->quoteName('name', 'text'),
$db->quoteName('type'),
$db->quote('folder'),
$db->quote('extension_id')
)
)
->from($db->quoteName('#__extensions'))
->where('(type =' . $db->quote('plugin') .
'AND folder=' . $db->quote($folder) . ')')
->order('ordering');
return $query;
}
/**
* Retrieves the current Item's Id.
*
* @return integer The current item ID.
*/
protected function getItemId()
{
return (int) $this->form->getValue('extension_id');
}
}
PK��[���vvmodels/fields/plugintype.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
JLoader::register('PluginsHelper', JPATH_ADMINISTRATOR .
'/components/com_plugins/helpers/plugins.php');
JFormHelper::loadFieldClass('list');
/**
* Plugin Type field.
*
* @since 3.5
*/
class JFormFieldPluginType extends JFormFieldList
{
/**
* The form field type.
*
* @var string
* @since 3.5
*/
protected $type = 'PluginType';
/**
* Method to get the field options.
*
* @return array The field option objects.
*
* @since 3.5
*/
public function getOptions()
{
$options = PluginsHelper::folderOptions();
return array_merge(parent::getOptions(), $options);
}
}
PK��[�s�
1 1 models/forms/filter_plugins.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<form>
<fieldset
addfieldpath="/administrator/components/com_plugins/models/fields"
/>
<fields name="filter">
<field
name="search"
type="text"
inputmode="search"
label="COM_PLUGINS_FILTER_SEARCH_LABEL"
description="COM_PLUGINS_SEARCH_IN_TITLE"
hint="JSEARCH_FILTER"
/>
<field
name="enabled"
type="plugin_status"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>
<field
name="folder"
type="plugintype"
onchange="this.form.submit();"
>
<option
value="">COM_PLUGINS_OPTION_FOLDER</option>
</field>
<field
name="element"
type="pluginelement"
onchange="this.form.submit();"
>
<option
value="">COM_PLUGINS_OPTION_ELEMENT</option>
</field>
<field
name="access"
type="accesslevel"
label="JOPTION_FILTER_ACCESS"
description="JOPTION_FILTER_ACCESS_DESC"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_ACCESS</option>
</field>
</fields>
<fields name="list">
<field
name="fullordering"
type="list"
label="JGLOBAL_SORT_BY"
description="JGLOBAL_SORT_BY"
onchange="this.form.submit();"
default="folder ASC"
validate="options"
>
<option value="">JGLOBAL_SORT_BY</option>
<option value="ordering
ASC">JGRID_HEADING_ORDERING_ASC</option>
<option value="ordering
DESC">JGRID_HEADING_ORDERING_DESC</option>
<option value="enabled ASC">JSTATUS_ASC</option>
<option value="enabled DESC">JSTATUS_DESC</option>
<option value="name
ASC">JGLOBAL_TITLE_ASC</option>
<option value="name
DESC">JGLOBAL_TITLE_DESC</option>
<option value="folder
ASC">COM_PLUGINS_HEADING_FOLDER_ASC</option>
<option value="folder
DESC">COM_PLUGINS_HEADING_FOLDER_DESC</option>
<option value="element
ASC">COM_PLUGINS_HEADING_ELEMENT_ASC</option>
<option value="element
DESC">COM_PLUGINS_HEADING_ELEMENT_DESC</option>
<option value="access
ASC">JGRID_HEADING_ACCESS_ASC</option>
<option value="access
DESC">JGRID_HEADING_ACCESS_DESC</option>
<option value="extension_id
ASC">JGRID_HEADING_ID_ASC</option>
<option value="extension_id
DESC">JGRID_HEADING_ID_DESC</option>
</field>
<field
name="limit"
type="limitbox"
class="input-mini"
default="25"
onchange="this.form.submit();"
/>
</fields>
</form>
PK��[��
YYmodels/forms/plugin.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<form>
<fieldset
addfieldpath="/administrator/components/com_plugins/models/fields"
>
<field
name="extension_id"
type="text"
label="JGLOBAL_FIELD_ID_LABEL"
description="JGLOBAL_FIELD_ID_DESC"
default="0"
readonly="true"
class="readonly"
/>
<field
name="name"
type="hidden"
label="COM_PLUGINS_FIELD_NAME_LABEL"
description="COM_PLUGINS_FIELD_NAME_DESC"
/>
<field
name="enabled"
type="list"
label="JSTATUS"
description="COM_PLUGINS_FIELD_ENABLED_DESC"
class="chzn-color-state"
size="1"
default="1"
>
<option value="1">JENABLED</option>
<option value="0">JDISABLED</option>
</field>
<field
name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
size="1"
/>
<field
name="ordering"
type="pluginordering"
label="JFIELD_ORDERING_LABEL"
description="JFIELD_ORDERING_DESC"
/>
<field
name="folder"
type="text"
label="COM_PLUGINS_FIELD_FOLDER_LABEL"
description="COM_PLUGINS_FIELD_FOLDER_DESC"
class="readonly"
size="20"
readonly="true"
/>
<field
name="element"
type="text"
label="COM_PLUGINS_FIELD_ELEMENT_LABEL"
description="COM_PLUGINS_FIELD_ELEMENT_DESC"
class="readonly"
size="20"
readonly="true"
/>
</fieldset>
</form>
PK��[l0q8a%a%models/plugin.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
/**
* Plugin model.
*
* @since 1.6
*/
class PluginsModelPlugin extends JModelAdmin
{
/**
* @var string The help screen key for the module.
* @since 1.6
*/
protected $helpKey = 'JHELP_EXTENSIONS_PLUGIN_MANAGER_EDIT';
/**
* @var string The help screen base URL for the module.
* @since 1.6
*/
protected $helpURL;
/**
* @var array An array of cached plugin items.
* @since 1.6
*/
protected $_cache;
/**
* Constructor.
*
* @param array $config An optional associative array of configuration
settings.
*/
public function __construct($config = array())
{
$config = array_merge(
array(
'event_after_save' => 'onExtensionAfterSave',
'event_before_save' => 'onExtensionBeforeSave',
'events_map' => array(
'save' => 'extension'
)
), $config
);
parent::__construct($config);
}
/**
* Method to get the record form.
*
* @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 JForm A JForm object on success, false on failure.
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
// The folder and element vars are passed when saving the form.
if (empty($data))
{
$item = $this->getItem();
$folder = $item->folder;
$element = $item->element;
}
else
{
$folder = ArrayHelper::getValue($data, 'folder',
'', 'cmd');
$element = ArrayHelper::getValue($data, 'element',
'', 'cmd');
}
// Add the default fields directory
JForm::addFieldPath(JPATH_PLUGINS . '/' . $folder .
'/' . $element . '/field');
// These variables are used to add data from the plugin XML files.
$this->setState('item.folder', $folder);
$this->setState('item.element', $element);
// Get the form.
$form = $this->loadForm('com_plugins.plugin',
'plugin', array('control' => 'jform',
'load_data' => $loadData));
if (empty($form))
{
return false;
}
// Modify the form based on access controls.
if (!$this->canEditState((object) $data))
{
// Disable fields for display.
$form->setFieldAttribute('ordering', 'disabled',
'true');
$form->setFieldAttribute('enabled', 'disabled',
'true');
// Disable fields while saving.
// The controller has already verified this is a record you can edit.
$form->setFieldAttribute('ordering', 'filter',
'unset');
$form->setFieldAttribute('enabled', 'filter',
'unset');
}
return $form;
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
*
* @since 1.6
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data =
JFactory::getApplication()->getUserState('com_plugins.edit.plugin.data',
array());
if (empty($data))
{
$data = $this->getItem();
}
$this->preprocessData('com_plugins.plugin', $data);
return $data;
}
/**
* Method to get a single record.
*
* @param integer $pk The id of the primary key.
*
* @return mixed Object on success, false on failure.
*/
public function getItem($pk = null)
{
$pk = (!empty($pk)) ? $pk : (int)
$this->getState('plugin.id');
if (!isset($this->_cache[$pk]))
{
// Get a row instance.
$table = $this->getTable();
// Attempt to load the row.
$return = $table->load($pk);
// Check for a table object error.
if ($return === false && $table->getError())
{
$this->setError($table->getError());
return false;
}
// Convert to the JObject before adding other data.
$properties = $table->getProperties(1);
$this->_cache[$pk] = ArrayHelper::toObject($properties,
'JObject');
// Convert the params field to an array.
$registry = new Registry($table->params);
$this->_cache[$pk]->params = $registry->toArray();
// Get the plugin XML.
$path = JPath::clean(JPATH_PLUGINS . '/' . $table->folder .
'/' . $table->element . '/' . $table->element .
'.xml');
if (file_exists($path))
{
$this->_cache[$pk]->xml = simplexml_load_file($path);
}
else
{
$this->_cache[$pk]->xml = null;
}
}
return $this->_cache[$pk];
}
/**
* Returns a reference to the Table object, always creating it.
*
* @param string $type The table type to instantiate.
* @param string $prefix A prefix for the table class name. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JTable A database object
*/
public function getTable($type = 'Extension', $prefix =
'JTable', $config = array())
{
return JTable::getInstance($type, $prefix, $config);
}
/**
* Auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @return void
*
* @since 1.6
*/
protected function populateState()
{
// Execute the parent method.
parent::populateState();
$app = JFactory::getApplication('administrator');
// Load the User state.
$pk = $app->input->getInt('extension_id');
$this->setState('plugin.id', $pk);
}
/**
* Preprocess the form.
*
* @param JForm $form A form object.
* @param mixed $data The data expected for the form.
* @param string $group Cache group name.
*
* @return mixed True if successful.
*
* @throws Exception if there is an error in the form event.
* @since 1.6
*/
protected function preprocessForm(JForm $form, $data, $group =
'content')
{
jimport('joomla.filesystem.path');
$folder = $this->getState('item.folder');
$element = $this->getState('item.element');
$lang = JFactory::getLanguage();
// Load the core and/or local language sys file(s) for the ordering
field.
$db = $this->getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('element'))
->from($db->quoteName('#__extensions'))
->where($db->quoteName('type') . ' = ' .
$db->quote('plugin'))
->where($db->quoteName('folder') . ' = ' .
$db->quote($folder));
$db->setQuery($query);
$elements = $db->loadColumn();
foreach ($elements as $elementa)
{
$lang->load('plg_' . $folder . '_' . $elementa .
'.sys', JPATH_ADMINISTRATOR, null, false, true)
|| $lang->load('plg_' . $folder . '_' . $elementa
. '.sys', JPATH_PLUGINS . '/' . $folder . '/'
. $elementa, null, false, true);
}
if (empty($folder) || empty($element))
{
$app = JFactory::getApplication();
$app->redirect(JRoute::_('index.php?option=com_plugins&view=plugins',
false));
}
$formFile = JPath::clean(JPATH_PLUGINS . '/' . $folder .
'/' . $element . '/' . $element . '.xml');
if (!file_exists($formFile))
{
throw new
Exception(JText::sprintf('COM_PLUGINS_ERROR_FILE_NOT_FOUND',
$element . '.xml'));
}
// Load the core and/or local language file(s).
$lang->load('plg_' . $folder . '_' . $element,
JPATH_ADMINISTRATOR, null, false, true)
|| $lang->load('plg_' . $folder . '_' . $element,
JPATH_PLUGINS . '/' . $folder . '/' . $element, null,
false, true);
if (file_exists($formFile))
{
// Get the plugin form.
if (!$form->loadFile($formFile, false, '//config'))
{
throw new Exception(JText::_('JERROR_LOADFILE_FAILED'));
}
}
// Attempt to load the xml file.
if (!$xml = simplexml_load_file($formFile))
{
throw new Exception(JText::_('JERROR_LOADFILE_FAILED'));
}
// Get the help data from the XML file if present.
$help = $xml->xpath('/extension/help');
if (!empty($help))
{
$helpKey = trim((string) $help[0]['key']);
$helpURL = trim((string) $help[0]['url']);
$this->helpKey = $helpKey ?: $this->helpKey;
$this->helpURL = $helpURL ?: $this->helpURL;
}
// Trigger the default form events.
parent::preprocessForm($form, $data, $group);
}
/**
* A protected method to get a set of ordering conditions.
*
* @param object $table A record object.
*
* @return array An array of conditions to add to add to ordering
queries.
*
* @since 1.6
*/
protected function getReorderConditions($table)
{
$condition = array();
$condition[] = 'type = ' .
$this->_db->quote($table->type);
$condition[] = 'folder = ' .
$this->_db->quote($table->folder);
return $condition;
}
/**
* Override method to save the form data.
*
* @param array $data The form data.
*
* @return boolean True on success.
*
* @since 1.6
*/
public function save($data)
{
// Setup type.
$data['type'] = 'plugin';
return parent::save($data);
}
/**
* Get the necessary data to load an item help screen.
*
* @return object An object with key, url, and local properties for
loading the item help screen.
*
* @since 1.6
*/
public function getHelp()
{
return (object) array('key' => $this->helpKey,
'url' => $this->helpURL);
}
/**
* Custom clean cache method, plugins are cached in 2 places for different
clients.
*
* @param string $group Cache group name.
* @param integer $clientId Application client id.
*
* @return void
*
* @since 1.6
*/
protected function cleanCache($group = null, $clientId = 0)
{
parent::cleanCache('com_plugins', 0);
parent::cleanCache('com_plugins', 1);
}
}
PK��[�/g55models/plugins.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
/**
* Methods supporting a list of plugin records.
*
* @since 1.6
*/
class PluginsModelPlugins extends JModelList
{
/**
* Constructor.
*
* @param array $config An optional associative array of configuration
settings.
*
* @see JController
* @since 1.6
*/
public function __construct($config = array())
{
if (empty($config['filter_fields']))
{
$config['filter_fields'] = array(
'extension_id', 'a.extension_id',
'name', 'a.name',
'folder', 'a.folder',
'element', 'a.element',
'checked_out', 'a.checked_out',
'checked_out_time', 'a.checked_out_time',
'state', 'a.state',
'enabled', 'a.enabled',
'access', 'a.access', 'access_level',
'ordering', 'a.ordering',
'client_id', 'a.client_id',
);
}
parent::__construct($config);
}
/**
* Method to auto-populate the model state.
*
* Note. Calling getState in this method will result in recursion.
*
* @param string $ordering An optional ordering field.
* @param string $direction An optional direction (asc|desc).
*
* @return void
*
* @since 1.6
*/
protected function populateState($ordering = 'folder',
$direction = 'asc')
{
// Load the filter state.
$search = $this->getUserStateFromRequest($this->context .
'.filter.search', 'filter_search', '',
'string');
$this->setState('filter.search', $search);
$accessId = $this->getUserStateFromRequest($this->context .
'.filter.access', 'filter_access', '',
'cmd');
$this->setState('filter.access', $accessId);
$state = $this->getUserStateFromRequest($this->context .
'.filter.enabled', 'filter_enabled', '',
'cmd');
$this->setState('filter.enabled', $state);
$folder = $this->getUserStateFromRequest($this->context .
'.filter.folder', 'filter_folder', '',
'string');
$this->setState('filter.folder', $folder);
$element = $this->getUserStateFromRequest($this->context .
'.filter.element', 'filter_element', '',
'string');
$this->setState('filter.element', $element);
// Load the parameters.
$params = JComponentHelper::getParams('com_plugins');
$this->setState('params', $params);
// List state information.
parent::populateState($ordering, $direction);
}
/**
* Method to get a store id based on model configuration state.
*
* This is necessary because the model is used by the component and
* different modules that might need different sets of data or different
* ordering requirements.
*
* @param string $id A prefix for the store id.
*
* @return string A store id.
*/
protected function getStoreId($id = '')
{
// Compile the store id.
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.access');
$id .= ':' . $this->getState('filter.enabled');
$id .= ':' . $this->getState('filter.folder');
$id .= ':' . $this->getState('filter.element');
return parent::getStoreId($id);
}
/**
* Returns an object list.
*
* @param JDatabaseQuery $query A database query object.
* @param integer $limitstart Offset.
* @param integer $limit The number of records.
*
* @return array
*/
protected function _getList($query, $limitstart = 0, $limit = 0)
{
$search = $this->getState('filter.search');
$ordering = $this->getState('list.ordering',
'ordering');
// If "Sort Table By:" is not set, set ordering to name
if ($ordering == '')
{
$ordering = 'name';
}
if ($ordering == 'name' || (!empty($search) &&
stripos($search, 'id:') !== 0))
{
$this->_db->setQuery($query);
$result = $this->_db->loadObjectList();
$this->translate($result);
if (!empty($search))
{
$escapedSearchString = $this->refineSearchStringToRegex($search,
'/');
foreach ($result as $i => $item)
{
if (!preg_match("/$escapedSearchString/i", $item->name))
{
unset($result[$i]);
}
}
}
$orderingDirection =
strtolower($this->getState('list.direction'));
$direction = ($orderingDirection == 'desc') ? -1 : 1;
$result = ArrayHelper::sortObjects($result, $ordering, $direction, true,
true);
$total = count($result);
$this->cache[$this->getStoreId('getTotal')] = $total;
if ($total < $limitstart)
{
$limitstart = 0;
$this->setState('list.start', 0);
}
return array_slice($result, $limitstart, $limit ?: null);
}
else
{
if ($ordering == 'ordering')
{
$query->order('a.folder ASC');
$ordering = 'a.ordering';
}
$query->order($this->_db->quoteName($ordering) . ' '
. $this->getState('list.direction'));
if ($ordering == 'folder')
{
$query->order('a.ordering ASC');
}
$result = parent::_getList($query, $limitstart, $limit);
$this->translate($result);
return $result;
}
}
/**
* Translate a list of objects.
*
* @param array &$items The array of objects.
*
* @return array The array of translated objects.
*/
protected function translate(&$items)
{
$lang = JFactory::getLanguage();
foreach ($items as &$item)
{
$source = JPATH_PLUGINS . '/' . $item->folder .
'/' . $item->element;
$extension = 'plg_' . $item->folder . '_' .
$item->element;
$lang->load($extension . '.sys', JPATH_ADMINISTRATOR, null,
false, true)
|| $lang->load($extension . '.sys', $source, null, false,
true);
$item->name = JText::_($item->name);
}
}
/**
* Build an SQL query to load the list data.
*
* @return JDatabaseQuery
*/
protected function getListQuery()
{
// Create a new query object.
$db = $this->getDbo();
$query = $db->getQuery(true);
// Select the required fields from the table.
$query->select(
$this->getState(
'list.select',
'a.extension_id , a.name, a.element, a.folder, a.checked_out,
a.checked_out_time,' .
' a.enabled, a.access, a.ordering'
)
)
->from($db->quoteName('#__extensions') . ' AS
a')
->where($db->quoteName('type') . ' = ' .
$db->quote('plugin'));
// Join over the users for the checked out user.
$query->select('uc.name AS editor')
->join('LEFT', '#__users AS uc ON
uc.id=a.checked_out');
// Join over the asset groups.
$query->select('ag.title AS access_level')
->join('LEFT', '#__viewlevels AS ag ON ag.id =
a.access');
// Filter by access level.
if ($access = $this->getState('filter.access'))
{
$query->where('a.access = ' . (int) $access);
}
// Filter by published state.
$published = $this->getState('filter.enabled');
if (is_numeric($published))
{
$query->where('a.enabled = ' . (int) $published);
}
elseif ($published === '')
{
$query->where('(a.enabled IN (0, 1))');
}
// Filter by state.
$query->where('a.state >= 0');
// Filter by folder.
if ($folder = $this->getState('filter.folder'))
{
$query->where('a.folder = ' . $db->quote($folder));
}
// Filter by element.
if ($element = $this->getState('filter.element'))
{
$query->where('a.element = ' . $db->quote($element));
}
// Filter by search in name or id.
$search = $this->getState('filter.search');
if (!empty($search))
{
if (stripos($search, 'id:') === 0)
{
$query->where('a.extension_id = ' . (int) substr($search,
3));
}
}
return $query;
}
/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
*
* @since 3.5
*/
protected function loadFormData()
{
$data = parent::loadFormData();
// Set the selected filter values for pages that use the JLayouts for
filtering
$data->list['sortTable'] =
$this->state->get('list.ordering');
$data->list['directionTable'] =
$this->state->get('list.direction');
return $data;
}
}
PK��[���ccplugins.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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');
if (!JFactory::getUser()->authorise('core.manage',
'com_plugins'))
{
throw new
JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'),
403);
}
$controller = JControllerLegacy::getInstance('Plugins');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
PK��[����plugins.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension type="component" version="3.1"
method="upgrade">
<name>com_plugins</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_PLUGINS_XML_DESCRIPTION</description>
<administration>
<files folder="admin">
<filename>config.xml</filename>
<filename>controller.php</filename>
<filename>plugins.php</filename>
<folder>controllers</folder>
<folder>helpers</folder>
<folder>models</folder>
<folder>views</folder>
</files>
<languages folder="admin">
<language
tag="en-GB">language/en-GB.com_plugins.ini</language>
<language
tag="en-GB">language/en-GB.com_plugins.sys.ini</language>
</languages>
</administration>
</extension>
PK��[ptSxxviews/plugin/tmpl/edit.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.formvalidator');
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('bootstrap.tooltip');
$this->fieldsets = $this->form->getFieldsets('params');
$input = JFactory::getApplication()->input;
// In case of modal
$isModal = $input->get('layout') === 'modal' ? true
: false;
$layout = $isModal ? 'modal' : 'edit';
$tmpl = $isModal || $input->get('tmpl', '',
'cmd') === 'component' ?
'&tmpl=component' : '';
JFactory::getDocument()->addScriptDeclaration("
Joomla.submitbutton = function(task) {
if (task === 'plugin.cancel' ||
document.formvalidator.isValid(document.getElementById('style-form')))
{
Joomla.submitform(task,
document.getElementById('style-form'));
if (task !== 'plugin.apply') {
if (self !== top ) {
window.top.setTimeout('window.parent.location =
window.top.location.href', 1000);
window.parent.jQuery('#plugin" .
$this->item->extension_id .
"Modal').modal('hide');
}
}
}
};
");
?>
<form action="<?php echo
JRoute::_('index.php?option=com_plugins&view=plugin&layout='
. $layout . $tmpl . '&extension_id=' . (int)
$this->item->extension_id); ?>" method="post"
name="adminForm" id="style-form"
class="form-validate">
<div class="form-horizontal">
<?php echo JHtml::_('bootstrap.startTabSet',
'myTab', array('active' => 'general'));
?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'general', JText::_('COM_PLUGINS_PLUGIN')); ?>
<div class="row-fluid">
<div class="span9">
<?php if ($this->item->xml) : ?>
<?php if ($this->item->xml->description) : ?>
<h2>
<?php
if ($this->item->xml)
{
echo ($text = (string) $this->item->xml->name) ?
JText::_($text) : $this->item->name;
}
else
{
echo JText::_('COM_PLUGINS_XML_ERR');
}
?>
</h2>
<div class="info-labels">
<span class="label hasTooltip" title="<?php
echo JHtml::_('tooltipText',
'COM_PLUGINS_FIELD_FOLDER_LABEL',
'COM_PLUGINS_FIELD_FOLDER_DESC'); ?>">
<?php echo $this->form->getValue('folder');
?>
</span> /
<span class="label hasTooltip" title="<?php
echo JHtml::_('tooltipText',
'COM_PLUGINS_FIELD_ELEMENT_LABEL',
'COM_PLUGINS_FIELD_ELEMENT_DESC'); ?>">
<?php echo $this->form->getValue('element');
?>
</span>
</div>
<div>
<?php
$short_description =
JText::_($this->item->xml->description);
$this->fieldset = 'description';
$long_description =
JLayoutHelper::render('joomla.edit.fieldset', $this);
if (!$long_description) {
$truncated = JHtml::_('string.truncate',
$short_description, 550, true, false);
if (strlen($truncated) > 500) {
$long_description = $short_description;
$short_description = JHtml::_('string.truncate',
$truncated, 250);
if ($short_description == $long_description) {
$long_description = '';
}
}
}
?>
<p><?php echo $short_description; ?></p>
<?php if ($long_description) : ?>
<p class="readmore">
<a href="#" onclick="jQuery('.nav-tabs
a[href=\'#description\']').tab('show');">
<?php echo
JText::_('JGLOBAL_SHOW_FULL_DESCRIPTION'); ?>
</a>
</p>
<?php endif; ?>
</div>
<?php endif; ?>
<?php else : ?>
<div class="alert alert-error"><?php echo
JText::_('COM_PLUGINS_XML_ERR'); ?></div>
<?php endif; ?>
<?php
$this->fieldset = 'basic';
$html = JLayoutHelper::render('joomla.edit.fieldset', $this);
echo $html ? '<hr />' . $html : '';
?>
</div>
<div class="span3">
<?php echo JLayoutHelper::render('joomla.edit.global',
$this); ?>
<div class="form-vertical">
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('ordering');
?>
</div>
<div class="controls">
<?php echo $this->form->getInput('ordering');
?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('folder'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('folder'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('element');
?>
</div>
<div class="controls">
<?php echo $this->form->getInput('element');
?>
</div>
</div>
</div>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php if (isset($long_description) && $long_description !=
'') : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab',
'description',
JText::_('JGLOBAL_FIELDSET_DESCRIPTION')); ?>
<?php echo $long_description; ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php
$this->fieldsets = array();
$this->ignore_fieldsets = array('basic',
'description');
echo JLayoutHelper::render('joomla.edit.params', $this);
?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
</div>
<input type="hidden" name="task" value=""
/>
<?php echo JHtml::_('form.token'); ?>
</form>
PK��[�9Ү"views/plugin/tmpl/edit_options.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
foreach ($this->fieldsets as $name => $fieldset)
{
if (!isset($fieldset->repeat) || isset($fieldset->repeat) &&
$fieldset->repeat == false)
{
$label = !empty($fieldset->label) ? JText::_($fieldset->label) :
JText::_('COM_PLUGINS_' . $fieldset->name .
'_FIELDSET_LABEL', true);
$optionsname = 'options-' . $fieldset->name;
echo JHtml::_('bootstrap.addTab', 'myTab',
$optionsname, $label);
if (isset($fieldset->description) &&
trim($fieldset->description))
{
echo '<p class="tip">' .
$this->escape(JText::_($fieldset->description)) .
'</p>';
}
$hidden_fields = '';
foreach ($this->form->getFieldset($name) as $field)
{
if (!$field->hidden)
{
?>
<div class="control-group">
<div class="control-label">
<?php echo $field->label; ?>
</div>
<div class="controls">
<?php echo $field->input; ?>
</div>
</div>
<?php
}
else
{
$hidden_fields .= $field->input;
}
}
echo $hidden_fields;
echo JHtml::_('bootstrap.endTab');
}
}
PK��[�ن�views/plugin/tmpl/modal.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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 code is needed for proper check out in case of modal close
JFactory::getDocument()->addScriptDeclaration('
window.parent.jQuery(".modal").on("hidden", function
() {
if (typeof window.parent.jQuery("#plugin' .
$this->item->extension_id . 'Modal
iframe").contents().find("#closeBtn") !==
"undefined") {
window.parent.jQuery("#plugin' .
$this->item->extension_id . 'Modal
iframe").contents().find("#closeBtn").click();
}
});
');
?>
<button id="applyBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('plugin.apply');"></button>
<button id="saveBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('plugin.save');"></button>
<button id="closeBtn" type="button"
class="hidden"
onclick="Joomla.submitbutton('plugin.cancel');"></button>
<div class="container-popup">
<?php $this->setLayout('edit'); ?>
<?php echo $this->loadTemplate(); ?>
</div>
PK��[H"B���views/plugin/view.html.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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 to edit a plugin.
*
* @since 1.5
*/
class PluginsViewPlugin extends JViewLegacy
{
protected $item;
protected $form;
protected $state;
/**
* Display the view.
*
* @param string $tpl The name of the template file to parse;
automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
$this->state = $this->get('State');
$this->item = $this->get('Item');
$this->form = $this->get('Form');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors), 500);
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu',
true);
$canDo = JHelperContent::getActions('com_plugins');
JToolbarHelper::title(JText::sprintf('COM_PLUGINS_MANAGER_PLUGIN',
JText::_($this->item->name)), 'power-cord plugin');
// If not checked out, can save the item.
if ($canDo->get('core.edit'))
{
JToolbarHelper::apply('plugin.apply');
JToolbarHelper::save('plugin.save');
}
JToolbarHelper::cancel('plugin.cancel',
'JTOOLBAR_CLOSE');
JToolbarHelper::divider();
// Get the help information for the plugin item.
$lang = JFactory::getLanguage();
$help = $this->get('Help');
if ($lang->hasKey($help->url))
{
$debug = $lang->setDebug(false);
$url = JText::_($help->url);
$lang->setDebug($debug);
}
else
{
$url = null;
}
JToolbarHelper::help($help->key, false, $url);
}
}
PK��[|�@܋�views/plugins/tmpl/default.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');
$user = JFactory::getUser();
$listOrder =
$this->escape($this->state->get('list.ordering'));
$listDirn =
$this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'ordering';
if ($saveOrder)
{
$saveOrderingUrl =
'index.php?option=com_plugins&task=plugins.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', 'pluginList',
'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
?>
<form action="<?php echo
JRoute::_('index.php?option=com_plugins&view=plugins');
?>" method="post" name="adminForm"
id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif; ?>
<?php echo
JLayoutHelper::render('joomla.searchtools.default',
array('view' => $this)); ?>
<div class="clearfix"> </div>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<?php echo JText::_('COM_PLUGINS_MSG_MANAGE_NO_PLUGINS');
?>
</div>
<?php else : ?>
<table class="table table-striped"
id="pluginList">
<thead>
<tr>
<th width="1%" class="nowrap center
hidden-phone">
<?php echo JHtml::_('searchtools.sort', '',
'ordering', $listDirn, $listOrder, null, 'asc',
'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th width="1%" class="nowrap center">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th width="1%" class="nowrap center">
<?php echo JHtml::_('searchtools.sort',
'JSTATUS', 'enabled', $listDirn, $listOrder); ?>
</th>
<th class="title">
<?php echo JHtml::_('searchtools.sort',
'COM_PLUGINS_NAME_HEADING', 'name', $listDirn,
$listOrder); ?>
</th>
<th width="10%" class="nowrap
hidden-phone">
<?php echo JHtml::_('searchtools.sort',
'COM_PLUGINS_FOLDER_HEADING', 'folder', $listDirn,
$listOrder); ?>
</th>
<th width="10%" class="nowrap
hidden-phone">
<?php echo JHtml::_('searchtools.sort',
'COM_PLUGINS_ELEMENT_HEADING', 'element', $listDirn,
$listOrder); ?>
</th>
<th width="5%" class="hidden-phone">
<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ACCESS', 'access', $listDirn,
$listOrder); ?>
</th>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort',
'JGRID_HEADING_ID', 'extension_id', $listDirn,
$listOrder); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="8">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) :
$ordering = ($listOrder == 'ordering');
$canEdit = $user->authorise('core.edit',
'com_plugins');
$canCheckin = $user->authorise('core.manage',
'com_checkin') || $item->checked_out ==
$user->get('id') || $item->checked_out == 0;
$canChange = $user->authorise('core.edit.state',
'com_plugins') && $canCheckin;
?>
<tr class="row<?php echo $i % 2; ?>"
sortable-group-id="<?php echo $item->folder; ?>">
<td class="order nowrap center hidden-phone">
<?php
$iconClass = '';
if (!$canChange)
{
$iconClass = ' inactive';
}
elseif (!$saveOrder)
{
$iconClass = ' inactive tip-top hasTooltip"
title="' . JHtml::_('tooltipText',
'JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass;
?>">
<span class="icon-menu"
aria-hidden="true"></span>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none"
name="order[]" size="5" value="<?php echo
$item->ordering; ?>" class="width-20 text-area-order"
/>
<?php endif; ?>
</td>
<td class="center">
<?php echo JHtml::_('grid.id', $i,
$item->extension_id); ?>
</td>
<td class="center">
<?php echo JHtml::_('jgrid.published',
$item->enabled, $i, 'plugins.', $canChange); ?>
</td>
<td>
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i,
$item->editor, $item->checked_out_time, 'plugins.',
$canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit) : ?>
<a class="hasTooltip" href="<?php echo
JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id='
. (int) $item->extension_id); ?>" title="<?php echo
JText::_('JACTION_EDIT'); ?>">
<?php echo $item->name; ?></a>
<?php else : ?>
<?php echo $item->name; ?>
<?php endif; ?>
</td>
<td class="nowrap small hidden-phone">
<?php echo $this->escape($item->folder); ?>
</td>
<td class="nowrap small hidden-phone">
<?php echo $this->escape($item->element); ?>
</td>
<td class="small hidden-phone">
<?php echo $this->escape($item->access_level); ?>
</td>
<td class="hidden-phone">
<?php echo (int) $item->extension_id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<input type="hidden" name="task"
value="" />
<input type="hidden" name="boxchecked"
value="0" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
PK��[E��U��views/plugins/tmpl/default.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_PLUGINS_PLUGINS_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_PLUGINS_PLUGINS_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>
PK��[�v
� � views/plugins/view.html.phpnu�[���<?php
/**
* @package Joomla.Administrator
* @subpackage com_plugins
*
* @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 class for a list of plugins.
*
* @since 1.5
*/
class PluginsViewPlugins extends JViewLegacy
{
protected $items;
protected $pagination;
protected $state;
/**
* Display the view.
*
* @param string $tpl The name of the template file to parse;
automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors), 500);
}
$this->addToolbar();
return parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_plugins');
JToolbarHelper::title(JText::_('COM_PLUGINS_MANAGER_PLUGINS'),
'power-cord plugin');
if ($canDo->get('core.edit'))
{
JToolbarHelper::editList('plugin.edit');
}
if ($canDo->get('core.edit.state'))
{
JToolbarHelper::publish('plugins.publish',
'JTOOLBAR_ENABLE', true);
JToolbarHelper::unpublish('plugins.unpublish',
'JTOOLBAR_DISABLE', true);
JToolbarHelper::checkin('plugins.checkin');
}
if ($canDo->get('core.admin'))
{
JToolbarHelper::preferences('com_plugins');
}
JToolbarHelper::help('JHELP_EXTENSIONS_PLUGIN_MANAGER');
}
/**
* Returns an array of fields the table can be sorted by.
*
* @return array Array containing the field name to sort by as the key
and display text as value.
*
* @since 3.0
*/
protected function getSortFields()
{
return array(
'ordering' =>
JText::_('JGRID_HEADING_ORDERING'),
'enabled' => JText::_('JSTATUS'),
'name' => JText::_('JGLOBAL_TITLE'),
'folder' =>
JText::_('COM_PLUGINS_FOLDER_HEADING'),
'element' =>
JText::_('COM_PLUGINS_ELEMENT_HEADING'),
'access' =>
JText::_('JGRID_HEADING_ACCESS'),
'extension_id' => JText::_('JGRID_HEADING_ID'),
);
}
}
PK��[��m�
access.xmlnu�[���PK��[ok�bb
Bconfig.xmlnu�[���PK��[��VV�controller.phpnu�[���PK��[W�r
controllers/plugin.phpnu�[���PK��[J
�9ss>controllers/plugins.phpnu�[���PK��[C2J_
_
�helpers/plugins.phpnu�[���PK��[�_���models/fields/pluginelement.phpnu�[���PK��[7\��
o!models/fields/pluginordering.phpnu�[���PK��[���vva'models/fields/plugintype.phpnu�[���PK��[�s�
1 1 #+models/forms/filter_plugins.xmlnu�[���PK��[��
YY�4models/forms/plugin.xmlnu�[���PK��[l0q8a%a%C:models/plugin.phpnu�[���PK��[�/g55�_models/plugins.phpnu�[���PK��[���cc\plugins.phpnu�[���PK��[������plugins.xmlnu�[���PK��[ptSxx3�views/plugin/tmpl/edit.phpnu�[���PK��[�9Ү"��views/plugin/tmpl/edit_options.phpnu�[���PK��[�ن�V�views/plugin/tmpl/modal.phpnu�[���PK��[H"B���'�views/plugin/view.html.phpnu�[���PK��[|�@܋��views/plugins/tmpl/default.phpnu�[���PK��[E��U����views/plugins/tmpl/default.xmlnu�[���PK��[�v
� � �views/plugins/view.html.phpnu�[���PKt=�