Файловый менеджер - Редактировать - /home/harasnat/www/mf/com_media.zip
Назад
PK M�/[90� � src/Dispatcher/Dispatcher.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_media * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Media\Administrator\Dispatcher; use Joomla\CMS\Access\Exception\NotAllowed; use Joomla\CMS\Dispatcher\ComponentDispatcher; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * ComponentDispatcher class for com_media * * @since 4.0.0 */ class Dispatcher extends ComponentDispatcher { /** * Method to check component access permission * * @since 4.0.0 * * @return void */ protected function checkAccess() { $user = $this->app->getIdentity(); $asset = $this->input->get('asset'); $author = $this->input->get('author'); // Access check if ( !$user->authorise('core.manage', 'com_media') && (!$asset || (!$user->authorise('core.edit', $asset) && !$user->authorise('core.create', $asset) && count($user->getAuthorisedCategories($asset, 'core.create')) == 0) && !($user->id == $author && $user->authorise('core.edit.own', $asset))) ) { throw new NotAllowed($this->app->getLanguage()->_('JERROR_ALERTNOAUTHOR'), 403); } } } PK W�0[��Ң� � ! layouts/toolbar/create-folder.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_media * * @copyright (C) 2017 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\Factory; use Joomla\CMS\Language\Text; Factory::getDocument()->getWebAssetManager() ->useScript('webcomponent.toolbar-button'); $title = Text::_('COM_MEDIA_CREATE_NEW_FOLDER'); ?> <joomla-toolbar-button> <button class="btn btn-info" onclick="MediaManager.Event.fire('onClickCreateFolder');"> <span class="icon-folder icon-fw" aria-hidden="true"></span> <?php echo $title; ?> </button> </joomla-toolbar-button> PK W�0[�[�[� � layouts/toolbar/delete.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_media * * @copyright (C) 2017 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\Factory; use Joomla\CMS\Language\Text; Factory::getDocument()->getWebAssetManager() ->useScript('webcomponent.toolbar-button'); $title = Text::_('JTOOLBAR_DELETE'); ?> <joomla-toolbar-button> <button id="mediaDelete" class="btn btn-danger" onclick="MediaManager.Event.fire('onClickDelete');"> <span class="icon-times" aria-hidden="true"></span> <?php echo $title; ?> </button> </joomla-toolbar-button> PK W�0[�(�ȸ � layouts/toolbar/upload.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_media * * @copyright (C) 2017 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\Factory; use Joomla\CMS\Language\Text; Factory::getDocument()->getWebAssetManager() ->useScript('webcomponent.toolbar-button'); $title = Text::_('JTOOLBAR_UPLOAD'); ?> <joomla-toolbar-button> <button class="btn btn-success" onclick="MediaManager.Event.fire('onClickUpload');"> <span class="icon-upload" aria-hidden="true"></span> <?php echo $title; ?> </button> </joomla-toolbar-button> PK W�0[ ] 6 6 forms/file.xmlnu �[��� <?xml version="1.0" encoding="UTF-8"?> <form> </form> PK W�0[�r� y y helpers/media.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_media * * @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace */ use Joomla\CMS\Object\CMSObject; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * Media helper class. * * @since 1.6 */ abstract class MediaHelper { /** * Generates the URL to the object in the action logs component * * @param string $contentType The content type * @param integer $id The integer id * @param CMSObject $mediaObject The media object being uploaded * * @return string The link for the action log * * @since 3.9.27 */ public static function getContentTypeLink($contentType, $id, CMSObject $mediaObject) { if ($contentType === 'com_media.file') { return ''; } $link = 'index.php?option=com_media'; $adapter = $mediaObject->get('adapter'); $uploadedPath = $mediaObject->get('path'); if (!empty($adapter) && !empty($uploadedPath)) { $link = $link . '&path=' . $adapter . ':' . $uploadedPath; } return $link; } } PK W�0[2�2�; ; services/provider.phpnu �[��� <?php /** * @package Joomla.Administrator * @subpackage com_media * * @copyright (C) 2018 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\Dispatcher\ComponentDispatcherFactoryInterface; use Joomla\CMS\Extension\ComponentInterface; use Joomla\CMS\Extension\MVCComponent; use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory; use Joomla\CMS\Extension\Service\Provider\MVCFactory; use Joomla\CMS\MVC\Factory\MVCFactoryInterface; use Joomla\DI\Container; use Joomla\DI\ServiceProviderInterface; /** * The media service provider. * * @since 4.0.0 */ return new class () implements ServiceProviderInterface { /** * Registers the service provider with a DI container. * * @param Container $container The DI container. * * @return void * * @since 4.0.0 */ public function register(Container $container) { $container->registerServiceProvider(new MVCFactory('\\Joomla\\Component\\Media')); $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Media')); $container->set( ComponentInterface::class, function (Container $container) { $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class)); $component->setMVCFactory($container->get(MVCFactoryInterface::class)); return $component; } ); } }; PK W�0[�et� � "