Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Language link (bug?)  (Read 3389 times)

0 Members and 1 Guest are viewing this topic.

mikeall

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • Allbutt The Best Web Designs
Language link (bug?)
« on: January 29, 2005, 01:30:41 am »

Great piece of software!

I have recently enabled the langauges for CPG v1.3 and the flags can seen at the bottom of this page:
http://craftcards.82au.com/cards/index.php

To see the link problem, hover over the flags and see the link location (which if clicked will cause a 404).

An example of the link is http://craftcards.82au.com/var/subdomain/craftcards/html/cards/index.php?lang=dutch

I have bolded the problem section. I had a look in the functions but couldn't find a solution.
Is the problem with here?:

Code: [Select]
//get the url and all vars except $lang
//$cpgChangeUrl = $_SERVER["SCRIPT_NAME"]."?";
 $cpgChangeUrl = $_SERVER["SCRIPT_NAME"]."?";
 foreach ($_GET as $key => $value) {
    if ($key!="lang"){$cpgChangeUrl.= $key . "=" . $value . "&";}
 }
 $cpgChangeUrl.= 'lang=';
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Language link (bug?)
« Reply #1 on: January 29, 2005, 01:53:16 am »

It worked fine for me.

Dump the cache of your browser and retest.
Logged

mikeall

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • Allbutt The Best Web Designs
Re: Language link (bug?)
« Reply #2 on: January 29, 2005, 01:54:33 am »

I changed the line (1589 of functions.inc.php) of code to:

Code: [Select]
$cpgChangeUrl = $_SERVER["PHPSELF"]["SCRIPT_NAME"]."?";
and the problem is fixed.

The develpers might want to adjust this if it isn't fixed already.
Logged

mikeall

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 6
    • Allbutt The Best Web Designs
Re: Language link (bug?)
« Reply #3 on: January 29, 2005, 01:55:17 am »

It worked fine for me.

Dump the cache of your browser and retest.

That was because I just fixed it and you posted just before I could post.
:)
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Language link (bug?)
« Reply #4 on: January 29, 2005, 02:08:08 am »

There is no $_SERVER["PHPSELF"].  If you upload this:

<?php
echo $_SERVER["PHPSELF"];
?>

you should get absolutely no output.

You can list all server variables available like this:

<?php
phpinfo();
?>

You'll see all _SERVER varaibles you can access.  Your server may not have SCRIPT_NAME available, but you may have another variable you can get the script name from.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 14 queries.