www/nightly.adium.im 9:2a0b0194a18b: First pass at getting the l...
commits at adium.im
commits at adium.im
Wed Jul 27 18:30:15 UTC 2011
details: http://hg.adium.im/www/nightly.adium.im/rev/2a0b0194a18b
revision: 9:2a0b0194a18b
branch: (none)
author: Colin Barrett <colin at springsandstruts.com>
date: Wed Jul 27 11:29:51 2011 -0700
First pass at getting the latest link and latest.php to work
diffs (46 lines):
diff -r c8677b6f682f -r 2a0b0194a18b index.php
--- a/index.php Wed Jul 27 11:02:53 2011 -0700
+++ b/index.php Wed Jul 27 11:29:51 2011 -0700
@@ -67,7 +67,7 @@
<p id="download" style="line-height: 1.3em;">
<img src="http://adium.im/images/logo_small.png" />
These are <strong>NOT A BETA</strong>; do not expect support. Betas can be found on the <a href="http://beta.adium.im">beta page</a>.<br />
- Make sure you're using the <a href="latest">latest version</a> when reporting bugs.<br />
+ Make sure you're using the <a href="/latest?repo_branch=<?=$repo_branch?>">latest version</a> when reporting bugs.<br />
Downloads hosted by <a href="http://rackspacecloud.com">Rackspace</a>.
</p>
@@ -135,4 +135,4 @@
pageTracker._trackPageview();
</script>
</body>
-</html>
\ No newline at end of file
+</html>
diff -r c8677b6f682f -r 2a0b0194a18b latest.php
--- a/latest.php Wed Jul 27 11:02:53 2011 -0700
+++ b/latest.php Wed Jul 27 11:29:51 2011 -0700
@@ -1,5 +1,15 @@
<?php
- define("NIGHTLY_CACHE", "latest.info");
+ function sane_path($path, $default) {
+ if (!isset($path) || preg_match("/\.\.|\/|<|>/", $path)) {
+ return $default;
+ } else {
+ return $path;
+ }
+ }
+
+ $repo_branch = sane_path($_GET['repo_branch'], "adium-default");
+
+ define("NIGHTLY_CACHE", "$repo_branch/latest.info");
// Offsets by line in the build file:
define("FILENAME", 0);
@@ -13,5 +23,5 @@
$nightlyData = explode("\n", file_get_contents(NIGHTLY_CACHE));
// The address to download the nightly.
- header(sprintf("Location: %s.dmg", $nightlyData[FILENAME]));
+ header(sprintf("Location: /$repo_branch/%s.dmg", $nightlyData[FILENAME]));
?>
More information about the commits
mailing list