Skip to content
This repository was archived by the owner on Sep 3, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions modules/ezmultiupload/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@
// Exec multiupload handlers postUpload method
eZMultiuploadHandler::exec( 'postUpload', $result );

// set parent section for new object
if( isset( $result['contentobject'] ) )
{
$newObject = $result['contentobject'];
$newObjectNodeID = (int) $newObject->attribute( 'main_node_id' );
if( isset( $newObjectNodeID ) && $newObjectNodeID )
{
$newObjectParentNodeObject = $newObject->attribute( 'main_node' )->attribute( 'parent' )->attribute( 'object' );
$newObject->setAttribute( 'section_id', $newObjectParentNodeObject->attribute( 'section_id' ) );
$newObject->store();
}
}

// Pass result to template and process it
$tpl->setVariable( 'result', $result );
$templateOutput = $tpl->fetch( 'design:ezmultiupload/thumbnail.tpl' );
Expand Down