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

class Modules_SecurityAdvisor_View_List_Subscription extends Modules_SecurityAdvisor_View_List_Common
{
    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);
    }

    public static function getContextSubscriptionId()
    {
        $subscription = \Session::get()->subscription()->getCurrentSubscription();
        if ($subscription) {
            return $subscription->getDomainId();<commit_msg>BUGFIX EXTPLESK-337 Cannot select needed subscription via webspace switcher<commit_after><?php
// Copyright 1999-2016. Parallels IP Holdings GmbH.

class Modules_SecurityAdvisor_View_List_Subscription extends Modules_SecurityAdvisor_View_List_Common
{
    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);
    }

    public static function getContextSubscriptionId()
    {
        $context = \Session::get()->subscription();
        if ($context->showAll) {
            return null;
        }

        if ($subscription = $context->getCurrentSubscription()) {
            return $subscription->getDomainId();
{'fraction_non_alphanumeric': 0.11605532170775706, 'fraction_numerical': 0.011425135297654841, 'mean_word_length': 3.6222222222222222, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, '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': '3096324', 'n_tokens_mistral': 440, 'n_tokens_neox': 440, 'n_words': 87}