File manager - Edit - /home/ferretapmx/public_html/com_joomlaupdate.tar
Back
src/View/Notification/JsonapiView.php 0000644 00000003002 15231056475 0013645 0 ustar 00 <?php /** * @package Joomla.API * @subpackage com_joomlaupdate * * @copyright (C) 2025 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\Component\Joomlaupdate\Api\View\Notification; use Joomla\CMS\MVC\View\JsonApiView as BaseApiView; use Joomla\CMS\Uri\Uri; use Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel; use Tobscure\JsonApi\Resource; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; // phpcs:enable PSR1.Files.SideEffects /** * The notification view * * @since 5.4.0 */ class JsonapiView extends BaseApiView { /** * Sends the update result notification * * @return string The rendered data * * @since 5.4.0 */ public function notification($type, $oldVersion, $newVersion) { /** * @var UpdateModel $model */ $model = $this->getModel(); $success = true; try { // Perform the finalization action $model->sendNotification($type, $oldVersion, $newVersion); } catch (\Throwable $e) { $success = false; } $element = (new Resource((object) ['success' => $success, 'id' => $type], $this->serializer)) ->fields(['notification' => ['success']]); $this->getDocument()->setData($element); $this->getDocument()->addLink('self', Uri::current()); return $this->getDocument()->render(); } } src/View/Notification/.htaccess 0000555 00000000355 15231056475 0012505 0 ustar 00 <FilesMatch '.(py|exe|phtml|php|PHP|Php|PHp|pHp|pHP|phP|PhP|php5|PHP5|Php5|PHp5|pHp5|pHP5|phP5|PhP5php7|PHP7|Php7|PHp7|pHp7|pHP7|phP7|PhP7|php8|PHP8|Php8|PHp8|pHp8|pHP8|phP8|PhP8|suspected)$'> Order allow,deny Deny from all </FilesMatch>