public function getRevisionInfo($rev)
{
$rev = max($rev, 0);
// check if it's already in the memory cache
if (isset($this->cache[$this->id]) && isset($this->cache[$this->id][$rev])) {
return $this->cache[$this->id][$rev];
}
//read lines from changelog
list($fp, $lines) = $this->readloglines($rev);
if ($fp) {
fclose($fp);
}
if (empty($lines)) {
return false;
}
// parse and cache changelog lines
foreach ($lines as $value) {
$tmp = parseChangelogLine($value);
if ($tmp !== false) {
$this->cache[$this->id][$tmp['date']] = $tmp;
}
}
if (!isset($this->cache[$this->id][$rev])) {
return false;
}
return $this->cache[$this->id][$rev];
}