Файловый менеджер - Редактировать - /var/www/html/components/com_jchat/Controller/AvatarController.php
Ðазад
<?php namespace JExtstore\Component\JChat\Site\Controller; /** * @package JCHAT::AVATAR::components::com_jchat * @subpackage controllers * @author Joomla! Extensions Store * @Copyright (C) 2015 - Joomla! Extensions Store * @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html */ defined('_JEXEC') or die('Restricted access'); use JExtstore\Component\JChat\Administrator\Framework\Controller as JChatController; /** * Avatars files controller * Manage all actions, from upload to delete * * @package JCHAT::AVATAR::components::com_jchat * @subpackage controllers * @since 1.0 */ class AvatarController extends JChatController { /** * Set model state always getting fresh vars from POST request * * @access protected * @param string $scope * @param boolean $ordering * @return object */ protected function setModelState($scope = 'default', $ordering = true): object { // Get default model $defaultModel = $this->getModel(); // Set model state for basic stream $defaultModel->setState('option', $this->option); return $defaultModel; } /** * Display data for JS client on stream read * * @access public * @return void */ public function display($cachable = false, $urlparams = false) { // Populate model state and get model $model = $this->setModelState('chatavatar', false); // Show always form view parent::display($cachable, $urlparams); } /** * Save data from JS clilent on stream write * * @access public * @return bool */ public function saveEntity(): bool { // Populate model state and get model $model = $this->setModelState('chatattachments', false); // Upload file $model->storeEntity(); // Show always form view parent::display(); return true; } /** * Save data from JS clilent on stream write * * @access public * @return bool */ public function deleteEntity(): bool { // Populate model state and get model $model = $this->setModelState('chatattachments', false); // Upload file $model->deleteEntity(); // Show always form view parent::display(); return true; } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка