Rev 1 |
|
Rev 3 |
Line 39... |
|
Line 39... |
// Revision info to pass along chain |
|
// Revision info to pass along chain |
$passrev = $rev; |
|
$passrev = $rev; |
|
|
|
// If there's no revision info, go to the lastest revision for this path |
|
// If there's no revision info, go to the lastest revision for this path |
$history = $svnrep->getLog($path, '', '', false); |
|
$history = $svnrep->getLog($path, '', '', false); |
|
|
if (is_string($history)) { |
|
|
echo $history; |
|
|
exit; |
|
|
} |
|
|
|
if (!empty($history->entries[0])) { |
|
if (!empty($history->entries[0])) { |
$youngest = $history->entries[0]->rev; |
|
$youngest = $history->entries[0]->rev; |
} else { |
|
} else { |
$youngest = -1; |
|
$youngest = -1; |
Line 55... |
|
Line 59... |
$logrev = $rev; |
|
$logrev = $rev; |
} |
|
} |
|
|
|
if ($logrev != $youngest) { |
|
if ($logrev != $youngest) { |
$logEntry = $svnrep->getLog($path, $logrev, $logrev, false); |
|
$logEntry = $svnrep->getLog($path, $logrev, $logrev, false); |
$logEntry = $logEntry->entries[0]; |
|
if (is_string($logEntry)) { |
|
|
echo $logEntry; |
|
|
exit; |
|
|
} |
|
|
$logEntry = $logEntry ? $logEntry->entries[0] : false; |
} else { |
|
} else { |
$logEntry = isset($history->entries[0]) ? $history->entries[0]: false; |
|
$logEntry = isset($history->entries[0]) ? $history->entries[0]: false; |
} |
|
} |
|
|
|
$headlog = $svnrep->getLog('/', '', '', true, 1); |
|
$headlog = $svnrep->getLog('/', '', '', true, 1); |
|
|
if (is_string($headlog)) { |
|
|
echo $headlog; |
|
|
exit; |
|
|
} |
$headrev = isset($headlog->entries[0]) ? $headlog->entries[0]->rev: 0; |
|
$headrev = isset($headlog->entries[0]) ? $headlog->entries[0]->rev: 0; |
|
|
|
// If we're not looking at a specific revision, get the HEAD revision number |
|
// If we're not looking at a specific revision, get the HEAD revision number |
// (the revision of the rest of the tree display) |
|
// (the revision of the rest of the tree display) |
|
|
|
Line 96... |
|
Line 108... |
$vars['lastchangedrev'] = $logrev; |
|
$vars['lastchangedrev'] = $logrev; |
$vars['date'] = $logEntry ? $logEntry->date: ''; |
|
$vars['date'] = $logEntry ? $logEntry->date: ''; |
$vars['author'] = $logEntry ? $logEntry->author: ''; |
|
$vars['author'] = $logEntry ? $logEntry->author: ''; |
$vars['log'] = $logEntry ? nl2br($bugtraq->replaceIDs(create_anchors($logEntry->msg))): ''; |
|
$vars['log'] = $logEntry ? nl2br($bugtraq->replaceIDs(create_anchors($logEntry->msg))): ''; |
|
|
|
$changes = $logEntry->mods; |
|
$changes = $logEntry ? $logEntry->mods : array(); |
if (!is_array($changes)) { |
|
if (!is_array($changes)) { |
$changes = array(); |
|
$changes = array(); |
} |
|
} |
usort($changes, 'SVNLogEntry_compare'); |
|
usort($changes, 'SVNLogEntry_compare'); |
|
|
|
Line 130... |
|
Line 142... |
|
|
|
$vars['indexurl'] = $config->getURL($rep, '', 'index'); |
|
$vars['indexurl'] = $config->getURL($rep, '', 'index'); |
$vars['repurl'] = $config->getURL($rep, '', 'dir'); |
|
$vars['repurl'] = $config->getURL($rep, '', 'dir'); |
|
|
|
if ($rev != $headrev) { |
|
if ($rev != $headrev) { |
$history = $svnrep->getLog($path, $rev, '', false); |
|
$history = $svnrep->getLog($ppath, $rev, '', false); |
|
|
if (is_string($history)) { |
|
|
echo $history; |
|
|
exit; |
|
|
} |
} |
|
} |
|
|
|
if (isset($history->entries[1]->rev)) { |
|
if (isset($history->entries[1]->rev)) { |
$compurl = $config->getURL($rep, '/', 'comp'); |
|
$compurl = $config->getURL($rep, '/', 'comp'); |
$vars['curdircomplink'] = '<a href="'.$compurl.'compare[]='.urlencode($history->entries[1]->path).'@'.$history->entries[1]->rev. '&compare[]='.urlencode($history->entries[0]->path).'@'.$history->entries[0]->rev. '">'.$lang['DIFFPREV'].'</a>'; |
|
$vars['curdircomplink'] = '<a href="'.$compurl.'compare[]='.urlencode($history->entries[1]->path).'@'.$history->entries[1]->rev. '&compare[]='.urlencode($history->entries[0]->path).'@'.$history->entries[0]->rev. '">'.$lang['DIFFPREV'].'</a>'; |