websvn |
Subversion Repositories: |
Rev 1 | Rev 3 | |
---|---|---|
Line 100... | Line 100... | |
$last_index = 0; |
$last_index = 0; | |
$openDir = false; |
$openDir = false; | |
$fullaccess = $rep->hasReadAccess($path, false); |
$fullaccess = $rep->hasReadAccess($path, false); | |
|
| |
foreach ($logList->entries as $entry) { |
foreach ($logList->entries as $entry) { | |
$file = $entry->file; |
$file = $entry->file; | |
$isDir = $entry->isdir; |
$isDir = $entry->isdir; | |
$access = false; |
$access = false; | |
|
| |
if ($isDir) { |
if ($isDir) { | |
if ($rep->hasReadAccess($path.$file, true)) { |
if ($rep->hasReadAccess($path.$file, true)) { | |
Line 122... | Line 122... | |
$listing[$index]["fileviewdllink"] = "<a href=\"${dlurl}rev=$passrev&isdir=1\">${lang["TARBALL"]}</a>"; |
$listing[$index]["fileviewdllink"] = "<a href=\"${dlurl}rev=$passrev&isdir=1\">${lang["TARBALL"]}</a>"; | |
$listing[$index]['downloadurl'] = $dlurl.'rev='.$passrev.'&isdir=1'; |
$listing[$index]['downloadurl'] = $dlurl.'rev='.$passrev.'&isdir=1'; | |
} else { |
} else { | |
$listing[$index]['downloadurl'] = ''; |
$listing[$index]['downloadurl'] = ''; | |
} |
} | |
$listing[$index]['downloadplainurl'] = ''; | ||
} |
} | |
|
| |
} else { |
} else { | |
if ($fullaccess) { |
if ($fullaccess) { | |
$access = true; |
$access = true; | |
Line 133... | Line 134... | |
// List directories only, skip all files |
// List directories only, skip all files | |
continue; |
continue; | |
} |
} | |
|
| |
$listing[$index]['downloadurl'] = ''; |
$listing[$index]['downloadurl'] = ''; | |
if ($rep->isDownloadAllowed($path.$file)) { | ||
$dlurl = $config->getURL($rep, $path.$file, "dl"); | ||
$listing[$index]['downloadplainurl'] = $dlurl.'rev='.$passrev; | ||
} else { | ||
$listing[$index]['downloadplainurl'] = ''; | ||
} | ||
$listing[$index]["filetype"] = strtolower(strrchr($file, ".")); |
$listing[$index]["filetype"] = strtolower(strrchr($file, ".")); | |
} |
} | |
} |
} | |
|
| |
if ($access) { |
if ($access) { | |
Line 180... | Line 187... | |
$listing[$index]['revision'] = $entry->rev; |
$listing[$index]['revision'] = $entry->rev; | |
$listing[$index]['author'] = $entry->author; |
$listing[$index]['author'] = $entry->author; | |
$listing[$index]['date'] = $entry->date; |
$listing[$index]['date'] = $entry->date; | |
$listing[$index]['committime'] = $entry->committime; |
$listing[$index]['committime'] = $entry->committime; | |
$listing[$index]['age'] = $entry->age; |
$listing[$index]['age'] = $entry->age; | |
$listing[$index]['revurl'] = $config->getURL($rep, '', 'revision').'rev='.$entry->rev.'&'; |
$listing[$index]['revurl'] = $config->getURL($rep, $path.$file, 'revision').'rev='.$entry->rev.'&'; | |
} |
} | |
|
| |
$index++; |
$index++; | |
$loop++; |
$loop++; | |
$last_index = $index; |
$last_index = $index; | |
Line 233... | Line 240... | |
// 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 249... | Line 260... | |
$logrev = $rev; |
$logrev = $rev; | |
} |
} | |
|
| |
if ($logrev != $youngest) { |
if ($logrev != $youngest) { | |
$logEntry = $svnrep->getLog($path, $logrev, $logrev, false); |
$logEntry = $svnrep->getLog($path, $logrev, $logrev, false); | |
if (is_string($logEntry)) { | ||
echo $logEntry; | ||
exit; | ||
} | ||
$logEntry = isset($logEntry->entries[0]) ? $logEntry->entries[0] : false; |
$logEntry = isset($logEntry->entries[0]) ? $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 299... | Line 318... | |
$logurl = $config->getURL($rep, $path, "log"); |
$logurl = $config->getURL($rep, $path, "log"); | |
$vars['logurl'] = $logurl.'rev='.$passrev.'&isdir=1'; |
$vars['logurl'] = $logurl.'rev='.$passrev.'&isdir=1'; | |
|
| |
$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) { |
||
$history = $svnrep->getLog($path, $rev, "", false); |
||
} |
||
|
| |
if ($rep->getHideRss()) { |
if ($rep->getHideRss()) { | |
$rssurl = $config->getURL($rep, $path, "rss"); |
$rssurl = $config->getURL($rep, $path, "rss"); | |
// $vars["curdirrsslink"] = "<a href=\"${rssurl}isdir=1\">${lang["RSSFEED"]}</a>"; |
// $vars["curdirrsslink"] = "<a href=\"${rssurl}isdir=1\">${lang["RSSFEED"]}</a>"; | |
$vars['rssurl'] = $rssurl.'isdir=1'; |
$vars['rssurl'] = $rssurl.'isdir=1'; | |
Line 332... | Line 347... | |
$vars["compare_submit"] = "<input name=\"comparesubmit\" type=\"submit\" value=\"${lang["COMPAREPATHS"]}\" />"; |
$vars["compare_submit"] = "<input name=\"comparesubmit\" type=\"submit\" value=\"${lang["COMPAREPATHS"]}\" />"; | |
$vars["compare_hidden"] = "<input type=\"hidden\" name=\"op\" value=\"comp\" />"; |
$vars["compare_hidden"] = "<input type=\"hidden\" name=\"op\" value=\"comp\" />"; | |
$vars["compare_endform"] = "</form>"; |
$vars["compare_endform"] = "</form>"; | |
|
| |
$vars['showlastmod'] = $config->showLastMod; |
$vars['showlastmod'] = $config->showLastMod; | |
$vars['showageinsteadofdate'] = $config->showAgeInsteadOfDate; | ||
|
| |
$listing = array(); |
$listing = array(); | |
$listing = showTreeDir($svnrep, $path, $rev, $listing); |
$listing = showTreeDir($svnrep, $path, $rev, $listing); | |
|
| |
$vars["version"] = $version; |
$vars["version"] = $version; |