<commit_before><?php
/**
 * @copyright 2008 City of Bloomington, Indiana
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
 * @author <NAME> <<EMAIL>>
 * @param GET committee_id
 */
$committee = new Committee($_GET['committee_id']);

$format = isset($_GET['format']) ? $_GET['format'] : 'html';
$template = new Template('default',$format);
$template->title = $committee->getName();

if ($template->outputFormat == 'html') {
	$template->blocks[] = new Block('committees/breadcrumbs.inc',array('committee'=>$committee));
}

$template->blocks[] = new Block('committees/committeeDescription.inc',
								  array('committee'=>$committee));
$template->blocks['panel-one'][] = new Block('committees/committeeInfo.inc',
											 array('committee'=>$committee));

if ($template->outputFormat == 'html') {
	$seats = new Block('committees/seats.inc');
	$seats->committee = $committee;
	$template->blocks[] = $seats;

	$topics = $committee->getTopics();
	if (count($topics)) {
		$template->blocks[] = new Block('topics/tagCloud.inc',array('topicList'=>$topics));

	}

	$votingComparison = new Block('topics/votingRecordComparison.inc');
	$votingComparison->topicList = $committee->getTopics();
	$template->blocks[] = $votingComparison;

	$topics = new Block('topics/topicList.inc');
	$topics->topicList = $committee->getTopics();
	$topics->committee = $committee;
	$template->blocks[] = $topics;
}

echo $template->render();<commit_msg>Committee topics are now split up into pages.  15 items per page<commit_after><?php
/**
 * @copyright 2008 City of Bloomington, Indiana
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt
 * @author <NAME> <<EMAIL>>
 * @param GET committee_id
 */
$committee = new Committee($_GET['committee_id']);

$format = isset($_GET['format']) ? $_GET['format'] : 'html';
$template = new Template('default',$format);
$template->title = $committee->getName();

if ($template->outputFormat == 'html') {
	$template->blocks[] = new Block('committees/breadcrumbs.inc',array('committee'=>$committee));
}

$template->blocks[] = new Block('committees/committeeDescription.inc',
								  array('committee'=>$committee));
$template->blocks['panel-one'][] = new Block('committees/committeeInfo.inc',
											 array('committee'=>$committee));

if ($template->outputFormat == 'html') {
	$seats = new Block('committees/seats.inc');
	$seats->committee = $committee;
	$template->blocks[] = $seats;

	$topics = $committee->getTopics();
	if (count($topics)) {
		$template->blocks[] = new Block('topics/tagCloud.inc',array('topicList'=>$topics));

	}

	$votingComparison = new Block('topics/votingRecordComparison.inc');
	$votingComparison->topicList = $committee->getTopics();
	$template->blocks[] = $votingComparison;


	$topicList = $committee->getTopics();
	if (count($topicList) > 15) {
		$pages = new Paginator($topicList,15);
		$page = (isset($_GET['page']) && $_GET['page'])
				? (int)$_GET['page']
				: 0;
		if (!$pages->offsetExists($page)) {
			$page = 0;
		}
		$topicList = new LimitIterator($topicList,$pages[$page],$pages->getPageSize());
	}
	$template->blocks[] = new Block('topics/topicList.inc',
									array('topicList'=>$topicList,'committee'=>$committee));

	if (isset($pages)) {
		$pageNavigation = new Block('pageNavigation.inc');
		$pageNavigation->page = $page;
		$pageNavigation->pages = $pages;
		$pageNavigation->url = new URL($_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);

		$template->blocks[] = $pageNavigation;
	}

}

echo $template->render();
{'fraction_non_alphanumeric': 0.20629073391895722, 'fraction_numerical': 0.004533862283933126, 'mean_word_length': 5.635338345864661, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 62, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5265708', 'n_tokens_mistral': 1244, 'n_tokens_neox': 1112, 'n_words': 197}