From 8bd03adb6168b16222510f2e1a148f2ad5ea3afb Mon Sep 17 00:00:00 2001 From: Gordian Edenhofer Date: Fri, 26 Jun 2015 21:03:17 +0200 Subject: Fake pkgbase actions for unconfirmed users Displaying flag, notify, vote, adopt and file request links for users which did not authenticate themselves and letting those fake buttons link to the login page. Signed-off-by: Gordian Edenhofer Signed-off-by: Lukas Fleischer --- web/lib/aur.inc.php | 28 +++++++++++++++++++--------- web/template/pkgbase_actions.php | 2 -- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php index 95f72ce..7a455c6 100644 --- a/web/lib/aur.inc.php +++ b/web/lib/aur.inc.php @@ -230,7 +230,12 @@ function html_format_maintainers($maintainer, $comaintainers) { * @return string The generated HTML code for the action link */ function html_action_link($uri, $desc) { - $code = ''; + if (isset($_COOKIE["AURSID"])) { + $code = ''; + } else { + $code = ''; + } $code .= htmlspecialchars($desc) . ''; return $code; @@ -246,14 +251,19 @@ function html_action_link($uri, $desc) { * @return string The generated HTML code for the action link */ function html_action_form($uri, $action, $desc) { - $code = '
'; - $code .= ''; - $code .= '
'; + if (isset($_COOKIE["AURSID"])) { + $code = '
'; + $code .= ''; + $code .= '
'; + } else { + $code = ''; + $code .= htmlspecialchars($desc) . ''; + } return $code; } diff --git a/web/template/pkgbase_actions.php b/web/template/pkgbase_actions.php index 757b063..61ad18f 100644 --- a/web/template/pkgbase_actions.php +++ b/web/template/pkgbase_actions.php @@ -9,7 +9,6 @@
  • -
  • @@ -45,7 +44,6 @@
  • - -- cgit v1.2.3-54-g00ecf