CoreFiles by mySites.guru
update.php65 lines, 2,542 bytes, from Joomla_4.1.4-Stable-Full_Package.zip
Raw History Compare with 4.1.3
md5
bb1610f92ac048103eb17f5d4848b311
sha1
663caae7ca80313c25986ef60eaa23b76e2d5ed1
sha256
7479d2a2bdb03349ed0614b208b5e5d67a4efa8ec54470b557a88166c50f2be6
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_joomlaupdate
 *
 * @copyright   (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;

/** @var \Joomla\Component\Joomlaupdate\Administrator\View\Joomlaupdate\HtmlView $this */

/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('core')
	->useScript('com_joomlaupdate.default')
	->useScript('bootstrap.popover');

$uploadLink = 'index.php?option=com_joomlaupdate&view=upload';

$displayData = [
	'textPrefix' => 'COM_JOOMLAUPDATE_UPDATE',
	'title'      => Text::sprintf('COM_JOOMLAUPDATE_UPDATE_EMPTYSTATE_TITLE', $this->escape($this->updateInfo['latest'])),
	'content'    => Text::sprintf($this->langKey, $this->updateSourceKey),
	'formURL'    => 'index.php?option=com_joomlaupdate&view=joomlaupdate',
	'helpURL'    => 'https://docs.joomla.org/Special:MyLanguage/Updating_from_an_existing_version',
	'icon'       => 'icon-loop joomlaupdate',
	'createURL'  => '#'
];

if (isset($this->updateInfo['object']) && isset($this->updateInfo['object']->get('infourl')->_data)) :
	$displayData['content'] .= '<br>' . HTMLHelper::_('link',
		$this->updateInfo['object']->get('infourl')->_data,
		Text::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_INFOURL'),
		[
			'target' => '_blank',
			'rel'    => 'noopener noreferrer',
			'title'  => isset($this->updateInfo['object']->get('infourl')->title) ? Text::sprintf('JBROWSERTARGET_NEW_TITLE', $this->updateInfo['object']->get('infourl')->title) : ''
		]
	);
endif;

// Confirm backup and check
$displayData['content'] .= '<div class="form-check d-flex justify-content-center">
		<input class="form-check-input me-2" type="checkbox" value="" id="joomlaupdate-confirm-backup">
		<label class="form-check-label" for="joomlaupdate-confirm-backup">
		' . Text::_('COM_JOOMLAUPDATE_UPDATE_CONFIRM_BACKUP') . '
		</label>
	</div>';

if (Factory::getApplication()->getIdentity()->authorise('core.admin', 'com_joomlaupdate')) :
	$displayData['formAppend'] = '<div class="text-center"><a href="' . $uploadLink . '" class="btn btn-sm btn-outline-secondary">' . Text::_('COM_JOOMLAUPDATE_EMPTYSTATE_APPEND') . '</a></div>';
endif;

echo '<div id="joomlaupdate-wrapper">';

echo LayoutHelper::render('joomla.content.emptystate', $displayData);

echo '</div>';

The same content is in 9 releases, Joomla 4.1.3-rc1 to 4.2.0-beta1. See them all, or every version of this file.