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 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'web/lib/aur.inc.php') 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; } -- cgit v1.2.3-70-g09d2