Opened 9 years ago

Closed 9 years ago

#8169 closed bug (fixed) -- PHP doesn't detect *hrev* nightly images

Reported by: mmadia Owned by: haiku-web
Priority: normal Milestone:
Component: Website Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All


With the switch to git, the nightly images will no longer have r###### in their filename, rather hrev#####. e.g. haiku_unsupported-nightly-hrev43373-x86gcc2-anyboot.tar.xz

The current code for generating the tables does not handle "hrev*"


		while (($file = readdir($directory)) !== false) {
			if (substr($file, 0, 1) == ".") continue;
			if (filetype($dirName . "/" . $file) == "file") {
				// try to find a revision in there...
				if (preg_match("/r[0-9]{2,8}/", $file, $regs)) {
					$revision = substr($regs[0], 1);
					$format = "";
					foreach($formats as $_format) {
						if (ereg($_format["regexp"], $file, $regs)) {
							$format = $_format["title"];
					if ($format == "")
					if (!isset($rows[$revision])) {
						$rows[$revision] = Array();
					$size = format_bytes(filesize($dirName.'/'.$file));
					$date = date("Y-m-j", filemtime($dirName.'/'.$file));
					$extension = substr($file, strrpos($file, ".")+1);
					$rows[$revision][$format][] = Array("date"=>$date,

By the way, is contained within a mercurial repository. hg clone ssh:// The usual hg push ; ssh ; hg up is needed after committing locally.

Change History (1)

comment:1 by zooey, 9 years ago

Resolution: fixed
Status: newclosed

Fixed by adjusting the regex to accept hrevXXXXX as well as rXXXX.

While at it, I changed the link text from rXXXX to hrevXXXX, too.

When trying to commit those changes directly to the Mercurial repository on, I noticed a changed style/style.css from July of this year, so I committed that first and then my changes.

Note: See TracTickets for help on using tickets.