403Webshell
Server IP : 104.21.84.107  /  Your IP : 104.23.243.196
Web Server : Apache/2.4.63 (Ubuntu)
System : Linux adminpruebas-Virtual-Machine 6.14.0-37-generic #37-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 22:10:32 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.4.5
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/icaoc/administrator/components/com_sppagebuilder/editor/traits/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/icaoc/administrator/components/com_sppagebuilder/editor/traits/PageDuplicateTrait.php
<?php


/**
 * @package SP Page Builder
 * @author JoomShaper http://www.joomshaper.com
 * @copyright Copyright (c) 2010 - 2025 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
 */

use Joomla\CMS\Language\Text;
use Joomla\CMS\Table\Table;

// No direct access
defined('_JEXEC') or die('Restricted access');

/**
 * Defines the trait for a Editor Controller Class.
 *
 * @since 4.1.0
 */
trait PageDuplicateTrait
{
    /**
     * Method to duplicate page item into the table.
     *
     * @param   integer     $id         Key to the sppagebuilder table.
     * @param   Table       $table      Content table object being loaded.
     *
     * @return  mixed       return the response.
     *
     * @since   4.1.0
     */
    public function duplicate()
    {
        $method = $this->getInputMethod();
        $this->checkNotAllowedMethods(['POST', 'PUT', 'DELETE', 'PATCH'], $method);

        $this->duplicatePage();
    }

    private function duplicatePage()
    {
        $id = $this->getInput('id', 0, 'INT');
        $model = $this->getModel('Editor');

        if (!$id)
        {
            $response['message'] = Text::_("COM_SPPAGEBUILDER_PAGE_ID_MISSING");
            $this->sendResponse($response, 400);
        }

        $data = $model->duplicatePage($id);

        $this->sendResponse($data->response, $data->code);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit