50 $FileInputController =
get_package(
'file_input::file_input_controller' ,
'last' , __FILE__ );
52 if( $FileInputController->UploadedFile )
54 $Security =
get_package(
'security' ,
'last' , __FILE__ );
55 $GalleryAlgorithms =
get_package(
'gallery::gallery_algorithms' ,
'last' , __FILE__ );
57 $GalleryId = $Security->get_gp(
'gallery_id' ,
'integer' );
58 $FileId =
get_field( $FileInputController->UploadedFile ,
'id' );
60 $GalleryAlgorithms->attach_file( $GalleryId , $FileId );
91 $Security =
get_package(
'security' ,
'last' , __FILE__ );
93 $GalleryId = $Security->get_gp(
'gallery_id' ,
'integer' );
94 $FileId = $Security->get_gp(
'file_id' ,
'integer' );
96 $GalleryAlgorithms =
get_package(
'gallery::gallery_algorithms' ,
'last' , __FILE__ );
97 $GalleryAlgorithms->detach_file( $GalleryId , $FileId );
127 $ContextSet =
get_package(
'gui::context_set' ,
'last' , __FILE__ );
129 $ContextSet->add_context( dirname( __FILE__ ).
'/conf/cfcx_gallery_attach_file' );
131 $ContextSet->add_context( dirname( __FILE__ ).
'/conf/cfcx_gallery_detach_file' );
133 $ContextSet->execute( $Options , $this , __FILE__ );
135 catch( Exception $e )