www/nightly.adium.im 6:9d40a35b73e5: First pass at listing other...

commits at adium.im commits at adium.im
Wed Jul 27 17:37:29 UTC 2011


details:	http://hg.adium.im/www/nightly.adium.im/rev/9d40a35b73e5
revision:	6:9d40a35b73e5
branch:		(none)
author:		Colin Barrett <colin at springsandstruts.com>
date:		Wed Jul 27 10:35:26 2011 -0700

First pass at listing other branches

diffs (40 lines):

diff -r 89215dc9f7cc -r 9d40a35b73e5 index.php
--- a/index.php	Wed Jul 27 09:52:48 2011 -0700
+++ b/index.php	Wed Jul 27 10:35:26 2011 -0700
@@ -25,10 +25,13 @@
     return array($repo, $branch);
 }
 
-$repo = sane_path($_GET['repo'], 'adium');
-$branch = sane_path($_GET['branch'], 'default');
-list($repo, $branch) = existing_branch($repo, $branch);
-$repo_branch =  "$repo-$branch";
+$repo_branch = sane_path($_GET['repo_branch'], 0);
+if (!$repo_branch) {
+  $repo = sane_path($_GET['repo'], 'adium');
+  $branch = sane_path($_GET['branch'], 'default');
+  list($repo, $branch) = existing_branch($repo, $branch);
+  $repo_branch =  "$repo-$branch";
+}
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
 	"http://www.w3.org/TR/html4/strict.dtd">
@@ -101,6 +104,18 @@
 ?>
     </table>
 </div>
+<div>
+<b>Other branches:</b>
+<?
+  $branchlist = scandir(".");
+  foreach ($branchlist as $branch) {
+    if (preg_match("/^\./",$filename) || !is_dir($branch) || $branch == $repo_branch) { continue; }
+?>
+  <a href="/?repo_branch=<?=$branch?>"><?=$branch?> 
+<?
+  }
+?>
+</div>
 </div>
 		<div id="footer">
 			<div class="donate">




More information about the commits mailing list