AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/components/com_kunena/src/Layout/Widget/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/components/com_kunena/src/Layout/Widget//WidgetEditor.php
<?php

/**
 * Kunena Component
 * 
 * @package         Kunena.Site
 * @subpackage      Layout.widget
 *
 * @copyright       Copyright (C) 2008 - 2025 Kunena Team. All rights reserved.
 * @license         https://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link            https://www.kunena.org
 **/

namespace Kunena\Forum\Site\Layout\Widget;

\defined('_JEXEC') or die;

use Kunena\Forum\Libraries\Config\KunenaConfig;
use Kunena\Forum\Libraries\Factory\KunenaFactory;
use Kunena\Forum\Libraries\Layout\KunenaLayout;
use Kunena\Forum\Libraries\User\KunenaUserHelper;
use Exception;

/**
 * KunenaLayoutTopicEditEditor
 *
 * @since  K4.0
 */
class WidgetEditor extends KunenaLayout
{
    public $privateMessage;

    public $wa;

    public $template;

    public $allow_polls;

    public $doc;

    public $config;

    public $message;

    /**
     * Check if user is able to have images and links buttons in the editor
     *
     * @return void
     * @throws Exception
     * @since Kunena 5.2.0
     */
    public function getAllowedtoUseLinksImages()
    {
        $this->ktemplate  = KunenaFactory::getTemplate();
        $templatesettings = $this->ktemplate->params;
        $me               = KunenaUserHelper::getMyself();

        if ($me->checkUserAllowedLinksImages()) {
            $this->addScriptOptions('com_kunena.ckeditor_remove_buttons_url_image', KunenaConfig::getInstance()->new_users_prevent_post_url_images);
            $editorbuttons = $templatesettings->get('editorButtons');

            if (empty($editorbuttons)) {
                $templatesettings->set('editorButtons', 'Image,Link,Unlink');
            } else {
                if (strstr($editorbuttons, 'Image') !== false && strstr($editorbuttons, 'Link,Unlink') === false) {
                    $editorbuttons .= ',Link,Unlink';
                    $templatesettings->set('editorButtons', $editorbuttons);
                } elseif (strstr($editorbuttons, 'Link,Unlink') !== false && strstr($editorbuttons, 'Image') == false) {
                    $editorbuttons .= ',Image';
                    $templatesettings->set('editorButtons', $editorbuttons);
                } else {
                    $editorbuttons .= ',Link,Unlink,Image';
                    $templatesettings->set('editorButtons', $editorbuttons);
                }
            }
        }
    }
}

Anon7 - 2022
AnonSec Team