- md5
- c3fdd9b2c75d8276871e583953cdbc71
- sha1
- 44c76fa341c94e79b2256a6a037f999bfa753411
- sha256
- 3a6dc2f8e890c2ac4b0391d23c440ae49a75331d48dfba1b9578af0cd52cb2a6
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
<?php
/**
* @package Joomla.Administrator
* @subpackage com_media
*
* @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\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Router\Route;
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' => Route::_('index.php?option=com_media&format=json', false, Route::TLS_IGNORE, true),
'csrfToken' => Session::getFormToken(),
'filePath' => $params->get('file_path', 'images'),
'fileBaseUrl' => Uri::root() . $params->get('file_path', 'images'),
'fileBaseRelativeUrl' => $params->get('file_path', 'images'),
'editViewUrl' => Route::_('index.php?option=com_media&view=file' . ($tmpl ? '&tmpl=' . $tmpl : ''), false, Route::TLS_IGNORE, true),
'allowedUploadExtensions' => $params->get('upload_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>
No other release has this exact content. See every version of this file.