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: [BUG&PATCH] in editpics.php  (Read 2082 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.017 seconds with 18 queries.