<commit_before><?php
    /**
     * @brief Function to change point icon.
     **/
    function pointLevelIconTrans($matches) {
        $member_srl = $matches[3];
        if($member_srl<1) return $matches[0];

        $orig_text = preg_replace('/'.preg_quote($matches[5],'/').'<\/'.$matches[6].'>$/', '', $matches[0]);

		// Check Group Image Mark
		$oMemberModel = &getModel('member');
		if($oMemberModel->getGroupImageMark($member_srl)) return $orig_text.$matches[5].'</'.$matches[6].'>';

        if(!isset($GLOBALS['_pointLevelIcon'][$member_srl])) {
            // Get point configuration
            if(!$GLOBALS['_pointConfig']) {
                $oModuleModel = &getModel('module');
                $GLOBALS['_pointConfig'] = $oModuleModel->getModuleConfig('point');
            }
            $config = $GLOBALS['_pointConfig'];
            // Get point model
            if(!$GLOBALS['_pointModel']) $GLOBALS['_pointModel'] = getModel('point');
            $oPointModel = &$GLOBALS['_pointModel'];
            // Get points
            $point = $oPointModel->getPoint($member_srl);
            // Get level
            $level = $oPointModel->getLevel($point, $config->level_step);
            $text = $matches[5];
            // Get a path where level icon is
            $level_icon = sprintf('%smodules/point/icons/%s/%d.gif', Context::getRequestUri(), $config->level_icon, $level);
            // Get per to go to the next level if not a top level
            if($level < $config->max_level) {
                $next_point = $config->level_step[$level+1];
                $present_point = $config->level_step[$level];
                if($next_point > 0) { 
                    $per = (int)(($point - $present_point) / ($next_point - $present_point)*100);
                    $per = $per.'%';
                }
            }

            $title = sprintf('%s:%s%s%s, %s:%s/%s', Context::getLang('point'), $point, $config->point_name, $per?' ('.$per.')':'', Context::getLang('level'), $level, $config->max_level);
            $alt = sprintf('[%s:%s]', Context::getLang('level'), $level);

//            $GLOBALS['_pointLevelIcon'][$member_srl] = sprintf('<img src="%s" alt="%s" title="%s" style="vertical-align:middle; margin-right:3px;" />', $level_icon, $alt, $title);
        }
        $text = $GLOBALS['_pointLevelIcon'][$member_srl];
<commit_msg>fixed show level icon<commit_after><?php
    /**
     * @brief Function to change point icon.
     **/
    function pointLevelIconTrans($matches) {
        $member_srl = $matches[3];
        if($member_srl<1) return $matches[0];

        $orig_text = preg_replace('/'.preg_quote($matches[5],'/').'<\/'.$matches[6].'>$/', '', $matches[0]);

		// Check Group Image Mark
		$oMemberModel = &getModel('member');
		if($oMemberModel->getGroupImageMark($member_srl)) return $orig_text.$matches[5].'</'.$matches[6].'>';

        if(!isset($GLOBALS['_pointLevelIcon'][$member_srl])) {
            // Get point configuration
            if(!$GLOBALS['_pointConfig']) {
                $oModuleModel = &getModel('module');
                $GLOBALS['_pointConfig'] = $oModuleModel->getModuleConfig('point');
            }
            $config = $GLOBALS['_pointConfig'];
            // Get point model
            if(!$GLOBALS['_pointModel']) $GLOBALS['_pointModel'] = getModel('point');
            $oPointModel = &$GLOBALS['_pointModel'];
            // Get points
            $point = $oPointModel->getPoint($member_srl);
            // Get level
            $level = $oPointModel->getLevel($point, $config->level_step);
            $text = $matches[5];
            // Get a path where level icon is
            $level_icon = sprintf('%smodules/point/icons/%s/%d.gif', Context::getRequestUri(), $config->level_icon, $level);
            // Get per to go to the next level if not a top level
            if($level < $config->max_level) {
                $next_point = $config->level_step[$level+1];
                $present_point = $config->level_step[$level];
                if($next_point > 0) { 
                    $per = (int)(($point - $present_point) / ($next_point - $present_point)*100);
                    $per = $per.'%';
                }
            }

            $title = sprintf('%s:%s%s%s, %s:%s/%s', Context::getLang('point'), $point, $config->point_name, $per?' ('.$per.')':'', Context::getLang('level'), $level, $config->max_level);
            $alt = sprintf('[%s:%s]', Context::getLang('level'), $level);

            $GLOBALS['_pointLevelIcon'][$member_srl] = sprintf('<img src="%s" alt="%s" title="%s" style="vertical-align:middle; margin-right:3px;" />', $level_icon, $alt, $title);
        }
        $text = $GLOBALS['_pointLevelIcon'][$member_srl];

{'fraction_non_alphanumeric': 0.19297503173931443, 'fraction_numerical': 0.006347862886161659, 'mean_word_length': 2.4604685212298683, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 33, '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': '4035520', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1443, 'n_words': 249}