Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /home/claqxcrl/anfangola.com/wp-content/plugins/matomo/app/core/Tracker/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/claqxcrl/anfangola.com/wp-content/plugins/matomo/app/core/Tracker/ActionPageview.php
<?php

/**
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 *
 */
namespace Piwik\Tracker;

use Piwik\Config;
/**
 * This class represents a page view, tracking URL, page title and generation time.
 *
 */
class ActionPageview extends \Piwik\Tracker\Action
{
    public function __construct(\Piwik\Tracker\Request $request)
    {
        parent::__construct(\Piwik\Tracker\Action::TYPE_PAGE_URL, $request);
        $url = $request->getParam('url');
        $this->setActionUrl($url);
        $actionName = $request->getParam('action_name');
        $actionName = $this->cleanupActionName($actionName);
        $this->setActionName($actionName);
    }
    protected function getActionsToLookup()
    {
        return array('idaction_name' => array($this->getActionName(), \Piwik\Tracker\Action::TYPE_PAGE_TITLE), 'idaction_url' => $this->getUrlAndType());
    }
    public static function shouldHandle(\Piwik\Tracker\Request $request)
    {
        return !\Piwik\Tracker\Action::isCustomActionRequest($request);
    }
    public function getIdActionUrlForEntryAndExitIds()
    {
        return $this->getIdActionUrl();
    }
    public function getIdActionNameForEntryAndExitIds()
    {
        return $this->getIdActionName();
    }
    private function cleanupActionName($actionName)
    {
        // get the delimiter, by default '/'; BC, we read the old action_category_delimiter first (see #1067)
        $actionCategoryDelimiter = $this->getActionCategoryDelimiter();
        if ($actionCategoryDelimiter === '') {
            return $actionName;
        }
        // create an array of the categories delimited by the delimiter
        $split = explode($actionCategoryDelimiter, $actionName);
        $split = $this->trimEveryCategory($split);
        $split = $this->removeEmptyCategories($split);
        return $this->rebuildNameOfCleanedCategories($actionCategoryDelimiter, $split);
    }
    private function rebuildNameOfCleanedCategories($actionCategoryDelimiter, $split)
    {
        return implode($actionCategoryDelimiter, $split);
    }
    private function removeEmptyCategories($split)
    {
        return array_filter($split, 'strlen');
    }
    private function trimEveryCategory($split)
    {
        return array_map('trim', $split);
    }
    private function getActionCategoryDelimiter()
    {
        if (isset(Config::getInstance()->General['action_category_delimiter'])) {
            return Config::getInstance()->General['action_category_delimiter'];
        }
        return Config::getInstance()->General['action_title_category_delimiter'];
    }
}

ZeroDay Forums Mini