Welcome to Geeklog, Anonymous Thursday, July 18 2024 @ 08:26 pm EDT

Geeklog Forums

Q on refresh command


I am messing around with running the site under ssl for logged in users.

I started with the changes proposed here in another thread that I can't find now) and then included some changes inside lib-common, so that site_url is set to be site_url_ssl after the calls to the session checkng functions.

Everything is working (some small problems with easyfile, though, it seems to work a little differently, but I sort that out later), but I have one inconvenience due to that I don't understand the refresh command.

At the end of users.php, we have this line
Text Formatted Code
$display .= COM_refresh ($HTTP_SERVER_VARS['HTTP_REFERER']);

This one is executed as the last thing when a successful login is done.

But how can I write it so that the exact same thing happens, i.e. it same url as you can from and with the same variables are refreshed, but with https instead?

Thanks for any help!

Status: offline


Site Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Wouldn't it make more sense to run the entire site via https then? See Vinny's comment in the discussion over here.

bye, Dirk


Quote by Dirk: Wouldn't it make more sense to run the entire site via https then? bye, Dirk

Yes, but more boring.

I like playing around.

Turned out that variable I needed probably doesn't exist in PHP, so I just used old school string functions

Text Formatted Code
             $refererurl = $HTTP_SERVER_VARS['HTTP_REFERER'];
             $refererurl = 'https' . substr( $refererurl , 4,  strlen($refererurl) -4 );

               // $display .= COM_refresh ($HTTP_SERVER_VARS['HTTP_REFERER']);
               $display .= COM_refresh (  $refererurl  );

Works fine :-)

Now I'll try to figure out why easyfile works a bit differently than the other plugins.

All times are EDT. The time is now 08:26 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content