Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed some syntax errors

  • Loading branch information...
commit f499b115fbb150b4800099713cf27f0d716f349b 1 parent 2965c49
Xan Manning authored June 22, 2010
32  html_helpers.php
@@ -47,7 +47,7 @@ function array_diff_ukey1($array1, $array2) {
47 47
 function html_ahref($arguments, $class = ""){
48 48
 	$ahref = "<a ";
49 49
 	if($class != "") {
50  
-		$ahref .= "class=\"$class\" ";
  50
+		$ahref .= "class=\"" . $class . "\" ";
51 51
 	}
52 52
 	$ahref .= "href=\"";
53 53
 
@@ -76,7 +76,7 @@ function html_ref($arguments, $prefix) {
76 76
 		}
77 77
 	}
78 78
 	$now = floor(time()/15/60); // one hour
79  
-	$ahref .= "tm=$now";
  79
+	$ahref .= "tm=" . $now;
80 80
 	$ahref .= "\">";
81 81
 	return $ahref;
82 82
 }
@@ -89,7 +89,7 @@ function html_header() {
89 89
 		echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n";
90 90
 		echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n";
91 91
 		echo "<head>\n";
92  
-		echo "\t<title>$CONFIG['repo_title']</title>\n";
  92
+		echo "\t<title>" . $CONFIG['repo_title'] . "</title>\n";
93 93
 		echo "\t<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"/>\n";
94 94
 		echo "\t<meta NAME=\"ROBOTS\" CONTENT=\"NOFOLLOW\" />\n";
95 95
 		echo "</head>\n";
@@ -97,14 +97,14 @@ function html_header() {
97 97
 	}
98 98
 	/* Add rss2 link */
99 99
 	if (isset($_GET['p']))  {
100  
-		echo "<link rel=\"alternate\" title=\"{$_GET['p']}\" href=\"".sanitized_url()."p={$_GET['p']}&dl=rss2\" type=\"application/rss+xml\" />\n";
  100
+		echo "<link rel=\"alternate\" title=\"" . $_GET['p'] . "\" href=\"" . sanitized_url() . "p=" . $_GET['p'] . "&dl=rss2\" type=\"application/rss+xml\" />\n";
101 101
 	}
102 102
 	echo "<div id=\"gitbody\">\n";
103 103
 }
104 104
 
105 105
 function html_breadcrumbs() {
106 106
 	echo "<div class=\"githead\">\n";
107  
-	$crumb = "<a href=\"".sanitized_url()."\">projects</a> / ";
  107
+	$crumb = "<a href=\"" . sanitized_url() . "\">projects</a> / ";
108 108
 
109 109
 	if (isset($_GET['p'])){
110 110
 		$crumb .= html_ahref(array('p'=>$_GET['p'], 'pg'=>"")) . $_GET['p'] ."</a> / ";
@@ -127,11 +127,11 @@ function html_pages() {
127 127
 	global $CONFIG;
128 128
 	if(isset($_GET['p'])) {
129 129
 		html_spacer();
130  
-		$now = floor(time()/15/60); // one hour
  130
+		$now = floor(time() / 15 / 60); // one hour
131 131
 		echo "<center>";
132  
-		echo "<a href=\"git.php?p=".$_GET['p']."&tm=$now\">browse</a>";
  132
+		echo "<a href=\"git.php?p=" . $_GET['p'] . "&tm=" . $now . "\">browse</a>";
133 133
 		if($CONFIG['git_bundle_active']) {
134  
-			echo " | <a href=\"commit.php?p={$_GET['p']}\">commit</a>";
  134
+			echo " | <a href=\"commit.php?p=" . $_GET['p'] . "\">commit</a>";
135 135
 		}
136 136
 		echo "</center>";
137 137
 	}
@@ -144,11 +144,11 @@ function html_footer()  {
144 144
 	echo "<div class=\"gitfooter\">\n";
145 145
 
146 146
 	if (isset($_GET['p']))  {
147  
-		echo "<a class=\"rss_logo\" href=\"".sanitized_url()."p={$_GET['p']}&dl=rss2\" >RSS</a>\n";
  147
+		echo "<a class=\"rss_logo\" href=\"" . sanitized_url() . "p=" . $_GET['p'] . "&dl=rss2\" >RSS</a>\n";
148 148
 	}
149 149
 	if ($CONFIG['git_logo'])    {
150 150
 		echo "<a href=\"http://www.kernel.org/pub/software/scm/git/docs/\">" . 
151  
-		"<img src=\"".sanitized_url()."dl=git_logo\" style=\"border-width: 0px;\"/></a>\n";
  151
+		"<img src=\"" . sanitized_url() . "dl=git_logo\" style=\"border-width: 0px;\"/></a>\n";
152 152
 	}
153 153
 
154 154
 	echo "</div>\n";
@@ -166,7 +166,7 @@ function sanitized_url() {
166 166
 	global $git_embed;
167 167
 
168 168
 	/* the sanitized url */
169  
-	$url = "{$_SERVER['SCRIPT_NAME']}?";
  169
+	$url = $_SERVER['SCRIPT_NAME'] . "?";
170 170
 
171 171
 	if (!$git_embed) {
172 172
 		return $url;
@@ -179,18 +179,18 @@ function sanitized_url() {
179 179
 	foreach ($_GET as $var => $val) {
180 180
 		if (!in_array($var, $git_get))   {
181 181
 			$get[$var] = $val;
182  
-			$url .= "{$var}={$val}&amp;";
  182
+			$url .= $var . "=" . $val . "&amp;";
183 183
 		}
184 184
 	}
185 185
 	return $url;
186 186
 }
187 187
 
188 188
 function html_spacer($text = "&nbsp;") {
189  
-	echo "<div class=\"gitspacer\">{$text}</div>\n";
  189
+	echo "<div class=\"gitspacer\">" . $text . "</div>\n";
190 190
 }
191 191
 
192 192
 function html_title($text = "&nbsp;") {
193  
-	echo "<div class=\"gittitle\">{$text}</div>\n";
  193
+	echo "<div class=\"gittitle\">" . $text . "</div>\n";
194 194
 }
195 195
 
196 196
 function html_style()   {
@@ -295,7 +295,7 @@ function write_img_png($imgptr) {
295 295
 		"\x12\x1c\x9a\xfe\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82";
296 296
 
297 297
 	if(!isset($img[$imgptr]['name'])) {
298  
-		$img[$imgptr]['name'] = "{$imgptr}.png";
  298
+		$img[$imgptr]['name'] = $imgptr . ".png";
299 299
 	}
300 300
 	$filesize = strlen($img[$imgptr]['bin']);
301 301
 	header("Pragma: public"); // required
@@ -304,7 +304,7 @@ function write_img_png($imgptr) {
304 304
 	header("Cache-Control: private",false); // required for certain browsers
305 305
 	header("Content-Transfer-Encoding: binary");
306 306
 	header("Content-Type: img/png");
307  
-	header("Content-Length: {$filesize}");
  307
+	header("Content-Length: ". $filesize);
308 308
 	header("Content-Disposition: attachment; filename=" . $img[$imgptr]['name'] . ";");
309 309
 	header("Expires: +1d");
310 310
 	echo $img[$imgptr]['bin'];
2  statis.php
@@ -37,7 +37,7 @@ function stat_get_count($proj, &$today, &$total, $inc = false) {
37 37
 
38 38
 // local function (only called from within this file.
39 39
 function file_stat_get_count($proj, &$today, &$total, $inc, $fbasename) {
40  
-	global $CONFIG['cache_name'], $CONFIG['repo_suffix'];
  40
+	global $CONFIG;
41 41
 	$rtoday = 0;
42 42
 	$rtotal = 0;
43 43
 	$now = floor(time()/24/60/60); // number of days since 1970

0 notes on commit f499b11

Please sign in to comment.
Something went wrong with that request. Please try again.