Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/zenit/administrator/components/com_installer/src/View/Update/ |
Upload File : |
<?php
/**
* @package Joomla.Administrator
* @subpackage com_installer
*
* @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Installer\Administrator\View\Update;
\defined('_JEXEC') or die;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Installer\Administrator\Helper\InstallerHelper as CmsInstallerHelper;
use Joomla\Component\Installer\Administrator\View\Installer\HtmlView as InstallerViewDefault;
/**
* Extension Manager Update View
*
* @since 1.6
*/
class HtmlView extends InstallerViewDefault
{
/**
* List of update items.
*
* @var array
*/
protected $items;
/**
* List pagination.
*
* @var \Joomla\CMS\Pagination\Pagination
*/
protected $pagination;
/**
* How many updates require but are missing Download Keys
*
* @var integer
* @since 4.0.0
*/
protected $missingDownloadKeys = 0;
/**
* @var boolean
* @since 4.0.0
*/
private $isEmptyState = false;
/**
* Display the view.
*
* @param string $tpl Template
*
* @return void
*
* @since 1.6
*/
public function display($tpl = null)
{
// Get data from the model.
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
$paths = new \stdClass;
$paths->first = '';
$this->paths = &$paths;
if (count($this->items) === 0 && $this->isEmptyState = $this->get('IsEmptyState'))
{
$this->setLayout('emptystate');
}
else
{
Factory::getApplication()->enqueueMessage(Text::_('COM_INSTALLER_MSG_WARNINGS_UPDATE_NOTICE'), 'warning');
}
// Find if there are any updates which require but are missing a Download Key
if (!class_exists('Joomla\Component\Installer\Administrator\Helper\InstallerHelper'))
{
require_once JPATH_COMPONENT_ADMINISTRATOR . '/Helper/InstallerHelper.php';
}
$mappingCallback = function ($item) {
$dlkeyInfo = CmsInstallerHelper::getDownloadKey(new CMSObject($item));
$item->isMissingDownloadKey = $dlkeyInfo['supported'] && !$dlkeyInfo['valid'];
if ($item->isMissingDownloadKey)
{
$this->missingDownloadKeys++;
}
return $item;
};
$this->items = array_map($mappingCallback, $this->items);
if ($this->missingDownloadKeys)
{
$url = 'index.php?option=com_installer&view=updatesites&filter[supported]=-1';
$msg = Text::plural('COM_INSTALLER_UPDATE_MISSING_DOWNLOADKEY_LABEL_N', $this->missingDownloadKeys, $url);
Factory::getApplication()->enqueueMessage($msg, CMSApplication::MSG_WARNING);
}
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
if (false === $this->isEmptyState)
{
ToolbarHelper::custom('update.update', 'upload', '', 'COM_INSTALLER_TOOLBAR_UPDATE', true);
}
ToolbarHelper::custom('update.find', 'refresh', '', 'COM_INSTALLER_TOOLBAR_FIND_UPDATES', false);
ToolbarHelper::divider();
parent::addToolbar();
ToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_UPDATE');
}
}