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 $catarr = pkgbase_categories();
15 $submitter = username_from_id($row["SubmitterUID"]);
16 $maintainer = username_from_id($row["MaintainerUID"]);
17 $packager = username_from_id($row["PackagerUID"]);
19 $votes = $row['NumVotes'];
21 # In case of wanting to put a custom message
24 # Print the timestamps for last updates
25 $updated_time = ($row["ModifiedTS"] == 0) ?
$msg : gmdate("Y-m-d H:i", intval($row["ModifiedTS"]));
26 $submitted_time = ($row["SubmittedTS"] == 0) ?
$msg : gmdate("Y-m-d H:i", intval($row["SubmittedTS"]));
27 $out_of_date_time = ($row["OutOfDateTS"] == 0) ?
$msg : gmdate("Y-m-d", intval($row["OutOfDateTS"]));
29 $pkgs = pkgbase_get_pkgnames($base_id);
31 <div id
="pkgdetails" class="box">
32 <h2
><?
= __('Package Base Details') . ': ' . htmlspecialchars($row['Name']) ?
></h2
>
33 <div id
="detailslinks" class="listing">
35 <h4
><?
= __('Package Actions') ?
></h4
>
38 <a href
="<?= $pkgbuild_uri ?>"><?
= __('View PKGBUILD') ?
></a
> /
39 <a href
="<?= $log_uri ?>"><?
= __('View Changes') ?
></a
>
41 <li
><a href
="<?= $snapshot_uri ?>"><?
= __('Download snapshot') ?
></a
>
42 <li
><a href
="https://wiki.archlinux.org/index.php/Special:Search?search=<?= urlencode($row['Name']) ?>"><?
= __('Search wiki') ?
></a
></li
>
43 <li
><span
class="flagged"><?php
if ($row["OutOfDateTS"] !== NULL) { echo __('Flagged out-of-date')." (${out_of_date_time})"; } ?
></span
></li
>
45 <?php
if ($row["OutOfDateTS"] === NULL): ?
>
47 <form action
="<?= get_pkgbase_uri($row['Name']) . 'flag/'; ?>" method
="post">
48 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
49 <input type
="submit" class="button text-button" name
="do_Flag" value
="<?= __('Flag package out-of-date') ?>" />
52 <?php
elseif (($row["OutOfDateTS"] !== NULL) && has_credential(CRED_PKGBASE_UNFLAG
, array($row["MaintainerUID"]))): ?
>
54 <form action
="<?= get_pkgbase_uri($row['Name']) . 'unflag/'; ?>" method
="post">
55 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
56 <input type
="submit" class="button text-button" name
="do_UnFlag" value
="<?= __('Unflag package') ?>" />
60 <?php
if (pkgbase_user_voted($uid, $base_id)): ?
>
62 <form action
="<?= get_pkgbase_uri($row['Name']) . 'unvote/'; ?>" method
="post">
63 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
64 <input type
="submit" class="button text-button" name
="do_UnVote" value
="<?= __('Remove vote') ?>" />
69 <form action
="<?= get_pkgbase_uri($row['Name']) . 'vote/'; ?>" method
="post">
70 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
71 <input type
="submit" class="button text-button" name
="do_Vote" value
="<?= __('Vote for this package') ?>" />
75 <?php
if (pkgbase_user_notify($uid, $base_id)): ?
>
77 <form action
="<?= get_pkgbase_uri($row['Name']) . 'unnotify/'; ?>" method
="post">
78 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
79 <input type
="submit" class="button text-button" name
="do_UnNotify" value
="<?= __('Disable notifications') ?>" />
84 <form action
="<?= get_pkgbase_uri($row['Name']) . 'notify/'; ?>" method
="post">
85 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
86 <input type
="submit" class="button text-button" name
="do_Notify" value
="<?= __('Notify of new comments') ?>" />
90 <?php
if (has_credential(CRED_PKGBASE_EDIT_COMAINTAINERS
, array($row["MaintainerUID"]))): ?
>
91 <li
><a href
="<?= get_pkgbase_uri($row['Name']) . 'comaintainers/'; ?>"><?
= __('Manage Co-Maintainers'); ?
></a
></li
>
93 <li
><span
class="flagged"><?php
if ($row["RequestCount"] > 0) { echo _n('%d pending request', '%d pending requests', $row["RequestCount"]); } ?
></span
></li
>
94 <li
><a href
="<?= get_pkgbase_uri($row['Name']) . 'request/'; ?>"><?
= __('File Request'); ?
></a
></li
>
95 <?php
if (has_credential(CRED_PKGBASE_DELETE
)): ?
>
96 <li
><a href
="<?= get_pkgbase_uri($row['Name']) . 'delete/'; ?>"><?
= __('Delete Package'); ?
></a
></li
>
97 <li
><a href
="<?= get_pkgbase_uri($row['Name']) . 'merge/'; ?>"><?
= __('Merge Package'); ?
></a
></li
>
101 <?php
if ($uid && $row["MaintainerUID"] === NULL): ?
>
103 <form action
="<?= get_pkgbase_uri($row['Name']) . 'adopt/'; ?>" method
="post">
104 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
105 <input type
="submit" class="button text-button" name
="do_Adopt" value
="<?= __('Adopt Package') ?>" />
108 <?php
elseif (has_credential(CRED_PKGBASE_DISOWN
, array($row["MaintainerUID"]))): ?
>
110 <form action
="<?= get_pkgbase_uri($row['Name']) . 'disown/'; ?>" method
="post">
111 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
112 <input type
="submit" class="button text-button" name
="do_Disown" value
="<?= __('Disown Package') ?>" />
122 <th
><?
= __('Git Clone URL') . ': ' ?
></th
>
124 <a href
="<?= $git_clone_uri_anon ?>"><?
= $git_clone_uri_anon ?
></a
>
125 <?php
if ($uid == $row["MaintainerUID"]): ?
>
126 <br
/> <a href
="<?= $git_clone_uri_priv ?>"><?
= $git_clone_uri_priv ?
></a
>
131 <th
><?
= __('Category') . ': ' ?
></th
>
133 if (has_credential(CRED_PKGBASE_CHANGE_CATEGORY
, array($row["MaintainerUID"]))):
136 <form method
="post" action
="<?= htmlspecialchars(get_pkgbase_uri($row['Name']), ENT_QUOTES); ?>">
138 <input type
="hidden" name
="action" value
="do_ChangeCategory" />
140 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
142 <select name
="category_id">
144 foreach ($catarr as $cid => $catname):
146 <option value
="<?= $cid ?>"<?php
if ($cid == $row["CategoryID"]) { ?
> selected
="selected" <?php
} ?
>><?
= $catname ?
></option
>
149 <input type
="submit" value
="<?= __('Change category') ?>"/>
154 <a href
="<?= get_uri('/packages/'); ?>?C=<?= $row['CategoryID'] ?>"><?
= $row['Category'] ?
></a
>
159 <th
><?
= __('Submitter') .': ' ?
></th
>
160 <?php
if ($row["SubmitterUID"] && $SID): ?
>
161 <td
><a href
="<?= get_uri('/account/') . html_format_username($submitter, ENT_QUOTES) ?>" title
="<?= __('View account information for %s', html_format_username($submitter)) ?>"><?
= html_format_username($submitter) ?
></a
></td
>
162 <?php
elseif ($row["SubmitterUID"] && !$SID): ?
>
163 <td
><?
= html_format_username($submitter) ?
></td
>
165 <td
><?
= __('None') ?
></td
>
169 <th
><?
= __('Maintainer') .': ' ?
></th
>
170 <?php
if ($row["MaintainerUID"] && $SID): ?
>
171 <td
><a href
="<?= get_uri('/account/') . html_format_username($maintainer) ?>" title
="<?= __('View account information for %s', html_format_username($maintainer)) ?>"><?
= html_format_username($maintainer) ?
></a
></td
>
172 <?php
elseif ($row["MaintainerUID"] && !$SID): ?
>
173 <td
><?
= html_format_username($maintainer) ?
></td
>
175 <td
><?
= __('None') ?
></td
>
179 <th
><?
= __('Last Packager') .': ' ?
></th
>
180 <?php
if ($row["PackagerUID"] && $SID): ?
>
181 <td
><a href
="<?= get_uri('/account/') . html_format_username($packager) ?>" title
="<?= __('View account information for %s', html_format_username($packager)) ?>"><?
= html_format_username($packager) ?
></a
></td
>
182 <?php
elseif ($row["PackagerUID"] && !$SID): ?
>
183 <td
><?
= html_format_username($packager) ?
></td
>
185 <td
><?
= __('None') ?
></td
>
189 <th
><?
= __('Votes') . ': ' ?
></th
>
190 <?php
if (has_credential(CRED_PKGBASE_LIST_VOTERS
)): ?
>
191 <td
><a href
="<?= get_pkgbase_uri($row['Name']); ?>voters/"><?
= $votes ?
></a
></td
>
193 <td
><?
= $votes ?
></td
>
197 <th
><?
= __('First Submitted') . ': ' ?
></th
>
198 <td
><?
= $submitted_time ?
></td
>
201 <th
><?
= __('Last Updated') . ': ' ?
></th
>
202 <td
><?
= $updated_time ?
></td
>
207 <div id
="pkgs" class="listing">
208 <h3
><?
= __('Packages') . " (" . count($pkgs) . ")"?
></h3
>
209 <?php
if (count($pkgs) > 0): ?
>
212 while (list($k, $pkg) = each($pkgs)):
214 <li
><a href
="<?= htmlspecialchars(get_pkg_uri($pkg), ENT_QUOTES); ?>" title
="<?= __('View packages details for').' '. htmlspecialchars($pkg) ?>"><?
= htmlspecialchars($pkg) ?
></a
></li
>