- md5
- cf9ebb082c397d55e326fd73d1868c46
- sha1
- a5c718dd9816e005bf0446e902bb9830c56dd4b5
- sha256
- eb1eef38f1e8071c2797ef0169c01ef90d93ad59dd2c7f8062bc72a715bfc7d8
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
<?php
/**
* @package Joomla.Administrator
* @subpackage com_media
*
* @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;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Uri\Uri;
$doc = Factory::getDocument();
$params = ComponentHelper::getParams('com_media');
// Make sure core.js is loaded before media scripts
HTMLHelper::_('behavior.core');
HTMLHelper::_('behavior.keepalive');
// Add javascripts
HTMLHelper::_('script', 'media/com_media/js/mediamanager.js');
// Add stylesheets
HTMLHelper::_('stylesheet', 'media/com_media/css/mediamanager.css');
// 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 Toolbar::getInstance('toolbar')->render();
}
// Populate the media config
$config = array(
'apiBaseUrl' => Uri::root() . 'administrator/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::root() . 'administrator/index.php?option=com_media&view=file' . (!empty($tmpl) ? ('&tmpl=' . $tmpl) : ''),
'allowedUploadExtensions' => $params->get('upload_extensions', ''),
'maxUploadSizeMb' => $params->get('upload_maxsize', 10),
'providers' => (array) $this->providers,
'currentPath' => $this->currentPath,
'isModal' => Factory::getApplication()->input->getCmd('tmpl', '') === 'component' ? true : false,
);
$doc->addScriptOptions('com_media', $config);
?>
<div id="com-media"></div>
The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.