- md5
- bfc8fbd0facacb5e463815f5260e7da7
- sha1
- 15f43214d1f5a286a8f2f141e26a1c8b5862ba7a
- sha256
- 25eca5026c969efcabb32b85a95dcc5b30daf72f33d9aa013d0ccbc52a8794e3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
<?php
/**
* @package Joomla.Administrator
* @subpackage com_media
*
* @copyright Copyright (C) 2005 - 2019 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;
$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' => $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.