<commit_before><?php defined('BX_DOL') or die('hack attempt');
/**
 * Copyright (c) UNA, Inc - https://una.io
 * MIT License - https://opensource.org/licenses/MIT
 *
 * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
 * @ingroup     UnaModules
 *
 * @{
 */

class BxNexusModule extends BxDolModule
{
    function __construct(&$aModule)
    {
        parent::__construct($aModule);
    }

    /**
     * Get injection code required for Nexus apps
     * @return string
     */
    public function serviceInjectionHeadBegin()
    {
        $s = '';
        if (false !== strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp/Desktop')) {
            $s .= "<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>";
        }
        return $s;
    }
    
    /**
     * Get injection code required for Nexus apps
     * @return string with Styles and JS code
     */
    public function serviceInjectionHead()
    {
        if (false === strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp')) 
            return '';

        $this->redirects();

        $aBubbles = array();
        $iBubbles = BxDolPush::getNotificationsCount(0, $aBubbles);

        $s = $this->_oTemplate->parseHtmlByName('styles.html', array());
        if ($sCustomStyles = getParam('bx_nexus_option_styles'))
            $s .= "<style>\n" . $sCustomStyles . "\n</style>";

        $oProfile = BxDolProfile::getInstance();
        $s .= $this->_oTemplate->parseHtmlByName('js.html', array(<commit_msg>#3975 Nexus app: php warning<commit_after><?php defined('BX_DOL') or die('hack attempt');
/**
 * Copyright (c) UNA, Inc - https://una.io
 * MIT License - https://opensource.org/licenses/MIT
 *
 * @defgroup    Nexus Nexus - Mobile Apps and Desktop apps connector
 * @ingroup     UnaModules
 *
 * @{
 */

class BxNexusModule extends BxDolModule
{
    function __construct(&$aModule)
    {
        parent::__construct($aModule);
    }

    /**
     * Get injection code required for Nexus apps
     * @return string
     */
    public function serviceInjectionHeadBegin()
    {
        $s = '';
        if (false !== strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp/Desktop')) {
            $s .= "<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>";
        }
        return $s;
    }
    
    /**
     * Get injection code required for Nexus apps
     * @return string with Styles and JS code
     */
    public function serviceInjectionHead()
    {
        if (!isset($_SERVER['HTTP_USER_AGENT']) || false === strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp')) 
            return '';

        $this->redirects();

        $aBubbles = array();
        $iBubbles = BxDolPush::getNotificationsCount(0, $aBubbles);

        $s = $this->_oTemplate->parseHtmlByName('styles.html', array());
        if ($sCustomStyles = getParam('bx_nexus_option_styles'))
            $s .= "<style>\n" . $sCustomStyles . "\n</style>";

        $oProfile = BxDolProfile::getInstance();
        $s .= $this->_oTemplate->parseHtmlByName('js.html', array(
{'fraction_non_alphanumeric': 0.15419354838709678, 'fraction_numerical': 0.001935483870967742, 'mean_word_length': 2.6611570247933884, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, 'https://': 4, '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': '3862184', 'n_tokens_mistral': 967, 'n_tokens_neox': 940, 'n_words': 208}