<commit_before><?php
// Copyright 1999-2016. Parallels IP Holdings GmbH.

require_once __DIR__ . '/../../../vendor/autoload.php';

use PleskExt\SecurityAdvisor\Helper\Domain;

class Modules_SecurityAdvisor_View_List_Wordpress extends pm_View_List_Simple
{
    protected $_subscriptionId = null;

    /**
     * @var Modules_SecurityAdvisor_Helper_WordPress_Abstract
     */
    private $_wpHelper;

    private $_detailsUrl;

    public function __construct(Zend_View $view, Zend_Controller_Request_Abstract $request, array $options = [])
    {
        if (isset($options['subscriptionId'])) {
            $this->_subscriptionId = $options['subscriptionId'];
            unset($options['subscriptionId']);
        }
        parent::__construct($view, $request, $options);
    }

    protected function _init()
    {
        parent::_init();

        $this->_detailsUrl = version_compare(pm_ProductInfo::getVersion(), '17.0') >= 0
            ? '/modules/wp-toolkit/index.php/index/detail/id/%s'
            : '/admin/wordpress/detail/id/%s';

        $this->_wpHelper = Modules_SecurityAdvisor_Helper_WordPress::get();
        $this->setData($this->_fetchData());
        $this->setColumns($this->_getColumns());
        $this->setTools($this->_getTools());
    }

    private function _fetchData()
    {
        $allWp = $this->_wpHelper->getInstances();
        $wordpress = [];
        foreach ($allWp as $wp) {
            $properties = $this->_wpHelper->getInstanceProperties($wp['id']);
            if (0 === strpos($properties['url'], 'https://')) {
                $httpsImage = 'https-enabled.png';
                $httpsImageAlt = 'enabled';
                $httpsImageTitle = $this->lmsg('list.wordpress.httpsEnableTitle');
            } else {
                $httpsImage = 'https-disabled.png';<commit_msg>BUGFIX EXTPLESK-359 FIX: Customer can not access WP instance from Security Advisor<commit_after><?php
// Copyright 1999-2016. Parallels IP Holdings GmbH.

require_once __DIR__ . '/../../../vendor/autoload.php';

use PleskExt\SecurityAdvisor\Helper\Domain;

class Modules_SecurityAdvisor_View_List_Wordpress extends pm_View_List_Simple
{
    protected $_subscriptionId = null;

    /**
     * @var Modules_SecurityAdvisor_Helper_WordPress_Abstract
     */
    private $_wpHelper;

    private $_detailsUrl;

    public function __construct(Zend_View $view, Zend_Controller_Request_Abstract $request, array $options = [])
    {
        if (isset($options['subscriptionId'])) {
            $this->_subscriptionId = $options['subscriptionId'];
            unset($options['subscriptionId']);
        }
        parent::__construct($view, $request, $options);
    }

    protected function _init()
    {
        parent::_init();

        $this->_detailsUrl = version_compare(pm_ProductInfo::getVersion(), '17.0') >= 0
            ? '/modules/wp-toolkit/index.php/domain/detail/id/%s'
            : '/admin/wordpress/detail/id/%s';

        $this->_wpHelper = Modules_SecurityAdvisor_Helper_WordPress::get();
        $this->setData($this->_fetchData());
        $this->setColumns($this->_getColumns());
        $this->setTools($this->_getTools());
    }

    private function _fetchData()
    {
        $allWp = $this->_wpHelper->getInstances();
        $wordpress = [];
        foreach ($allWp as $wp) {
            $properties = $this->_wpHelper->getInstanceProperties($wp['id']);
            if (0 === strpos($properties['url'], 'https://')) {
                $httpsImage = 'https-enabled.png';
                $httpsImageAlt = 'enabled';
                $httpsImageTitle = $this->lmsg('list.wordpress.httpsEnableTitle');
            } else {
                $httpsImage = 'https-disabled.png';
{'fraction_non_alphanumeric': 0.1494066882416397, 'fraction_numerical': 0.007820927723840345, 'mean_word_length': 2.7578520770010133, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4427967', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1055, 'n_words': 172}