1. Josh Carrier
  2. phpHgAdmin

Source

phpHgAdmin / admin / application / helpers / hg_template_helper.php

The default branch has multiple heads

<?php 

function theme_name()
{
	return get_phphginfo('theme_name');
}

function get_theme_resource($rel_path)
{
	// FIXME do not allow reverse directory traversal
	include(FCPATH . 'themes/'.theme_name().'/'.$rel_path);
}

function get_header()
{
	get_theme_resource('header.php');
}

function get_footer()
{
	get_theme_resource('footer.php');
}

function is_directory()
{
	return get_phphginfo('pagetype') === 'directory';
}

function is_repo_config()
{
	return get_phphginfo('pagetype') === 'config';
}

function is_repo_browser()
{
	return get_phphginfo('pagetype') == 'browser';
}

function has_messages()
{
	return get_phphginfo('user_msg') !== FALSE;
}

function user_messages()
{
	phphginfo('user_msg');
}

function has_errors()
{
	return get_phphginfo('user_err') !== FALSE;
}

function user_errors()
{
	phphginfo('user_err');
}

function the_title()
{
	phphginfo('title');
}

function phphginfo($item)
{
	echo get_phphginfo($item);
}

function get_phphginfo($item)
{
	$ci =& get_instance();
	if(isset($ci->load->_ci_cached_vars[$item]))
	{
		return $ci->load->_ci_cached_vars[$item];
	}
	return FALSE;
}