__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Editors.tinymce
 *
 * @copyright   (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Plugin\Editors\TinyMCE\PluginTraits;

use Joomla\CMS\Uri\Uri;
use Joomla\Filesystem\File;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Handles the editor.css files.
 *
 * @since  4.1.0
 */
trait ResolveFiles
{
    use ActiveSiteTemplate;

    /**
     * Compute the file paths to be included
     *
     * @param   string   $folder  Folder name to search in (i.e. images, css, js).
     * @param   string   $file    Path to file.
     *
     * @return  array    files to be included.
     *
     * @since   4.1.0
     */
    protected function includeRelativeFiles($folder, $file)
    {
        $fallback = Uri::root(true) . '/media/system/css/editor' . (JDEBUG ? '' : '.min') . '.css';
        $template = $this->getActiveSiteTemplate();

        if (!(array) $template) {
            return $fallback;
        }

        // Extract extension and strip the file
        $file       = File::stripExt($file) . '.' . File::getExt($file);
        $templaPath = $template->inheritable || (isset($template->parent) && $template->parent !== '')
            ? JPATH_ROOT . '/media/templates/site'
            : JPATH_ROOT . '/templates';

        if (isset($template->parent) && $template->parent !== '') {
            $found = static::resolveFileUrl("$templaPath/$template->template/$folder/$file");

            if (empty($found)) {
                $found = static::resolveFileUrl("$templaPath/$template->parent/$folder/$file");
            }
        } else {
            $found = static::resolveFileUrl("$templaPath/$template->template/$folder/$file");
        }

        if (empty($found)) {
            return $fallback;
        }

        return $found;
    }

    /**
     * Method that searches if file exists in given path and returns the relative path.
     * If a minified version exists it will be preferred.
     *
     * @param   string   $path          The actual path of the file
     *
     * @return  string  The relative path of the file
     *
     * @since   4.1.0
     */
    protected static function resolveFileUrl($path = '')
    {
        $position = strrpos($path, '.min.');

        // We are handling a name.min.ext file:
        if ($position !== false) {
            $minifiedPath    = $path;
            $nonMinifiedPath = substr_replace($path, '', $position, 4);

            if (JDEBUG && is_file($nonMinifiedPath)) {
                return Uri::root(true) . str_replace(JPATH_ROOT, '', $nonMinifiedPath);
            }

            if (is_file($minifiedPath)) {
                return Uri::root(true) . str_replace(JPATH_ROOT, '', $minifiedPath);
            }

            if (is_file($nonMinifiedPath)) {
                return Uri::root(true) . str_replace(JPATH_ROOT, '', $nonMinifiedPath);
            }

            return '';
        }

        $minifiedPath = pathinfo($path, PATHINFO_DIRNAME) . '/' . pathinfo($path, PATHINFO_FILENAME) . '.min.' . pathinfo($path, PATHINFO_EXTENSION);

        if (JDEBUG && is_file($path)) {
            return Uri::root(true) . str_replace(JPATH_ROOT, '', $path);
        }

        if (is_file($minifiedPath)) {
            return Uri::root(true) . str_replace(JPATH_ROOT, '', $minifiedPath);
        }

        return '';
    }
}

Filemanager

Name Type Size Permission Actions
ActiveSiteTemplate.php File 1.32 KB 0664
DisplayTrait.php File 24.21 KB 0664
GlobalFilters.php File 6.85 KB 0664
KnownButtons.php File 4.89 KB 0664
ResolveFiles.php File 3.44 KB 0664
ToolbarPresets.php File 3.11 KB 0664
XTDButtons.php File 3.64 KB 0664
Filemanager