Require instead of include for required files
Require instead of include for required files

--- a/include/display.git_blob.php
+++ b/include/display.git_blob.php
@@ -7,11 +7,11 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_get_hash_by_path.php');
- include_once('gitutil.git_cat_file.php');
- include_once('gitutil.git_read_commit.php');
- include_once('util.file_mime.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_get_hash_by_path.php');
+ require_once('gitutil.git_cat_file.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('util.file_mime.php');
 
 function git_blob($projectroot, $project, $hash, $file, $hashbase)
 {
@@ -57,17 +57,19 @@
 		if ($usedgeshi) {
 			$usedgeshi = FALSE;
 			include_once($gitphp_conf['geshiroot'] . "geshi.php");
-			$geshi = new GeSHi("",'php');
-			if ($geshi) {
-				$lang = "";
-				if (isset($file))
-					$lang = $geshi->get_language_name_from_extension(substr(strrchr($file,'.'),1));
-				if (isset($lang) && (strlen($lang) > 0)) {
-					$geshi->set_source($catout);
-					$geshi->set_language($lang);
-					$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS);
-					echo $geshi->parse_code();
-					$usedgeshi = TRUE;
+			if (class_exists("GeSHi")) {
+				$geshi = new GeSHi("",'php');
+				if ($geshi) {
+					$lang = "";
+					if (isset($file))
+						$lang = $geshi->get_language_name_from_extension(substr(strrchr($file,'.'),1));
+					if (isset($lang) && (strlen($lang) > 0)) {
+						$geshi->set_source($catout);
+						$geshi->set_language($lang);
+						$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS);
+						echo $geshi->parse_code();
+						$usedgeshi = TRUE;
+					}
 				}
 			}
 		}

--- a/include/display.git_blob_plain.php
+++ b/include/display.git_blob_plain.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_cat_file.php');
- include_once('util.file_mime.php');
+ require_once('gitutil.git_cat_file.php');
+ require_once('util.file_mime.php');
 
 function git_blob_plain($projectroot,$project,$hash,$file)
 {

--- a/include/display.git_blobdiff.php
+++ b/include/display.git_blobdiff.php
@@ -7,9 +7,9 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.prep_tmpdir.php');
- include_once('gitutil.git_read_commit.php');
- include_once('display.git_diff_print.php');
+ require_once('util.prep_tmpdir.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('display.git_diff_print.php');
 
 function git_blobdiff($projectroot,$project,$hash,$hashbase,$hashparent,$file)
 {

--- a/include/display.git_blobdiff_plain.php
+++ b/include/display.git_blobdiff_plain.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.prep_tmpdir.php');
- include_once('display.git_diff_print.php');
+ require_once('util.prep_tmpdir.php');
+ require_once('display.git_diff_print.php');
 
 function git_blobdiff_plain($projectroot,$project,$hash,$hashbase,$hashparent,$file)
 {

--- a/include/display.git_commit.php
+++ b/include/display.git_commit.php
@@ -7,10 +7,10 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.file_type.php');
- include_once('util.date_str.php');
- include_once('gitutil.git_read_commit.php');
- include_once('gitutil.git_diff_tree.php');
+ require_once('util.file_type.php');
+ require_once('util.date_str.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('gitutil.git_diff_tree.php');
 
 function git_commit($projectroot,$project,$hash)
 {

--- a/include/display.git_commitdiff.php
+++ b/include/display.git_commitdiff.php
@@ -7,12 +7,12 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.file_type.php');
- include_once('util.prep_tmpdir.php');
- include_once('gitutil.git_read_commit.php');
- include_once('gitutil.git_diff_tree.php');
- include_once('gitutil.read_info_ref.php');
- include_once('display.git_diff_print.php');
+ require_once('util.file_type.php');
+ require_once('util.prep_tmpdir.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('gitutil.git_diff_tree.php');
+ require_once('gitutil.read_info_ref.php');
+ require_once('display.git_diff_print.php');
 
 function git_commitdiff($projectroot,$project,$hash,$hash_parent)
 {

--- a/include/display.git_commitdiff_plain.php
+++ b/include/display.git_commitdiff_plain.php
@@ -7,14 +7,14 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.prep_tmpdir.php');
- include_once('util.date_str.php');
- include_once('util.script_url.php');
- include_once('gitutil.git_read_commit.php');
- include_once('gitutil.git_diff_tree.php');
- include_once('gitutil.git_rev_list.php');
- include_once('gitutil.read_info_ref.php');
- include_once('display.git_diff_print.php');
+ require_once('util.prep_tmpdir.php');
+ require_once('util.date_str.php');
+ require_once('util.script_url.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('gitutil.git_diff_tree.php');
+ require_once('gitutil.git_rev_list.php');
+ require_once('gitutil.read_info_ref.php');
+ require_once('display.git_diff_print.php');
 
 function git_commitdiff_plain($projectroot,$project,$hash,$hash_parent)
 {

--- a/include/display.git_diff_print.php
+++ b/include/display.git_diff_print.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_cat_file.php');
+ require_once('gitutil.git_cat_file.php');
 
 function git_diff_print($proj,$from,$from_name,$to,$to_name,$format = "html")
 {

--- a/include/display.git_heads.php
+++ b/include/display.git_heads.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_read_refs.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_refs.php');
 
 function git_heads($projectroot,$project)
 {

--- a/include/display.git_history.php
+++ b/include/display.git_history.php
@@ -7,11 +7,11 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_get_hash_by_path.php');
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_read_commit.php');
- include_once('gitutil.read_info_ref.php');
- include_once('gitutil.git_history_list.php');
+ require_once('gitutil.git_get_hash_by_path.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('gitutil.read_info_ref.php');
+ require_once('gitutil.git_history_list.php');
 
 function git_history($projectroot,$project,$hash,$file)
 {

--- a/include/display.git_log.php
+++ b/include/display.git_log.php
@@ -7,11 +7,11 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.date_str.php');
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_read_revlist.php');
- include_once('gitutil.git_read_commit.php');
- include_once('gitutil.read_info_ref.php');
+ require_once('util.date_str.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_revlist.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('gitutil.read_info_ref.php');
 
 function git_log($projectroot,$project,$hash,$page)
 {

--- a/include/display.git_opml.php
+++ b/include/display.git_opml.php
@@ -7,10 +7,10 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.script_url.php');
- include_once('gitutil.git_read_projects.php');
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_read_commit.php');
+ require_once('util.script_url.php');
+ require_once('gitutil.git_read_projects.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_commit.php');
 
 function git_opml($projectroot,$projectlist)
 {

--- a/include/display.git_project_index.php
+++ b/include/display.git_project_index.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_read_projects.php');
+ require_once('gitutil.git_read_projects.php');
 
 function git_project_index($projectroot, $projectlist)
 {

--- a/include/display.git_project_list.php
+++ b/include/display.git_project_list.php
@@ -7,12 +7,12 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.projectcmp.php');
- include_once('util.descrcmp.php');
- include_once('util.ownercmp.php');
- include_once('util.agecmp.php');
- include_once('display.git_project_listentry.php');
- include_once('gitutil.git_read_projects.php');
+ require_once('util.projectcmp.php');
+ require_once('util.descrcmp.php');
+ require_once('util.ownercmp.php');
+ require_once('util.agecmp.php');
+ require_once('display.git_project_listentry.php');
+ require_once('gitutil.git_read_projects.php');
 
 function git_project_list($projectroot,$projectlist,$order = "project")
 {

--- a/include/display.git_project_listentry.php
+++ b/include/display.git_project_listentry.php
@@ -7,10 +7,10 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_project_descr.php');
- include_once('gitutil.git_project_owner.php');
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_read_commit.php');
+ require_once('gitutil.git_project_descr.php');
+ require_once('gitutil.git_project_owner.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_commit.php');
 
 function git_project_listentry($projectroot,$project,$class,$indent)
 {

--- a/include/display.git_rss.php
+++ b/include/display.git_rss.php
@@ -7,13 +7,13 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.constants.php');
- include_once('util.date_str.php');
- include_once('util.script_url.php');
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_read_revlist.php');
- include_once('gitutil.git_read_commit.php');
- include_once('gitutil.git_diff_tree.php');
+ require_once('defs.constants.php');
+ require_once('util.date_str.php');
+ require_once('util.script_url.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_revlist.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('gitutil.git_diff_tree.php');
 
 function git_rss($projectroot,$project)
 {

--- a/include/display.git_search.php
+++ b/include/display.git_search.php
@@ -7,9 +7,9 @@
  *  Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
  */
 
-include_once('defs.constants.php');
-include_once('gitutil.git_read_commit.php');
-include_once('gitutil.git_rev_list.php');
+require_once('defs.constants.php');
+require_once('gitutil.git_read_commit.php');
+require_once('gitutil.git_rev_list.php');
 
 function git_search($projectroot, $project, $hash, $search, $searchtype, $page = 0)
 {

--- a/include/display.git_shortlog.php
+++ b/include/display.git_shortlog.php
@@ -7,11 +7,11 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.date_str.php');
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_read_revlist.php');
- include_once('gitutil.git_read_commit.php');
- include_once('gitutil.read_info_ref.php');
+ require_once('util.date_str.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_revlist.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('gitutil.read_info_ref.php');
 
 function git_shortlog($projectroot,$project,$hash,$page)
 {

--- a/include/display.git_snapshot.php
+++ b/include/display.git_snapshot.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_tar_tree.php');
+ require_once('gitutil.git_tar_tree.php');
 
 function git_snapshot($projectroot,$project,$hash)
 {

--- a/include/display.git_summary.php
+++ b/include/display.git_summary.php
@@ -7,14 +7,14 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.date_str.php');
- include_once('gitutil.git_project_descr.php');
- include_once('gitutil.git_project_owner.php');
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_read_commit.php');
- include_once('gitutil.git_read_revlist.php');
- include_once('gitutil.git_read_refs.php');
- include_once('gitutil.read_info_ref.php');
+ require_once('util.date_str.php');
+ require_once('gitutil.git_project_descr.php');
+ require_once('gitutil.git_project_owner.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('gitutil.git_read_revlist.php');
+ require_once('gitutil.git_read_refs.php');
+ require_once('gitutil.read_info_ref.php');
 
 function git_summary($projectroot,$project)
 {

--- a/include/display.git_tags.php
+++ b/include/display.git_tags.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_read_refs.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_refs.php');
 
 function git_tags($projectroot,$project)
 {

--- a/include/display.git_tree.php
+++ b/include/display.git_tree.php
@@ -7,12 +7,12 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.mode_str.php');
- include_once('gitutil.git_read_head.php');
- include_once('gitutil.git_get_hash_by_path.php');
- include_once('gitutil.git_ls_tree.php');
- include_once('gitutil.read_info_ref.php');
- include_once('gitutil.git_read_commit.php');
+ require_once('util.mode_str.php');
+ require_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_get_hash_by_path.php');
+ require_once('gitutil.git_ls_tree.php');
+ require_once('gitutil.read_info_ref.php');
+ require_once('gitutil.git_read_commit.php');
 
 function git_tree($projectroot,$project,$hash,$file,$hashbase)
 {

--- a/include/gitutil.git_cat_file.php
+++ b/include/gitutil.git_cat_file.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.commands.php');
- include_once('gitutil.git_exec.php');
+ require_once('defs.commands.php');
+ require_once('gitutil.git_exec.php');
 
 function git_cat_file($proj,$hash,$pipeto = NULL, $type = "blob")
 {

--- a/include/gitutil.git_diff_tree.php
+++ b/include/gitutil.git_diff_tree.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.commands.php');
- include_once('gitutil.git_exec.php');
+ require_once('defs.commands.php');
+ require_once('gitutil.git_exec.php');
 
 function git_diff_tree($proj,$hashes,$renames = FALSE)
 {

--- a/include/gitutil.git_exec.php
+++ b/include/gitutil.git_exec.php
@@ -8,9 +8,9 @@
  */
 
  if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
- 	include_once('gitutil.git_exec_win.php');
+ 	require_once('gitutil.git_exec_win.php');
  else
- 	include_once('gitutil.git_exec_nix.php');
+ 	require_once('gitutil.git_exec_nix.php');
 
 function git_exec($project, $command)
 {

--- a/include/gitutil.git_get_hash_by_path.php
+++ b/include/gitutil.git_get_hash_by_path.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
-include_once('gitutil.git_ls_tree.php');
+require_once('gitutil.git_ls_tree.php');
 
 function git_get_hash_by_path($project,$base,$path,$type = null)
 {

--- a/include/gitutil.git_get_type.php
+++ b/include/gitutil.git_get_type.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
-include_once('gitutil.git_cat_file.php');
+require_once('gitutil.git_cat_file.php');
 
 function git_get_type($project, $hash)
 {

--- a/include/gitutil.git_history_list.php
+++ b/include/gitutil.git_history_list.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.commands.php');
- include_once('gitutil.git_exec.php');
+ require_once('defs.commands.php');
+ require_once('gitutil.git_exec.php');
 
 function git_history_list($proj,$hash,$file)
 {

--- a/include/gitutil.git_ls_tree.php
+++ b/include/gitutil.git_ls_tree.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.commands.php');
- include_once('gitutil.git_exec.php');
+ require_once('defs.commands.php');
+ require_once('gitutil.git_exec.php');
 
 function git_ls_tree($proj,$hash,$nullterm = FALSE)
 {

--- a/include/gitutil.git_project_descr.php
+++ b/include/gitutil.git_project_descr.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
-include_once('defs.constants.php');
+require_once('defs.constants.php');
 
 function git_project_descr($projectroot,$project,$trim = FALSE)
 {

--- a/include/gitutil.git_read_commit.php
+++ b/include/gitutil.git_read_commit.php
@@ -7,9 +7,9 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.constants.php');
- include_once('util.age_string.php');
- include_once('gitutil.git_rev_list.php');
+ require_once('defs.constants.php');
+ require_once('util.age_string.php');
+ require_once('gitutil.git_rev_list.php');
 
 function git_read_commit($proj,$head)
 {

--- a/include/gitutil.git_read_head.php
+++ b/include/gitutil.git_read_head.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
-include_once('defs.commands.php');
-include_once('gitutil.git_exec.php');
+require_once('defs.commands.php');
+require_once('gitutil.git_exec.php');
 
 function git_read_head($proj)
 {

--- a/include/gitutil.git_read_projects.php
+++ b/include/gitutil.git_read_projects.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_recurse_projects.php');
+ require_once('gitutil.git_recurse_projects.php');
 
 function git_read_projects($projectroot,$projectlist)
 {

--- a/include/gitutil.git_read_refs.php
+++ b/include/gitutil.git_read_refs.php
@@ -7,12 +7,12 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('util.age_string.php');
- include_once('util.epochcmp.php');
- include_once('gitutil.git_get_type.php');
- include_once('gitutil.git_read_hash.php');
- include_once('gitutil.git_read_tag.php');
- include_once('gitutil.git_read_commit.php');
+ require_once('util.age_string.php');
+ require_once('util.epochcmp.php');
+ require_once('gitutil.git_get_type.php');
+ require_once('gitutil.git_read_hash.php');
+ require_once('gitutil.git_read_tag.php');
+ require_once('gitutil.git_read_commit.php');
 
 function git_read_refs($projectroot,$project,$refdir)
 {

--- a/include/gitutil.git_read_revlist.php
+++ b/include/gitutil.git_read_revlist.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_rev_list.php');
+ require_once('gitutil.git_rev_list.php');
 
 function git_read_revlist($proj,$head,$count,$skip = NULL)
 {

--- a/include/gitutil.git_read_tag.php
+++ b/include/gitutil.git_read_tag.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_cat_file.php');
+ require_once('gitutil.git_cat_file.php');
 
 function git_read_tag($project, $tag_id)
 {

--- a/include/gitutil.git_rev_list.php
+++ b/include/gitutil.git_rev_list.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.commands.php');
- include_once('gitutil.git_exec.php');
+ require_once('defs.commands.php');
+ require_once('gitutil.git_exec.php');
 
 function git_rev_list($proj,$head,$count = NULL,$skip = NULL,$header = FALSE,$parents = FALSE,$greptype = NULL, $search = NULL)
 {

--- a/include/gitutil.git_tar_tree.php
+++ b/include/gitutil.git_tar_tree.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.commands.php');
- include_once('gitutil.git_exec.php');
+ require_once('defs.commands.php');
+ require_once('gitutil.git_exec.php');
 
 function git_tar_tree($proj,$hash,$rname = NULL)
 {

--- a/include/gitutil.read_info_ref.php
+++ b/include/gitutil.read_info_ref.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('defs.commands.php');
- include_once('gitutil.git_exec.php');
+ require_once('defs.commands.php');
+ require_once('gitutil.git_exec.php');
 
 function read_info_ref($project, $type = "")
 {

--- a/include/util.agecmp.php
+++ b/include/util.agecmp.php
@@ -7,8 +7,8 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_read_commit.php');
- include_once('gitutil.git_read_head.php');
+ require_once('gitutil.git_read_commit.php');
+ require_once('gitutil.git_read_head.php');
 
 function agecmp($a,$b)
 {

--- a/include/util.descrcmp.php
+++ b/include/util.descrcmp.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_project_descr.php');
+ require_once('gitutil.git_project_descr.php');
 
 function descrcmp($a,$b)
 {

--- a/include/util.file_mime.php
+++ b/include/util.file_mime.php
@@ -7,9 +7,9 @@
  *  Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
  */
 
-include_once('util.file_mime_fileinfo.php');
-include_once('util.file_mime_file.php');
-include_once('util.file_mime_ext.php');
+require_once('util.file_mime_fileinfo.php');
+require_once('util.file_mime_file.php');
+require_once('util.file_mime_ext.php');
 
 function file_mime($buffer, $file = NULL)
 {

--- a/include/util.ownercmp.php
+++ b/include/util.ownercmp.php
@@ -7,7 +7,7 @@
  *  Copyright (C) 2008 Christopher Han <xiphux@gmail.com>
  */
 
- include_once('gitutil.git_project_owner.php');
+ require_once('gitutil.git_project_owner.php');
 
 function ownercmp($a,$b)
 {

file:a/index.php -> file:b/index.php
--- a/index.php
+++ b/index.php
@@ -16,12 +16,12 @@
  /*
   * Configuration
   */
- include_once('config/gitphp.conf.php');
+ require_once('config/gitphp.conf.php');
 
  /*
   * Instantiate Smarty
   */
- include_once($gitphp_conf['smarty_prefix'] . "Smarty.class.php");
+ require_once($gitphp_conf['smarty_prefix'] . "Smarty.class.php");
  $tpl =& new Smarty;
  $tpl->load_filter('output','trimwhitespace');
 
@@ -31,11 +31,11 @@
  ob_start();
  if (isset($_GET['a']) && $_GET['a'] == "opml") {
 	$suppress_headers = TRUE;
-	include_once('include/display.git_opml.php');
+	require_once('include/display.git_opml.php');
 	git_opml($gitphp_conf['projectroot'],$git_projects);
  } else if (isset($_GET['a']) && $_GET['a'] == "project_index") {
 	$suppress_headers = TRUE;
-	include_once('include/display.git_project_index.php');
+	require_once('include/display.git_project_index.php');
 	git_project_index($gitphp_conf['projectroot'],$git_projects);
  } else if (isset($_GET['p'])) {
  	if (!is_dir($gitphp_conf['projectroot'] . $_GET['p']))
@@ -45,81 +45,81 @@
 	else {
 		$rss_link = TRUE;
 		if (!isset($_GET['a'])) {
-			include_once('include/display.git_summary.php');
+			require_once('include/display.git_summary.php');
 			git_summary($gitphp_conf['projectroot'],$_GET['p']);
 		} else {
 			switch ($_GET['a']) {
 				case "summary":
-					include_once('include/display.git_summary.php');
+					require_once('include/display.git_summary.php');
 					git_summary($gitphp_conf['projectroot'],$_GET['p']);
 					break;
 				case "tree":
-					include_once('include/display.git_tree.php');
+					require_once('include/display.git_tree.php');
 					git_tree($gitphp_conf['projectroot'], $_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['f']) ? $_GET['f'] : NULL), (isset($_GET['hb']) ? $_GET['hb'] : NULL));
 					break;
 				case "shortlog":
-					include_once('include/display.git_shortlog.php');
+					require_once('include/display.git_shortlog.php');
 					git_shortlog($gitphp_conf['projectroot'],$_GET['p'],(isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['pg']) ? $_GET['pg'] : NULL));
 					break;
 				case "log":
-					include_once('include/display.git_log.php');
+					require_once('include/display.git_log.php');
 					git_log($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['pg']) ? $_GET['pg'] : NULL));
 					break;
 				case "commit":
-					include_once('include/display.git_commit.php');
+					require_once('include/display.git_commit.php');
 					git_commit($gitphp_conf['projectroot'],$_GET['p'],$_GET['h']);
 					break;
 				case "commitdiff":
-					include_once('include/display.git_commitdiff.php');
+					require_once('include/display.git_commitdiff.php');
 					git_commitdiff($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'], (isset($_GET['hp']) ? $_GET['hp'] : NULL));
 					break;
 				case "commitdiff_plain":
 					$suppress_headers = TRUE;
-					include_once('include/display.git_commitdiff_plain.php');
+					require_once('include/display.git_commitdiff_plain.php');
 					git_commitdiff_plain($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],(isset($_GET['hp']) ? $_GET['hp'] : NULL));
 					break;
 				case "heads":
-					include_once('include/display.git_heads.php');
+					require_once('include/display.git_heads.php');
 					git_heads($gitphp_conf['projectroot'],$_GET['p']);
 					break;
 				case "tags":
-					include_once('include/display.git_tags.php');
+					require_once('include/display.git_tags.php');
 					git_tags($gitphp_conf['projectroot'],$_GET['p']);
 					break;
 				case "rss":
 					$suppress_headers = TRUE;
-					include_once('include/display.git_rss.php');
+					require_once('include/display.git_rss.php');
 					git_rss($gitphp_conf['projectroot'],$_GET['p']);
 					break;
 				case "blob":
-					include_once('include/display.git_blob.php');
+					require_once('include/display.git_blob.php');
 					git_blob($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL), (isset($_GET['f']) ? $_GET['f'] : NULL), (isset($_GET['hb']) ? $_GET['hb'] : NULL));
 					break;
 				case "blob_plain":
 					$suppress_headers = TRUE;
-					include_once('include/display.git_blob_plain.php');
+					require_once('include/display.git_blob_plain.php');
 					git_blob_plain($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],(isset($_GET['f']) ? $_GET['f'] : NULL));
 					break;
 				case "blobdiff":
-					include_once('include/display.git_blobdiff.php');
+					require_once('include/display.git_blobdiff.php');
 					git_blobdiff($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],$_GET['hb'],$_GET['hp'],(isset($_GET['f']) ? $_GET['f'] : NULL));
 					break;
 				case "blobdiff_plain":
 					$suppress_headers = TRUE;
-					include_once('include/display.git_blobdiff_plain.php');
+					require_once('include/display.git_blobdiff_plain.php');
 					git_blobdiff_plain($gitphp_conf['projectroot'],$_GET['p'],$_GET['h'],$_GET['hb'],$_GET['hp'], (isset($_GET['f']) ? $_GET['f'] : NULL));
 					break;
 				case "snapshot":
 					$suppress_headers = TRUE;
-					include_once('include/display.git_snapshot.php');
+					require_once('include/display.git_snapshot.php');
 					git_snapshot($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL));
 					break;
 				case "history":
-					include_once('include/display.git_history.php');
+					require_once('include/display.git_history.php');
 					git_history($gitphp_conf['projectroot'],$_GET['p'], (isset($_GET['h']) ? $_GET['h'] : NULL),$_GET['f']);
 					break;
 				case "search":
-					include_once('include/display.git_search.php');
+					require_once('include/display.git_search.php');
 					git_search($gitphp_conf['projectroot'],$_GET['p'],(isset($_GET['h']) ? $_GET['h'] : NULL),(isset($_GET['s']) ? $_GET['s'] : NULL),(isset($_GET['st']) ? $_GET['st'] : "commit"),(isset($_GET['pg']) ? $_GET['pg'] : 0));
 					break;
 				default:
@@ -130,7 +130,7 @@
 	}
  } else {
  	$tpl->display("hometext.tpl");
-	include_once('include/display.git_project_list.php');
+	require_once('include/display.git_project_list.php');
  	git_project_list($gitphp_conf['projectroot'],$git_projects,(isset($_GET['o']) ? $_GET['o'] : "project"));
  }
  $main = ob_get_contents();
@@ -171,7 +171,7 @@
  if (!$suppress_headers) {
 	 if ($rss_link) {
 		$tpl->assign("project",$_GET['p']);
-		include_once('include/gitutil.git_project_descr.php');
+		require_once('include/gitutil.git_project_descr.php');
 		$tpl->assign("descr",git_project_descr($gitphp_conf['projectroot'],$_GET['p']));
 	 }
 	 $tpl->display("footer.tpl");

comments