On Sat, 2015-06-27 at 11:11 +0200, Lukas Fleischer wrote: > On Fri, 26 Jun 2015 at 21:03:17, Gordian Edenhofer wrote: > > 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 <[email protected]> > > --- > > Here you go! > > > > web/lib/aur.inc.php | 35 ++++++++++++++++++++++++---- > > ------- > > web/template/pkgbase_actions.php | 26 ++++++++++++-------------- > > 2 files changed, 36 insertions(+), 25 deletions(-) > > [...] > > + $code = '<a href="' . get_uri('/login/', true) . > > '?referer='; > > + $code .= urlencode($uri) . '">'; > > Oh, seems like this doesn't work... We need an absolute URI here.
My fault! Though I still don't get why one should set this parameter,
espicially because it is contained in the $_SERVER['HTTP_REFERER'] and
would be properly set either way.
>
> > [...]
> > +function html_action_form($uri, $action, $desc, $uid) {
> > [...]
> > + $code = '<a href="' . get_uri('/login/', true) .
> > '?referer=';
> > + $code .= urlencode($uri) . '">';
>
> I don't think we should set the referer here. These actions require
> an
> HTTP POST request.
>
> > [...]
> > diff --git a/web/template/pkgbase_actions.php
> > b/web/template/pkgbase_actions.php
> > index a659c88..9675d3a 100644
> > --- a/web/template/pkgbase_actions.php
> > +++ b/web/template/pkgbase_actions.php
> > [...]
>
> The pkgbase_actions hunks did not apply cleanly for some reason.
> Instead
> of trying to fix that, I applied a slightly modified version. I will
> submit it for review in a minute.
>
> Thanks!
Feel free to use your version. I am glad that this feature is being
added.
signature.asc
Description: This is a digitally signed message part
