Displaying flag, notify, vote, adopt and file requet buttons for users which did not authenticate themselves and letting those fake buttons link to the login page. --- web/template/pkgbase_actions.php | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/web/template/pkgbase_actions.php b/web/template/pkgbase_actions.php index a659c88..cd55464 100644 --- a/web/template/pkgbase_actions.php +++ b/web/template/pkgbase_actions.php @@ -45,6 +45,53 @@ <?php elseif (has_credential(CRED_PKGBASE_DISOWN, array($row["MaintainerUID"]))): ?> <li><?= html_action_form($base_uri . 'disown/', "do_Disown", __('Disown Package')) ?></li> <?php endif; ?> + + <?php else: ?> + <?php if ($row["OutOfDateTS"] === NULL): ?> + <li> + <?php if (config_get_bool('options', 'disable_http_login') && empty($_SERVER['HTTPS'])): ?> + <?= html_action_link(get_uri('/login/', true), __('Flag package out-of-date')) ?> + <?php else: ?> + <?= html_action_link(get_uri('/login/'), __('Flag package out-of-date')) ?> + <?php endif; ?> + </li> + <?php endif; ?> + + <li> + <?php if (config_get_bool('options', 'disable_http_login') && empty($_SERVER['HTTPS'])): ?> + <?= html_action_link(get_uri('/login/', true), __('Vote for this package')) ?> + <?php else: ?> + <?= html_action_link(get_uri('/login/'), __('Vote for this package')) ?> + <?php endif; ?> + </li> + + <li> + <?php if (config_get_bool('options', 'disable_http_login') && empty($_SERVER['HTTPS'])): ?> + <?= html_action_link(get_uri('/login/', true), __('Notify of new comments')) ?> + <?php else: ?> + <?= html_action_link(get_uri('/login/'), __('Notify of new comments')) ?> + <?php endif; ?> + </li> + + <li><span class="flagged"><?php if ($row["RequestCount"] > 0) { echo _n('%d pending request', '%d pending requests', $row["RequestCount"]); } ?></span></li> + + <li> + <?php if (config_get_bool('options', 'disable_http_login') && empty($_SERVER['HTTPS'])): ?> + <?= html_action_link(get_uri('/login/', true), __('File Request')) ?> + <?php else: ?> + <?= html_action_link(get_uri('/login/'), __('File Request')) ?> + <?php endif; ?> + </li> + + <?php if ($row["MaintainerUID"] === NULL): ?> + <li> + <?php if (config_get_bool('options', 'disable_http_login') && empty($_SERVER['HTTPS'])): ?> + <?= html_action_link(get_uri('/login/', true), __('Adopt Package')) ?> + <?php else: ?> + <?= html_action_link(get_uri('/login/'), __('Adopt Package')) ?> + <?php endif; ?> + </li> + <?php endif; ?> <?php endif; ?> </ul> </div> -- 2.4.4