CoreFiles by mySites.guru
default.php55 lines, 1,942 bytes, from Joomla_4.0.0-rc3-Release_Candidate-Full_Package.zip
Raw History Compare with 4.0.0-rc2
md5
1f1b277296562a12810bf9aac1f0980c
sha1
eff6f5950b1ef7b8cbbd39e00526b1a1633a36f3
sha256
c8c440cc9a06f6de835dd60703dd24d5d20dc1b086636210d79aad9d21e2443c
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_media
 *
 * @copyright   (C) 2007 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\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Uri\Uri;

$params = ComponentHelper::getParams('com_media');

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
	->useStyle('com_media.mediamanager')
	->useScript('com_media.mediamanager');

// Populate the language
$this->loadTemplate('texts');

$tmpl = Factory::getApplication()->input->getCmd('tmpl');

// Load the toolbar when we are in an iframe
if ($tmpl === 'component')
{
	echo '<div class="subhead noshadow">';
	echo Toolbar::getInstance('toolbar')->render();
	echo '</div>';
}

// Populate the media config
$config = array(
	'apiBaseUrl'              => Uri::base() . 'index.php?option=com_media&format=json',
	'csrfToken'               => Session::getFormToken(),
	'filePath'                => $params->get('file_path', 'images'),
	'fileBaseUrl'             => Uri::root() . $params->get('file_path', 'images'),
	'fileBaseRelativeUrl'     => $params->get('file_path', 'images'),
	'editViewUrl'             => Uri::base() . 'index.php?option=com_media&view=file' . ($tmpl ? '&tmpl=' . $tmpl : ''),
	'allowedUploadExtensions' => $params->get('upload_extensions', ''),
	'imagesExtensions'        => $params->get('image_extensions', ''),
	'maxUploadSizeMb'         => $params->get('upload_maxsize', 10),
	'providers'               => (array) $this->providers,
	'currentPath'             => $this->currentPath,
	'isModal'                 => $tmpl === 'component',
);
$this->document->addScriptOptions('com_media', $config);
?>
<div id="com-media"></div>

The same content is in 5 releases, Joomla 4.0.0-beta6 to 4.0.0-rc3. See them all, or every version of this file.