3 $pkgbuild_uri = sprintf(config_get('options', 'pkgbuild_uri'), urlencode($row['Name']));
4 $log_uri = sprintf(config_get('options', 'log_uri'), urlencode($row['Name']));
5 $snapshot_uri = sprintf(config_get('options', 'snapshot_uri'), urlencode($row['Name']));
6 $git_clone_uri_anon = sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($row['Name']));
7 $git_clone_uri_priv = sprintf(config_get('options', 'git_clone_uri_priv'), htmlspecialchars($row['Name']));
9 $uid = uid_from_sid($SID);
11 $base_id = intval($row['ID']);
13 $keywords = pkgbase_get_keywords($base_id);
15 $submitter = username_from_id($row["SubmitterUID"]);
16 $maintainer = username_from_id($row["MaintainerUID"]);
17 $comaintainers = pkgbase_get_comaintainers($base_id);
18 $packager = username_from_id($row["PackagerUID"]);
20 $votes = $row['NumVotes'];
22 # In case of wanting to put a custom message
25 # Print the timestamps for last updates
26 $updated_time = ($row["ModifiedTS"] == 0) ?
$msg : gmdate("Y-m-d H:i", intval($row["ModifiedTS"]));
27 $submitted_time = ($row["SubmittedTS"] == 0) ?
$msg : gmdate("Y-m-d H:i", intval($row["SubmittedTS"]));
28 $out_of_date_time = ($row["OutOfDateTS"] == 0) ?
$msg : gmdate("Y-m-d", intval($row["OutOfDateTS"]));
30 $pkgs = pkgbase_get_pkgnames($base_id);
32 <div id
="pkgdetails" class="box">
33 <h2
><?
= __('Package Base Details') . ': ' . htmlspecialchars($row['Name']) ?
></h2
>
34 <div id
="detailslinks" class="listing">
36 <h4
><?
= __('Package Actions') ?
></h4
>
39 <a href
="<?= $pkgbuild_uri ?>"><?
= __('View PKGBUILD') ?
></a
> /
40 <a href
="<?= $log_uri ?>"><?
= __('View Changes') ?
></a
>
42 <li
><a href
="<?= $snapshot_uri ?>"><?
= __('Download snapshot') ?
></a
>
43 <li
><a href
="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?
= __('Search wiki') ?
></a
></li
>
44 <li
><span
class="flagged"><?php
if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?
></span
></li
>
46 <?php
if ($row["OutOfDateTS"] === NULL): ?
>
48 <form action
="<?= get_pkgbase_uri($row['Name']) . 'flag/'; ?>" method
="post">
49 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
50 <input type
="submit" class="button text-button" name
="do_Flag" value
="<?= __('Flag package out-of-date') ?>" />
53 <?php
elseif (($row["OutOfDateTS"] !== NULL) && has_credential(CRED_PKGBASE_UNFLAG
, array($row["MaintainerUID"]))): ?
>
55 <form action
="<?= get_pkgbase_uri($row['Name']) . 'unflag/'; ?>" method
="post">
56 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
57 <input type
="submit" class="button text-button" name
="do_UnFlag" value
="<?= __('Unflag package') ?>" />
61 <?php
if (pkgbase_user_voted($uid, $base_id)): ?
>
63 <form action
="<?= get_pkgbase_uri($row['Name']) . 'unvote/'; ?>" method
="post">
64 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
65 <input type
="submit" class="button text-button" name
="do_UnVote" value
="<?= __('Remove vote') ?>" />
70 <form action
="<?= get_pkgbase_uri($row['Name']) . 'vote/'; ?>" method
="post">
71 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
72 <input type
="submit" class="button text-button" name
="do_Vote" value
="<?= __('Vote for this package') ?>" />
76 <?php
if (pkgbase_user_notify($uid, $base_id)): ?
>
78 <form action
="<?= get_pkgbase_uri($row['Name']) . 'unnotify/'; ?>" method
="post">
79 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
80 <input type
="submit" class="button text-button" name
="do_UnNotify" value
="<?= __('Disable notifications') ?>" />
85 <form action
="<?= get_pkgbase_uri($row['Name']) . 'notify/'; ?>" method
="post">
86 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
87 <input type
="submit" class="button text-button" name
="do_Notify" value
="<?= __('Notify of new comments') ?>" />
91 <?php
if (has_credential(CRED_PKGBASE_EDIT_COMAINTAINERS
, array($row["MaintainerUID"]))): ?
>
92 <li
><a href
="<?= get_pkgbase_uri($row['Name']) . 'comaintainers/'; ?>"><?
= __('Manage Co-Maintainers'); ?
></a
></li
>
94 <li
><span
class="flagged"><?php
if ($row["RequestCount"] > 0) { echo _n('%d pending request', '%d pending requests', $row["RequestCount"]); } ?
></span
></li
>
95 <li
><a href
="<?= get_pkgbase_uri($row['Name']) . 'request/'; ?>"><?
= __('File Request'); ?
></a
></li
>
96 <?php
if (has_credential(CRED_PKGBASE_DELETE
)): ?
>
97 <li
><a href
="<?= get_pkgbase_uri($row['Name']) . 'delete/'; ?>"><?
= __('Delete Package'); ?
></a
></li
>
98 <li
><a href
="<?= get_pkgbase_uri($row['Name']) . 'merge/'; ?>"><?
= __('Merge Package'); ?
></a
></li
>
102 <?php
if ($uid && $row["MaintainerUID"] === NULL): ?
>
104 <form action
="<?= get_pkgbase_uri($row['Name']) . 'adopt/'; ?>" method
="post">
105 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
106 <input type
="submit" class="button text-button" name
="do_Adopt" value
="<?= __('Adopt Package') ?>" />
109 <?php
elseif (has_credential(CRED_PKGBASE_DISOWN
, array($row["MaintainerUID"]))): ?
>
111 <form action
="<?= get_pkgbase_uri($row['Name']) . 'disown/'; ?>" method
="post">
112 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
113 <input type
="submit" class="button text-button" name
="do_Disown" value
="<?= __('Disown Package') ?>" />
123 <th
><?
= __('Git Clone URL') . ': ' ?
></th
>
125 <a href
="<?= $git_clone_uri_anon ?>"><?
= $git_clone_uri_anon ?
></a
> (<?
= __('read-only') ?
>)
126 <?php
if ($uid == $row["MaintainerUID"]): ?
>
127 <br
/> <a href
="<?= $git_clone_uri_priv ?>"><?
= $git_clone_uri_priv ?
></a
>
132 if (has_credential(CRED_PKGBASE_SET_KEYWORDS
, array($row["MaintainerUID"])) ||
count($keywords) > 0):
135 <th
><?
= __('Keywords') . ': ' ?
></th
>
138 if (has_credential(CRED_PKGBASE_SET_KEYWORDS
, array($row["MaintainerUID"]))):
140 <form method
="post" action
="<?= htmlspecialchars(get_pkgbase_uri($row['Name']), ENT_QUOTES); ?>">
142 <input type
="hidden" name
="action" value
="do_SetKeywords" />
144 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
146 <input type
="text" name
="keywords" value
="<?= htmlspecialchars(implode(" ", $keywords), ENT_QUOTES) ?>"/>
147 <input type
="submit" value
="<?= __('Update') ?>"/>
152 foreach ($keywords as $kw) {
153 echo '<a class="keyword" href="';
154 echo get_uri('/packages/') . '?K=' . urlencode($kw) . '&SB=p';
155 echo '">' . htmlspecialchars($kw) . "</a>\n";
163 <th
><?
= __('Submitter') .': ' ?
></th
>
164 <td
><?
= html_format_username($submitter) ?
></td
>
167 <th
><?
= __('Maintainer') .': ' ?
></th
>
168 <td
><?
= html_format_maintainers($maintainer, $comaintainers) ?
></td
>
171 <th
><?
= __('Last Packager') .': ' ?
></th
>
172 <td
><?
= html_format_username($packager) ?
></td
>
175 <th
><?
= __('Votes') . ': ' ?
></th
>
176 <?php
if (has_credential(CRED_PKGBASE_LIST_VOTERS
)): ?
>
177 <td
><a href
="<?= get_pkgbase_uri($row['Name']); ?>voters/"><?
= $votes ?
></a
></td
>
179 <td
><?
= $votes ?
></td
>
183 <th
><?
= __('First Submitted') . ': ' ?
></th
>
184 <td
><?
= $submitted_time ?
></td
>
187 <th
><?
= __('Last Updated') . ': ' ?
></th
>
188 <td
><?
= $updated_time ?
></td
>
193 <div id
="pkgs" class="listing">
194 <h3
><?
= __('Packages') . " (" . count($pkgs) . ")"?
></h3
>
195 <?php
if (count($pkgs) > 0): ?
>
198 while (list($k, $pkg) = each($pkgs)):
200 <li
><a href
="<?= htmlspecialchars(get_pkg_uri($pkg), ENT_QUOTES); ?>" title
="<?= __('View packages details for').' '. htmlspecialchars($pkg) ?>"><?
= htmlspecialchars($pkg) ?
></a
></li
>