Файловый менеджер - Редактировать - /var/www/html/components/com_kunena/src/Controller/Announcement/Edit/AnnouncementEditDisplay.php
Ðазад
<?php /** * Kunena Component * * @package Kunena.Site * @subpackage Controller.Announcement * * @copyright Copyright (C) 2008 - 2026 Kunena Team. All rights reserved. * @license https://www.gnu.org/copyleft/gpl.html GNU/GPL * @link https://www.kunena.org **/ namespace Kunena\Forum\Site\Controller\Announcement\Edit; \defined('_JEXEC') or die(); use Exception; use Joomla\CMS\Language\Text; use Kunena\Forum\Libraries\Controller\KunenaControllerDisplay; use Kunena\Forum\Libraries\Forum\Announcement\KunenaAnnouncementHelper; use Kunena\Forum\Libraries\Route\KunenaRoute; use RuntimeException; /** * Class ComponentAnnouncementControllerEditDisplay * * @since Kunena 4.0 */ class AnnouncementEditDisplay extends KunenaControllerDisplay { /** * @var string * @since Kunena 6.0 */ public $announcement; /** * @var string * @since Kunena 6.0 */ protected $name = 'Announcement/Edit'; /** * Prepare announcement form display. * * @return mixed * * @throws null * @throws Exception * @since Kunena 6.0 */ protected function before() { $result = parent::before(); if ($result === false) { return false; } $id = $this->input->getInt('id', null); $this->announcement = KunenaAnnouncementHelper::get($id); if (!$this->announcement) { throw new RuntimeException('Failed to load announcement'); } $this->announcement->tryAuthorise($id ? 'edit' : 'create'); $Itemid = $this->input->getInt('Itemid'); if (!$Itemid && $this->config->sefRedirect) { try { $itemid = KunenaRoute::fixMissingItemID(); $params = [ 'option' => 'com_kunena', 'view' => 'announcement', 'layout' => $id ? 'edit' : 'create', 'Itemid' => $itemid ]; if ($id) { $params['id'] = $id; } return $this->app->redirect(KunenaRoute::_('index.php?' . http_build_query($params), false)); } catch (Exception $e) { throw new RuntimeException('Failed to create controller: ' . $e->getMessage()); } } return true; } /** * Prepare document. * * @return void * * @throws Exception * @since Kunena 6.0 */ protected function prepareDocument() { $menu_item = $this->app->getMenu()->getActive(); if ($menu_item) { $params = $menu_item->getParams(); $params_title = $params->get('page_title'); $params_description = $params->get('menu-meta_description'); if (!empty($params_title)) { $title = $params->get('page_title'); $this->setTitle($title); } else { $this->setTitle(Text::_('COM_KUNENA_ANN_ANNOUNCEMENTS')); } if (!empty($params_description)) { $description = $params->get('menu-meta_description'); $this->setDescription($description); } else { $this->setDescription(Text::_('COM_KUNENA_ANN_ANNOUNCEMENTS')); } } } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка