Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/ptitsanes/components/com_solidres/ |
Upload File : |
<?php
/**
------------------------------------------------------------------------
SOLIDRES - Accommodation booking extension for Joomla
------------------------------------------------------------------------
* @author Solidres Team <contact@solidres.com>
* @website https://www.solidres.com
* @copyright Copyright (C) 2013 - 2019 Solidres. All Rights Reserved.
* @license GNU General Public License version 3, or later
------------------------------------------------------------------------
*/
defined('_JEXEC') or die;
/**
* Solidres Component Controller
*
* @package Solidres
* @since 0.1.0
*/
class SolidresController extends SRControllerLegacy
{
/**
* Method to display a view.
*
* @param boolean $cachable If true, the view output will be cached
* @param boolean $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JControllerLegacy This object to support chaining.
* @since 1.5
*/
public function display($cachable = false, $urlparams = false)
{
$cachable = true;
JHtml::_('stylesheet', 'com_solidres/assets/main.min.css', array('version' => SRVersion::getHashVersion(), 'relative' => true));
$safeurlparams = array(
'catid' => 'INT',
'id' => 'INT',
'cid' => 'ARRAY',
'year' => 'INT',
'month' => 'INT',
'limit' => 'INT',
'limitstart' => 'INT',
'showall' => 'INT',
'return' => 'BASE64',
'filter' => 'STRING',
'filter_order' => 'CMD',
'filter_order_Dir' => 'CMD',
'filter-search' => 'STRING',
'print' => 'BOOLEAN',
'lang' => 'CMD',
'location' => 'STRING',
'categories' => 'STRING',
'mode' => 'STRING',
'Itemid' => 'UINT',
'layout' => 'STRING'
);
$viewName = $this->input->get('view');
$user = JFactory::getUser();
JPluginHelper::importPlugin('solidres');
JFactory::getApplication()->triggerEvent('onSolidresBeforeDisplay', array($viewName, &$cachable, &$safeurlparams));
$return = JUri::getInstance()->toString();
switch ($viewName)
{
case 'articles':
if ($user->get('guest') == 1)
{
// Redirect to login page.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login&return=' . base64_encode($return), false));
return;
}
if (!$user->authorise('core.create', 'com_content'))
{
return;
}
if ($this->input->get('layout') === 'modal')
{
JHtml::_('stylesheet', 'system/adminlist.css', array(), true);
$this->addViewPath(JPATH_ADMINISTRATOR . '/components/com_solidres/views');
JForm::addFormPath(JPATH_ADMINISTRATOR . '/components/com_solidres/models/forms');
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_solidres/models');
$model = JModelLegacy::getInstance('Articles', 'SolidresModel', array('ignore_request' => true));
$model->setState('filter.author_id', $user->get('id'));
$model->setState('filter.author_id.include', true);
$document = JFactory::getDocument();
$viewType = $document->getType();
$viewName = 'Articles';
$viewLayout = 'modal';
$view = $this->getView($viewName, $viewType, '', array('base_path' => JPATH_ADMINISTRATOR . '/components/com_solidres', 'layout' => $viewLayout));
$view->setModel($model, true);
$view->document = $document;
$view->display();
}
break;
default:
parent::display($cachable, $safeurlparams);
break;
}
return $this;
}
}