Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: some small bugs in minibrowser.php  (Read 9064 times)

0 Members and 1 Guest are viewing this topic.

Andi

  • VIP
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
  • Join the Future
    • www.pragmamx.org
some small bugs in minibrowser.php
« on: February 18, 2005, 04:07:22 pm »

Hello :)

note before: i've commented out the debugger function, because it hides me to much errors in my devel (vkpMx-Port) installation.

Now in minibrowser.php i get some small errors:

Quote
Notice: Undefined index: select_directory in D:\Localhost\dev-Coppermine\devel\minibrowser.php on line 82
The language variable $lang_minibrowser_php['select_directory']  is not defined everywhere.
I change the language array in /lang/english.php to this:
Code: [Select]
if (defined('MINIBROWSER_PHP')) $lang_minibrowser_php = array(
  'close' => 'close', //cpg 1.4
  'submit' => 'OK', //cpg 1.4
  'up' => 'up one level', //cpg 1.4
  'current_path' => 'current path', //cpg 1.4
  'select_directory' => 'please select a directory', //cpg 1.4
);

Quote
Notice: Undefined index: folder in D:\Localhost\dev-Coppermine\devel\minibrowser.php on line 151
On Startpage from minibrowser.php this variable is not defined. I've change this line to the following:
Code: [Select]
if ((!empty($_REQUEST['folder']) || !empty($_REQUEST['startfolder'])) && ($folder != '' && $folder!= '/')) {Hmm, not sure if it's ok, but it seams to work...

Quote
Notice: Undefined index: PATH_TRANSLATED in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2680
Notice: Undefined variable: HTTP_SERVER_VARS in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2681
Notice: Undefined variable: HTTP_SERVER_VARS in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2682
- $_SERVER['PATH_TRANSLATED'] is not defined on every PHP-Installations.
- the old servervariable HTTP_SERVER_VARS is not global in this function
 my solution:
change line 2680 to this:
   if (isset($_SERVER["PATH_TRANSLATED"])) $path_from_serverroot[] = $_SERVER["PATH_TRANSLATED"];
and delete line 2681-2682
« Last Edit: March 02, 2005, 02:44:02 am by donnoman »
Logged
hope, I could help you... :)

Andi

  • VIP
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
  • Join the Future
    • www.pragmamx.org
Re: some small bugs in minibrowser.php
« Reply #1 on: February 18, 2005, 04:27:50 pm »

Uuuups, edit the previous post...  :o

Quote
Notice: Undefined index: select_directory in D:\Localhost\dev-Coppermine\devel\minibrowser.php on line 82

I've seen, that the correct caption is printed out over the iFrame...

change line 82 in minibrowser.php to this:
Code: [Select]
starttable('99%');
Logged
hope, I could help you... :)

Andi

  • VIP
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
  • Join the Future
    • www.pragmamx.org
Re: some small bugs in minibrowser.php
« Reply #2 on: February 18, 2005, 04:41:46 pm »

 still one ;)

The html-title Tag is not correct.

Code: [Select]
<title><?php echo $CONFIG['gallery_name'?>: <?php echo $lang_fullsize_popup['click_to_close'];
    
?>
</title>

The Variable $lang_fullsize_popup is not defined when minibrowser.php is active. And the message is not indicated anyway in a iframe.
i've change this lines to:
Code: [Select]
<title><?php echo $CONFIG['gallery_name'?></title>


ps, my versioninfo:
  Coppermine version: 1.4.1
  $Source: /cvsroot/coppermine/devel/minibrowser.php,v $
  $Revision: 1.9 $
  $Author: gaugau $
  $Date: 2005/01/23 08:05:29 $
Logged
hope, I could help you... :)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: some small bugs in minibrowser.php
« Reply #3 on: February 21, 2005, 07:35:12 am »

not sure how to keep track of the issues brought up on this thread - I committed some of the changes you suggested here, please check out minibrowser.php, include/functions.inc.php and lang/english.php
Please confirm changes and report what issues are still open for you.

Joachim
Logged

Andi

  • VIP
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
  • Join the Future
    • www.pragmamx.org
Re: some small bugs in minibrowser.php
« Reply #4 on: February 21, 2005, 04:25:35 pm »

Ok, the "main-error" is fixed.
a picture says more than words:
Logged
hope, I could help you... :)

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: some small bugs in minibrowser.php
« Reply #5 on: February 24, 2005, 02:52:18 am »

Maybe it's a windows/apache2 thing. I get this in Notices:
Quote
\bridge\coppermine.inc.php

    * Notice line 45: Undefined index: HTTP_PROTOCOL

\searchnew.php

    * Notice line 551: Undefined variable: iframe_startfolder

I do have folders in the albums folder but it says:
Quote
There are no folders inside the "albums" folder yet. Make sure to create at least one custom folder within "albums" folder and ftp-upload your files there. You mustn't upload to the "userpics" nor "edit" folders, they are reserved for http uploads and internal purposes.

If I say No to the browsable interface, the folders show up.

On my webhost server running linux, apache 1, the minibrowser works.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: some small bugs in minibrowser.php
« Reply #6 on: February 27, 2005, 02:06:33 am »

we've fixed a few problems with the minibrowser due to some cross platform problems.

These issues are probably fixed as well, can you retest.
Logged

Andi

  • VIP
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 85
  • Join the Future
    • www.pragmamx.org
Re: some small bugs in minibrowser.php
« Reply #7 on: February 28, 2005, 08:04:00 pm »

Hi :)

here the errors in detail:

Quote
Notice: Undefined index: HTTP_PROTOCOL in D:\Localhost\dev-Coppermine\devel\bridge\coppermine.inc.php on line 45
$_SERVER[HTTP_PROTOCOL] is never defined. Not in Windows and not in Linux.
- $_SERVER under Windows: http://pragma.cjb.net/inf.php
- the same file under Linux: http://vkp.shiba.de/inf.php
Should it be SERVER_PROTOCOL instead HTTP_PROTOCOL ?

Quote
Notice: Undefined variable: HTTP_SERVER_VARS in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2672
Notice: Undefined variable: HTTP_SERVER_VARS in D:\Localhost\dev-Coppermine\devel\include\functions.inc.php on line 2673
$HTTP_SERVER_VARS is not superglobal. Use global $HTTP_SERVER_VARS; before line 2672.
Or delete this 2 Lines, because this:
Code: [Select]
    $path_from_serverroot[] = $_SERVER["SCRIPT_FILENAME"];
    if (isset($_SERVER["PATH_TRANSLATED"])) {
       $path_from_serverroot[] = $_SERVER["PATH_TRANSLATED"];
    }
does exactly the same.


ps.
CVS checkout from today :)
Logged
hope, I could help you... :)

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: some small bugs in minibrowser.php
« Reply #8 on: March 01, 2005, 01:36:07 am »

I'm not sure about the HTTP_PROTOCOL, but I think you are correct.  However, I'll let someone else comment on this.  The old globals are wrong and shouldn't be used.  They were all removed a long time ago, so I'm not sure where they came from.  I see a few more files with old variables in them as well.

Thanks.  Will fix shortly.
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

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: some small bugs in minibrowser.php
« Reply #9 on: March 01, 2005, 01:53:04 am »

I fixed everything except the HTTP_PROTOCOL, until someone verifies SERVER_PROTOCOL is what should be used.  See if those notices go away now.
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

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: some small bugs in minibrowser.php
« Reply #10 on: March 01, 2005, 03:06:23 am »

Changing HTTP_PROTOCOL to SERVER_PROTOCOL works fine for me.  Fixed but awaiting confirmation before I commit.
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

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: some small bugs in minibrowser.php
« Reply #11 on: March 01, 2005, 03:49:24 am »

I believe omni is the one that added that code; I don't think it matters much if we change it to "SERVER_PROTOCOL", matter of fact I do think thats what was intended.

It is just used to create a semi-unique key to keep from having id collisions.

« Last Edit: March 01, 2005, 04:16:14 am by donnoman »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: some small bugs in minibrowser.php
« Reply #12 on: March 01, 2005, 07:20:25 am »

I agree, HTTP_PROTOCOL was added only recently. It doesn't work anywhere I tested this on - Donnoman, please commit your suggested changes.

Joachim
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: some small bugs in minibrowser.php
« Reply #13 on: March 01, 2005, 08:43:42 am »

Kego since you already have it done and tested, go ahead and commit.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: some small bugs in minibrowser.php
« Reply #14 on: March 01, 2005, 09:58:25 am »

urm, sorry - I didn't read carefully enough. Of course I meant you (Dave) as well, as you already prepared the fix.

Joachim
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: some small bugs in minibrowser.php
« Reply #15 on: March 01, 2005, 12:47:24 pm »

Done.
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.025 seconds with 19 queries.