14                                         array( 
'oxtitle', 
'oxcategories', 1, 1, 0 ),
 
   15                                         array( 
'oxdesc',  
'oxcategories', 1, 1, 0 ),
 
   16                                         array( 
'oxid',    
'oxcategories', 0, 0, 0 ),
 
   17                                         array( 
'oxid',    
'oxcategories', 0, 0, 1 )
 
   19                                 'container2' => array(
 
   20                                         array( 
'oxtitle', 
'oxcategories', 1, 1, 0 ),
 
   21                                         array( 
'oxdesc',  
'oxcategories', 1, 1, 0 ),
 
   22                                         array( 
'oxid',    
'oxcategories', 0, 0, 0 ),
 
   23                                         array( 
'oxid',    
'oxobject2delivery', 0, 0, 1 ),
 
   24                                         array( 
'oxid',    
'oxcategories',      0, 0, 1 )
 
   38         $sDelId      = $this->
getConfig()->getRequestParameter( 
'oxid' );
 
   39         $sSynchDelId = $this->
getConfig()->getRequestParameter( 
'synchoxid' );
 
   43             $sQAdd  = 
" from $sCatTable ";
 
   45             $sQAdd  = 
" from oxobject2delivery left join $sCatTable on $sCatTable.oxid=oxobject2delivery.oxobjectid ";
 
   46             $sQAdd .= 
" where oxobject2delivery.oxdeliveryid = ".$oDb->quote( $sDelId ).
" and oxobject2delivery.oxtype = 'oxcategories' ";
 
   49         if ( $sSynchDelId && $sSynchDelId != $sDelId) {
 
   51             $sSubSelect  = 
" select $sCatTable.oxid from oxobject2delivery left join $sCatTable on $sCatTable.oxid=oxobject2delivery.oxobjectid ";
 
   52             $sSubSelect .= 
" where oxobject2delivery.oxdeliveryid = ".$oDb->quote( $sSynchDelId ).
" and oxobject2delivery.oxtype = 'oxcategories' ";
 
   53             if ( stristr( $sQAdd, 
'where' ) === 
false )
 
   57             $sQAdd .= 
" $sCatTable.oxid not in ( $sSubSelect ) ";
 
   70         $aChosenCat = $this->
_getActionIds( 
'oxobject2delivery.oxid' );
 
   73         if ( $this->
getConfig()->getRequestParameter( 
'all' ) ) {
 
   78         } elseif ( is_array( $aChosenCat ) ) {
 
   79             $sQ = 
"delete from oxobject2delivery where oxobject2delivery.oxid in (" . implode( 
", ", 
oxDb::getInstance()->quoteArray( $aChosenCat ) ) . 
") ";
 
   92         $soxId      = $this->
getConfig()->getRequestParameter( 
'synchoxid');
 
   95         if ( $this->
getConfig()->getRequestParameter( 
'all' ) ) {
 
  100         if ( isset( $soxId) && $soxId != 
"-1" && isset( $aChosenCat) && $aChosenCat) {
 
  101             foreach ( $aChosenCat as $sChosenCat) {
 
  102                 $oObject2Delivery = 
oxNew( 
'oxbase' );
 
  103                 $oObject2Delivery->init( 
'oxobject2delivery' );
 
  104                 $oObject2Delivery->oxobject2delivery__oxdeliveryid = 
new oxField($soxId);
 
  105                 $oObject2Delivery->oxobject2delivery__oxobjectid   = 
new oxField($sChosenCat);
 
  106                 $oObject2Delivery->oxobject2delivery__oxtype       = 
new oxField(
"oxcategories");
 
  107                 $oObject2Delivery->save();