- md5
- 4042b633dca9033e2db1ff0b0296b84e
- sha1
- a18a5aec120564cf2ae160c0bd3a9b15daaa9ca6
- sha256
- accbccbe08a37658a2b0535799a8a2fc6af34c7c296142033d768cd67321f48b
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
<?php
/**
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright Copyright (C) 2005 - 2018 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\CMS\Component\ComponentHelper;
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
/**
* View class for a list of logs.
*
* @since 3.9.0
*/
class ActionlogsViewActionlogs extends JViewLegacy
{
/**
* An array of items.
*
* @var array
* @since 3.9.0
*/
protected $items;
/**
* The model state
*
* @var array
* @since 3.9.0
*/
protected $state;
/**
* The pagination object
*
* @var JPagination
* @since 3.9.0
*/
protected $pagination;
/**
* The active search filters
*
* @var array
* @since 3.9.0
*/
public $activeFilters;
/**
* Method to display the view.
*
* @param string $tpl A template file to load. [optional]
*
* @return mixed A string if successful, otherwise an Error object.
*
* @since 3.9.0
*/
public function display($tpl = null)
{
$params = ComponentHelper::getParams('com_actionlogs');
$this->items = $this->get('Items');
$this->state = $this->get('State');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
$this->pagination = $this->get('Pagination');
$this->showIpColumn = (bool) $params->get('ip_logging', 0);
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolBar();
// Load all actionlog plugins language files
ActionlogsHelper::loadActionLogPluginsLanguage();
return parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 3.9.0
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_('COM_ACTIONLOGS_MANAGER_USERLOGS'), 'list-2');
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'actionlogs.delete');
$bar = JToolbar::getInstance('toolbar');
$bar->appendButton('Confirm', 'COM_ACTIONLOGS_PURGE_CONFIRM', 'delete', 'COM_ACTIONLOGS_TOOLBAR_PURGE', 'actionlogs.purge', false);
JToolbarHelper::preferences('com_actionlogs');
JToolbarHelper::help('JHELP_COMPONENTS_ACTIONLOGS');
JToolBarHelper::custom('actionlogs.exportSelectedLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_CSV', true);
JToolBarHelper::custom('actionlogs.exportLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_ALL_CSV', false);
}
}
The same content is in 3 releases, Joomla 3.9.0 to 3.9.1. See them all, or every version of this file.