Name compression consistently
Name compression consistently

--- a/config/gitphp.conf.php.example
+++ b/config/gitphp.conf.php.example
@@ -93,18 +93,18 @@
 $gitphp_conf['smarty_prefix'] = "smarty/";
 
 /*
- * snapshotformat
+ * compressformat
  * Indicates what kind of compression will be done on the
  * snapshot archive.  Recognized settings are:
  *
- * GITPHP_SNAPSHOT_BZ2 - create a tar.bz2 file (php must have bz2 support)
- * GITPHP_SNAPSHOT_GZ - create a tar.gz file (php must have gzip support)
+ * GITPHP_COMPRESS_BZ2 - create a tar.bz2 file (php must have bz2 support)
+ * GITPHP_COMPRESS_GZ - create a tar.gz file (php must have gzip support)
  *
  * Any other setting, or no setting, will create uncompressed tar archives
  * If you choose a compression format and your php does not support it,
  * gitphp will fall back to uncompressed tar archives
  */
-$gitphp_conf['snapshotformat'] = GITPHP_SNAPSHOT_BZ2;
+$gitphp_conf['compressformat'] = GITPHP_COMPRESS_BZ2;
 
 /*
  * compresslevel

--- a/include/defs.constants.php
+++ b/include/defs.constants.php
@@ -11,8 +11,8 @@
 
 define("GITPHP_RSS_ITEMS", 150);
 
-define("GITPHP_SNAPSHOT_BZ2", 1);
-define("GITPHP_SNAPSHOT_GZ", 2);
+define("GITPHP_COMPRESS_BZ2", 1);
+define("GITPHP_COMPRESS_GZ", 2);
 
 ?>
 

--- a/include/display.git_snapshot.php
+++ b/include/display.git_snapshot.php
@@ -17,12 +17,12 @@
 		$hash = "HEAD";
 	$rname = str_replace(array("/",".git"),array("-",""),$project);
 	$tar = git_tar_tree($projectroot . $project, $hash, $rname);
-	if (($gitphp_conf['snapshotformat'] == GITPHP_SNAPSHOT_BZ2) && function_exists("bzcompress")) {
+	if (($gitphp_conf['compressformat'] == GITPHP_COMPRESS_BZ2) && function_exists("bzcompress")) {
 		header("Content-Type: application/x-bzip2");
 		header("Content-Disposition: attachment; filename=" . $rname . ".tar.bz2");
 		echo bzcompress($tar,(isset($gitphp_conf['compresslevel'])?$gitphp_conf['compresslevel']:4));
 		return;
-	} else if (($gitphp_conf['snapshotformat'] == GITPHP_SNAPSHOT_GZ) && function_exists("gzencode")) {
+	} else if (($gitphp_conf['compressformat'] == GITPHP_COMPRESS_GZ) && function_exists("gzencode")) {
 		header("Content-Type: application/x-gzip");
 		header("Content-Disposition: attachment; filename=" . $rname . ".tar.gz");
 		echo gzencode($tar,(isset($gitphp_conf['compresslevel'])?$gitphp_conf['compresslevel']:-1));

comments