<commit_before><?php
	$category_var_name = $id;
	$category = get_category_by_var_name($category_var_name);
	
	if ($category)
	{
		$category_id = $category['id'];
		
		$type_var_name = $extra;
		$type_id = get_type_id_by_varname($type_var_name);
		
		$jobsCount = 0;
		
		if ($type_id)
		{
			$jobsCount =  $job->CountJobs($id, $type_id);
		}
		else
		{
			$jobsCount =  $job->CountJobs($id);
		}
		
		$paginatorLink = BASE_URL . URL_JOBS . "/$category_var_name";
	
		if (isset($type_var_name))
			$paginatorLink .= "/$type_var_name";
			
		$paginator = new Paginator($jobsCount, JOBS_PER_PAGE, @$_REQUEST['p']);
		$paginator->setLink($paginatorLink);
		$paginator->paginate();
		
		$firstLimit = $paginator->getFirstLimit();
		$lastLimit = $paginator->getLastLimit();
		
		$the_jobs = $job->GetPaginatedJobsForCategory($category_id, $firstLimit, JOBS_PER_PAGE, $type_id);
		
		$statisticalData = array();
		
		if (count($the_jobs))
		{
			$jobIDs = array();
			
			foreach ($the_jobs as $index => $aJob)
				$jobIDs[] = $aJob['id'];
			
			$statisticalData = $job->GetApplicationsStatistics($jobIDs);
		}

		$smarty->assign("pages", $paginator->pages_link);
		
		$smarty->assign('jobs', $the_jobs);
		$smarty->assign('jobs_count', $jobsCount);
		$smarty->assign('types', get_types());
		$smarty->assign('current_category', $category_var_name);
		$smarty->assign('current_category_name', $category['name']);
	
		$template = 'category.tpl';
	}
	else
	{
		redirect_to(BASE_URL . 'page-unavailable/');
		exit;
	}

	$template = 'category.tpl';
?><commit_msg>fixed: the number of applicants was no longer shown (a line of code was deleted with the last refactoring)<commit_after><?php
	$category_var_name = $id;
	$category = get_category_by_var_name($category_var_name);
	
	if ($category)
	{
		$category_id = $category['id'];
		
		$type_var_name = $extra;
		$type_id = get_type_id_by_varname($type_var_name);
		
		$jobsCount = 0;
		
		if ($type_id)
		{
			$jobsCount =  $job->CountJobs($id, $type_id);
		}
		else
		{
			$jobsCount =  $job->CountJobs($id);
		}
		
		$paginatorLink = BASE_URL . URL_JOBS . "/$category_var_name";
	
		if (isset($type_var_name))
			$paginatorLink .= "/$type_var_name";
			
		$paginator = new Paginator($jobsCount, JOBS_PER_PAGE, @$_REQUEST['p']);
		$paginator->setLink($paginatorLink);
		$paginator->paginate();
		
		$firstLimit = $paginator->getFirstLimit();
		$lastLimit = $paginator->getLastLimit();
		
		$the_jobs = $job->GetPaginatedJobsForCategory($category_id, $firstLimit, JOBS_PER_PAGE, $type_id);
		
		$statisticalData = array();
		
		if (count($the_jobs))
		{
			$jobIDs = array();
			
			foreach ($the_jobs as $index => $aJob)
				$jobIDs[] = $aJob['id'];
			
			$statisticalData = $job->GetApplicationsStatistics($jobIDs);
		}

		$smarty->assign("pages", $paginator->pages_link);
		
		$smarty->assign('statisticalData', $statisticalData);
		$smarty->assign('jobs', $the_jobs);
		$smarty->assign('jobs_count', $jobsCount);
		$smarty->assign('types', get_types());
		$smarty->assign('current_category', $category_var_name);
		$smarty->assign('current_category_name', $category['name']);
	
		$template = 'category.tpl';
	}
	else
	{
		redirect_to(BASE_URL . 'page-unavailable/');
		exit;
	}

	$template = 'category.tpl';
?>
{'fraction_non_alphanumeric': 0.1772657450076805, 'fraction_numerical': 0.0006144393241167435, 'mean_word_length': 4.51864406779661, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, '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': '2244246', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1191, 'n_words': 184}