mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Add links to public and private clone URLs
Show a public clone URL (using Git over HTTP) by default and only show the private clone URL to the package maintainer. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
ada3a8eab3
commit
176014a5d7
4 changed files with 19 additions and 6 deletions
|
@ -24,6 +24,6 @@ footer=/srv/http/aur/web/template/cgit/footer.html
|
||||||
max-repodesc-length=50
|
max-repodesc-length=50
|
||||||
max-blob-size=2048
|
max-blob-size=2048
|
||||||
max-stats=year
|
max-stats=year
|
||||||
enable-http-clone=0
|
enable-http-clone=1
|
||||||
|
|
||||||
scan-path=/srv/http/aur/repos/
|
scan-path=/srv/http/aur/repos/
|
||||||
|
|
|
@ -19,7 +19,8 @@ max_filesize_uncompressed = 8388608
|
||||||
disable_http_login = 1
|
disable_http_login = 1
|
||||||
aur_location = https://aur.archlinux.org
|
aur_location = https://aur.archlinux.org
|
||||||
cgit_uri = https://aur.archlinux.org/cgit/
|
cgit_uri = https://aur.archlinux.org/cgit/
|
||||||
git_clone_uri = ssh+git://aur@aur.archlinux.org:2222/%s.git/
|
git_clone_uri_anon = https://aur.archlinux.org/cgit/%s.git/
|
||||||
|
git_clone_uri_priv = ssh+git://aur@aur.archlinux.org:2222/%s.git/
|
||||||
max_rpc_results = 5000
|
max_rpc_results = 5000
|
||||||
aur_request_ml = aur-requests@archlinux.org
|
aur_request_ml = aur-requests@archlinux.org
|
||||||
request_idle_time = 1209600
|
request_idle_time = 1209600
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$cgit_uri = config_get('options', 'cgit_uri');
|
$cgit_uri = config_get('options', 'cgit_uri');
|
||||||
$git_clone_uri = config_get('options', 'git_clone_uri');
|
$git_clone_uri_anon = sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($row['Name']));
|
||||||
|
$git_clone_uri_priv = sprintf(config_get('options', 'git_clone_uri_priv'), htmlspecialchars($row['Name']));
|
||||||
|
|
||||||
$uid = uid_from_sid($SID);
|
$uid = uid_from_sid($SID);
|
||||||
|
|
||||||
|
@ -160,7 +161,12 @@ $sources = pkg_sources($row["ID"]);
|
||||||
<table id="pkginfo">
|
<table id="pkginfo">
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Git Clone URL') . ': ' ?></th>
|
<th><?= __('Git Clone URL') . ': ' ?></th>
|
||||||
<td><?= sprintf($git_clone_uri, htmlspecialchars($row['BaseName'])) ?></td>
|
<td>
|
||||||
|
<a href="<?= $git_clone_uri_anon ?>"><?= $git_clone_uri_anon ?></a>
|
||||||
|
<?php if ($uid == $row["MaintainerUID"]): ?>
|
||||||
|
<br /> <a href="<?= $git_clone_uri_priv ?>"><?= $git_clone_uri_priv ?></a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Package Base') . ': ' ?></th>
|
<th><?= __('Package Base') . ': ' ?></th>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$cgit_uri = config_get('options', 'cgit_uri');
|
$cgit_uri = config_get('options', 'cgit_uri');
|
||||||
$git_clone_uri = config_get('options', 'git_clone_uri');
|
$git_clone_uri_anon = sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($row['Name']));
|
||||||
|
$git_clone_uri_priv = sprintf(config_get('options', 'git_clone_uri_priv'), htmlspecialchars($row['Name']));
|
||||||
|
|
||||||
$uid = uid_from_sid($SID);
|
$uid = uid_from_sid($SID);
|
||||||
|
|
||||||
|
@ -111,7 +112,12 @@ $pkgs = pkgbase_get_pkgnames($base_id);
|
||||||
<table id="pkginfo">
|
<table id="pkginfo">
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Git Clone URL') . ': ' ?></th>
|
<th><?= __('Git Clone URL') . ': ' ?></th>
|
||||||
<td><?= sprintf($git_clone_uri, htmlspecialchars($row['Name'])) ?></td>
|
<td>
|
||||||
|
<a href="<?= $git_clone_uri_anon ?>"><?= $git_clone_uri_anon ?></a>
|
||||||
|
<?php if ($uid == $row["MaintainerUID"]): ?>
|
||||||
|
<br /> <a href="<?= $git_clone_uri_priv ?>"><?= $git_clone_uri_priv ?></a>
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= __('Category') . ': ' ?></th>
|
<th><?= __('Category') . ': ' ?></th>
|
||||||
|
|
Loading…
Add table
Reference in a new issue