config() static public method

# -----------------------------------------------------------------------------------------------
static public config ( $key = null, $value = null, $guess_repo = true )
Example #1
0
# prepare for rendering
gb::$title[] = 'Setup';
$is_writable = is_writable(gb::$site_dir);
if (!$is_writable) {
    gb::$errors[] = '<b>Ooops.</b> The directory <code>' . h(gb::$site_dir) . '</code> is not writable.
		Gitblog need to create a few files in this directory.
		<br/><br/>
		Please make this directory (highlighted above) writable and then reload this page.';
    # todo: check if the web server user and/or is the same as user and/or group
    #       on directory. If so, suggest a chmod, otherwise suggest a chown.
}
if (!isset($_POST['email'])) {
    $_POST['email'] = git::config('user.email');
}
if (!isset($_POST['name'])) {
    $_POST['name'] = git::config('user.name');
}
include '_header.php';
?>
<script type="text/javascript" charset="utf-8">
	$(function(){
		$('input[name=email]').focus();
	});
</script>
<div id="content" class="setup margins">
	<h2>Setup your gitblog</h2>
	<p>
		It's time to setup your new gitblog.
	</p>
	<form action="setup.php" method="post">