__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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.Administrator
 * @subpackage  com_menus
 *
 * @copyright   (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Menus\Administrator\Controller;

use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Table\Table;

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

/**
 * The menu controller for ajax requests
 *
 * @since  3.9.0
 */
class AjaxController extends BaseController
{
    /**
     * Method to fetch associations of a menu item
     *
     * The method assumes that the following http parameters are passed in an Ajax Get request:
     * token: the form token
     * assocId: the id of the menu item whose associations are to be returned
     * excludeLang: the association for this language is to be excluded
     *
     * @return  null
     *
     * @since  3.9.0
     */
    public function fetchAssociations()
    {
        if (!Session::checkToken('get')) {
            echo new JsonResponse(null, Text::_('JINVALID_TOKEN'), true);
        } else {
            $assocId   = $this->input->getInt('assocId', 0);

            if ($assocId == 0) {
                echo new JsonResponse(null, Text::sprintf('JLIB_FORM_VALIDATE_FIELD_INVALID', 'assocId'), true);

                return;
            }

            $excludeLang = $this->input->get('excludeLang', '', 'STRING');

            $associations = Associations::getAssociations('com_menus', '#__menu', 'com_menus.item', (int) $assocId, 'id', '', '');

            unset($associations[$excludeLang]);

            // Add the title to each of the associated records
            Table::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_menus/tables');
            $menuTable = Table::getInstance('Menu', '\\Joomla\\CMS\\Table\\', []);

            foreach ($associations as $association) {
                $menuTable->load($association->id);
                $association->title = $menuTable->title;
            }

            $countContentLanguages = \count(LanguageHelper::getContentLanguages([0, 1], false));

            if (\count($associations) == 0) {
                $message = Text::_('JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_NONE');
            } elseif ($countContentLanguages > \count($associations) + 2) {
                $tags    = implode(', ', array_keys($associations));
                $message = Text::sprintf('JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_SOME', $tags);
            } else {
                $message = Text::_('JGLOBAL_ASSOCIATIONS_PROPAGATE_MESSAGE_ALL');
            }

            echo new JsonResponse($associations, $message);
        }
    }
}

Filemanager

Name Type Size Permission Actions
AjaxController.php File 2.87 KB 0664
DisplayController.php File 2.27 KB 0664
ItemController.php File 19.92 KB 0664
ItemsController.php File 7.35 KB 0664
MenuController.php File 8.01 KB 0664
MenusController.php File 3.02 KB 0664
Filemanager