[aur-dev] [PATCH v2 06/10] Add public clone URLs to package details
Lukas Fleischer
archlinux at cryptocrack.de
Sat Dec 27 11:51:42 UTC 2014
Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
conf/config.proto | 1 +
web/template/pkg_details.php | 5 +++++
web/template/pkgbase_details.php | 5 +++++
3 files changed, 11 insertions(+)
diff --git a/conf/config.proto b/conf/config.proto
index d20b533..f726e97 100644
--- a/conf/config.proto
+++ b/conf/config.proto
@@ -19,6 +19,7 @@ max_filesize_uncompressed = 8388608
disable_http_login = 1
aur_location = http://localhost
cgit_uri = https://git.aur.archlinux.org/
+git_clone_uri = git://git.aur.archlinux.org/pub/git/%s.git/
max_rpc_results = 5000
aur_request_ml = aur-requests at archlinux.org
request_idle_time = 1209600
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index a94042c..9036076 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -1,6 +1,7 @@
<?php
$cgit_uri = config_get('options', 'cgit_uri');
+$git_clone_uri = config_get('options', 'git_clone_uri');
$uid = uid_from_sid($SID);
@@ -158,6 +159,10 @@ $sources = pkg_sources($row["ID"]);
<table id="pkginfo">
<tr>
+ <th><?= __('Git Clone URL') . ': ' ?></th>
+ <td><?= sprintf($git_clone_uri, htmlspecialchars($row['BaseName'])) ?></td>
+ </tr>
+ <tr>
<th><?= __('Package Base') . ': ' ?></th>
<td class="wrap"><a href="<?= htmlspecialchars(get_pkgbase_uri($row['BaseName']), ENT_QUOTES); ?>"><?= htmlspecialchars($row['BaseName']); ?></a></td>
</tr>
diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php
index 994c7bd..3f8f4a5 100644
--- a/web/template/pkgbase_details.php
+++ b/web/template/pkgbase_details.php
@@ -1,6 +1,7 @@
<?php
$cgit_uri = config_get('options', 'cgit_uri');
+$git_clone_uri = config_get('options', 'git_clone_uri');
$uid = uid_from_sid($SID);
@@ -109,6 +110,10 @@ $pkgs = pkgbase_get_pkgnames($base_id);
<table id="pkginfo">
<tr>
+ <th><?= __('Git Clone URL') . ': ' ?></th>
+ <td><?= sprintf($git_clone_uri, htmlspecialchars($row['Name'])) ?></td>
+ </tr>
+ <tr>
<th><?= __('Category') . ': ' ?></th>
<?php
if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY, array($row["MaintainerUID"]))):
--
2.2.1
More information about the aur-dev
mailing list