[BUG&PATCH] in editpics.php [BUG&PATCH] in editpics.php
 

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

Main Menu

[BUG&PATCH] in editpics.php

Started by king2, March 31, 2004, 06:01:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

king2

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:


$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

$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
<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

<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 :))
king2