- md5
- 3c5c889fbed6dec9afbf6b1981f213c2
- sha1
- 5d48be5272d6dfb860165958c43a3b2506f61ea0
- sha256
- d72101328eb70a70f2f663679d7c160e15aefa419d9b9636e339a6bae3b28e74
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
<?php
/**
* @package Joomla.Administrator
* @subpackage com_templates
*
* @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\Router\Route;
/** @var \Joomla\Component\Templates\Administrator\View\Template\HtmlView $this */
// Legacy is the default
if (!count($this->mediaFiles)) {
return;
}
ksort($this->mediaFiles, SORT_STRING);
?>
<ul class="directory-tree treeselect">
<?php foreach ($this->mediaFiles as $key => $value) : ?>
<?php if (is_array($value)) : ?>
<?php
$keyArray = explode('/', rtrim($key, '\\'));
$fileArray = explode('/', $this->fileName);
$count = 0;
$keyArrayCount = count($keyArray);
if (count($fileArray) >= $keyArrayCount) {
for ($i = 0; $i < $keyArrayCount; $i++) {
if ($keyArray[$i] === $fileArray[$i]) {
$count++;
}
}
if ($count === $keyArrayCount) {
$class = 'folder show';
} else {
$class = 'folder';
}
} else {
$class = 'folder';
}
?>
<li class="<?php echo $class; ?>">
<a class="folder-url" href="">
<span class="icon-folder icon-fw" aria-hidden="true"></span> <?php $explodeArray = explode('/', $key);
echo $this->escape(end($explodeArray)); ?>
</a>
<?php echo $this->mediaTree($value); ?>
</li>
<?php endif; ?>
<?php if (is_object($value)) : ?>
<li>
<a class="file" href="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . $this->id . '&file=' . $value->id . '&isMedia=1'); ?>">
<span class="icon-file-alt" aria-hidden="true"></span> <?php echo $this->escape($value->name); ?>
</a>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
The same content is in 5 releases, Joomla 5.1.0-beta1 to 5.1.0. See them all, or every version of this file.