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: [BUG&PATCH] in editpics.php  (Read 2094 times)

0 Members and 1 Guest are viewing this topic.

king2

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 5
[BUG&PATCH] in editpics.php
« on: March 31, 2004, 06:01:52 pm »

editpics.php uses $PHP_SELF variable, but this variable (at least on my system) not contains GET parameters. So, in upload approval mode pressing on next or prev HREFs or selecting pictures per page value causes switching to usermode with no album selected.

To avoid this, change lines:

Code: [Select]

$next_target = $PHP_SELF . '?album=' . $album_id . '&start=' . ($start + $count) . '&count=' . $count;
$prev_target = $PHP_SELF . '?album=' . $album_id . '&start=' . max(0, $start - $count) . '&count=' . $count;

to
Code: [Select]

$s_upload = UPLOAD_APPROVAL_MODE ? '&mode=upload_approval' : '';
$next_target = $PHP_SELF . '?album=' . $album_id . '&start=' . ($start + $count) . '&count=' . $count . $s_upload;
$prev_target = $PHP_SELF . '?album=' . $album_id . '&start=' . max(0, $start - $count) . '&count=' . $count . $s_upload;

and change
Code: [Select]
<select onChange="if(this.options[this.selectedIndex].value) window.location.href='$PHP_SELF?album=$album_id&start=$start&count='+this.options[this.selectedIndex].value;"  name="count" class="listbox">

to
Code: [Select]

<select onChange="if(this.options[this.selectedIndex].value) window.location.href='$PHP_SELF?album=$album_id$s_upload&start=$start&count='+this.options[this.selectedIndex].value;"  name="count" class="listbox">


This will solve the problem (tested :))
Logged
king2
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 18 queries.