<commit_before><?php
    /**
     * @class  communicationView
     * @author NHN (<EMAIL>)
     * @brief View class of communication module
     **/

    class communicationView extends communication {

        /**
         * @brief Initialization
         **/
        function init() {
            $oCommunicationModel = &getModel('communication');

            $this->communication_config = $oCommunicationModel->getConfig();
            $skin = $this->communication_config->skin;

            Context::set('communication_config', $this->communication_config);

			$config_parse = explode('.', $skin);
			if (count($config_parse) > 1){
				$tpl_path = sprintf('./themes/%s/modules/communication/', $config_parse[0]);
			}else{
				$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
			}
            $this->setTemplatePath($tpl_path);
        }

        /**
         * @brief Display message box
         **/
        function dispCommunicationMessages() {
            // Error appears if not logged-in
            if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
            $logged_info = Context::get('logged_info');
            // Set the variables
            $message_srl = Context::get('message_srl');
            $message_type = Context::get('message_type');
            if(!in_array($message_type, array('R','S','T'))) {
                $message_type = 'R';
                Context::set('message_type', $message_type);
            }

            $oCommunicationModel = &getModel('communication');
            // extract contents if message_srl exists
            if($message_srl) {
				$columnList = array('message_srl', 'sender_srl', 'receiver_srl', 'message_type', 'title', 'content', 'readed', 'regdate');
                $message = $oCommunicationModel->getSelectedMessage($message_srl, $columnList);
                if($message->message_srl == $message_srl && ($message->receiver_srl == $logged_info->member_srl || $message->sender_srl == $logged_info->member_srl) ) {
					stripEmbedTagForAdmin($message->content, $message->sender_srl);
					Context::set('message', $message);
				}
            }
            // Extract a list
			$columnList = array('message_srl', 'readed', 'title', 'member.member_srl', 'member.nick_name', 'message.regdate', 'readed_date');
            $output = $oCommunicationModel->getMessages($message_type, $columnList);<commit_msg>Issue 954 block message list of member, when there is disabled coummunication addon<commit_after><?php
    /**
     * @class  communicationView
     * @author NHN (<EMAIL>)
     * @brief View class of communication module
     **/

    class communicationView extends communication {

        /**
         * @brief Initialization
         **/
        function init() {
            $oCommunicationModel = &getModel('communication');

            $this->communication_config = $oCommunicationModel->getConfig();
            $skin = $this->communication_config->skin;

            Context::set('communication_config', $this->communication_config);

			$config_parse = explode('.', $skin);
			if (count($config_parse) > 1){
				$tpl_path = sprintf('./themes/%s/modules/communication/', $config_parse[0]);
			}else{
				$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
			}
            $this->setTemplatePath($tpl_path);
        }

        /**
         * @brief Display message box
         **/
        function dispCommunicationMessages() {
            // Error appears if not logged-in
            if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
            $logged_info = Context::get('logged_info');
			if(!array_key_exists('dispCommunicationMessages', $logged_info->menu_list))
			{
				return $this->stop('msg_invalid_request');
			}

            // Set the variables
            $message_srl = Context::get('message_srl');
            $message_type = Context::get('message_type');
            if(!in_array($message_type, array('R','S','T'))) {
                $message_type = 'R';
                Context::set('message_type', $message_type);
            }

            $oCommunicationModel = &getModel('communication');
            // extract contents if message_srl exists
            if($message_srl) {
				$columnList = array('message_srl', 'sender_srl', 'receiver_srl', 'message_type', 'title', 'content', 'readed', 'regdate');
                $message = $oCommunicationModel->getSelectedMessage($message_srl, $columnList);
                if($message->message_srl == $message_srl && ($message->receiver_srl == $logged_info->member_srl || $message->sender_srl == $logged_info->member_srl) ) {
					stripEmbedTagForAdmin($message->content, $message->sender_srl);
					Context::set('message', $message);
				}
            }
            // Extract a list
			$columnList = array('message_srl', 'readed', 'title', 'member.member_srl', 'member.nick_name', 'message.regdate', 'readed_date');
            $output = $oCommunicationModel->getMessages($message_type, $columnList);
{'fraction_non_alphanumeric': 0.15246457792855717, 'fraction_numerical': 0.0013969267611255239, 'mean_word_length': 2.74869109947644, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 43, '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': '6530798', 'n_tokens_mistral': 1548, 'n_tokens_neox': 1425, 'n_words': 247}