[Gallery Extended] Related ID not changing when using forms on "Manage Entries" and "Batch Process" pages
Posted: 22 August 2007 06:49 PM   [ Ignore ]
Newbie
Rank
Total Posts:  3
Joined  2007-07-24

I’m using Gallery Extended 2.0.2 and was having an issue where I couldn’t set the Related ID using the forms at the bottom of the “Manage Entries” or “Batch Process”. I’d check one or multiple images, enter a Related ID and Related Type in the form and click submit. The Related Type would be saved, but the Related ID would not.

I don’t understand the code terribly well, but I noticed that in mcp.gallery_extended.php there were no provisions for dealing with the gx_related_id value in the functions change_entry() and change_entry_confirm().

Adding this to change_entry() in the // Update entries block

if ( $IN->GBL('gx_related_id') != '' )
            
{
                $data[
'gx_related_id']    $IN->GBL('gx_related_id');
        
}

And in the change_entry_confirm() functions, adding gx_related_id to this array in the // Set hiddens block seems to have fixed the issue, though I’m not sure if there are other ramifications to the change.

$arr        = array( 'title''gx_related_type''gx_related_id''gallery''category''status' );

Sorry I don’t have line numbers. They would be off because of changes I’ve made to this file.

Profile