<commit_before><?php
/**
* @package ivacuum.ru
* @copyright (c) 2013
*/

namespace app;

use app\models\page;

/**
* Пользователи
*/
class users extends page
{
	public function index()
	{
		trigger_error('NOT_IMPLEMENTED');
	}
	
	/**
	* Просмотр профиля
	*/
	public function profile($user_id)
	{
		if ($user_id != $this->user['user_id'])
		{
			$sql = '
				SELECT
					*
				FROM
					site_users
				WHERE
					user_id = ?';
			$this->db->query($sql, [$user_id]);
			$row = $this->db->fetchrow();
			$this->db->freeresult();
		}
		else
		{
			/* Просмотр своего профиля */
			$row = $this->user->data;
		}
		
		if (!$row)
		{
			trigger_error('PAGE_NOT_FOUND');
		}
		
		$this->breadcrumbs($row['username'], $this->user_profile_link('raw', $row['username'], false, $row['user_url'], $row['user_id']), 'card_address');
		
		/* Загрузка званий */
		$ranks = $this->cache->obtain_ranks();
		
		$this->template->assign([
			'COMMENTS'   => $row['user_posts'],
			'FROM'       => $row['user_from'],
			'INTERESTS'  => $row['user_interests'],
			'ICQ'        => number_format(intval($row['user_icq']), 0, '.', '-'),
			'IP'         => $row['user_ip'],
			'JID'        => $row['user_jid'],
			'LASTVISIT'  => $row['user_session_time'] ? $this->user->create_date($row['user_session_time']) : '',
			'OCCUPATION' => $row['user_occ'],
			'ONLINE'     => $this->user->ctime - $row['user_session_time'] < $this->config['load_online_time'],
			
			'RANK_IMG'   => isset($ranks[$row['user_rank']]['rank_image']) ? $ranks[$row['user_rank']]['rank_image'] : '',
			'RANK_TITLE' => isset($ranks[$row['user_rank']]['rank_title']) ? $ranks[$row['user_rank']]['rank_title'] : '',
			'REGDATE'    => $this->user->create_date($row['user_regdate']),
			'USERNAME'   => $this->user_profile_link('plain', $row['username'], $row['user_colour'])
		]);
	}
}
<commit_msg>Отказ от использования параметра user_session_time<commit_after><?php
/**
* @package ivacuum.ru
* @copyright (c) 2013
*/

namespace app;

use app\models\page;

/**
* Пользователи
*/
class users extends page
{
	public function index()
	{
		trigger_error('NOT_IMPLEMENTED');
	}
	
	/**
	* Просмотр профиля
	*/
	public function profile($user_id)
	{
		if ($user_id != $this->user['user_id'])
		{
			$sql = '
				SELECT
					*
				FROM
					site_users
				WHERE
					user_id = ?';
			$this->db->query($sql, [$user_id]);
			$row = $this->db->fetchrow();
			$this->db->freeresult();
		}
		else
		{
			/* Просмотр своего профиля */
			$row = $this->user->data;
		}
		
		if (!$row)
		{
			trigger_error('PAGE_NOT_FOUND');
		}
		
		$this->breadcrumbs($row['username'], $this->user_profile_link('raw', $row['username'], false, $row['user_url'], $row['user_id']), 'card_address');
		
		/* Загрузка званий */
		$ranks = $this->cache->obtain_ranks();
		
		$this->template->assign([
			'COMMENTS'   => $row['user_posts'],
			'FROM'       => $row['user_from'],
			'INTERESTS'  => $row['user_interests'],
			'ICQ'        => number_format(intval($row['user_icq']), 0, '.', '-'),
			'IP'         => $row['user_ip'],
			'JID'        => $row['user_jid'],
			'LASTVISIT'  => $row['user_last_visit'] ? $this->user->create_date($row['user_last_visit']) : '',
			'OCCUPATION' => $row['user_occ'],
			'ONLINE'     => $this->user->ctime - $row['user_last_visit'] < $this->config['load_online_time'],
			
			'RANK_IMG'   => isset($ranks[$row['user_rank']]['rank_image']) ? $ranks[$row['user_rank']]['rank_image'] : '',
			'RANK_TITLE' => isset($ranks[$row['user_rank']]['rank_title']) ? $ranks[$row['user_rank']]['rank_title'] : '',
			'REGDATE'    => $this->user->create_date($row['user_regdate']),
			'USERNAME'   => $this->user_profile_link('plain', $row['username'], $row['user_colour'])
		]);
	}
}

{'fraction_non_alphanumeric': 0.23405972558514931, 'fraction_numerical': 0.0026903416733925207, 'mean_word_length': 3.809831824062096, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 75, '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': '7176372', 'n_tokens_mistral': 1638, 'n_tokens_neox': 1459, 'n_words': 190}