14 array(
'oxtitle',
'oxgroups', 1, 0, 0 ),
15 array(
'oxid',
'oxgroups', 0, 0, 0 ),
16 array(
'oxid',
'oxgroups', 0, 0, 1 ),
18 'container2' => array(
19 array(
'oxtitle',
'oxgroups', 1, 0, 0 ),
20 array(
'oxid',
'oxgroups', 0, 0, 0 ),
21 array(
'oxid',
'oxobject2delivery', 0, 0, 1 ),
38 $sId =
$myConfig->getRequestParameter(
'oxid' );
39 $sSynchId =
$myConfig->getRequestParameter(
'synchoxid' );
43 $sQAdd =
" from $sGroupTable where 1 ";
45 $sQAdd =
" from oxobject2delivery left join $sGroupTable on $sGroupTable.oxid=oxobject2delivery.oxobjectid ";
46 $sQAdd .=
" where oxobject2delivery.oxdeliveryid = ".$oDb->quote( $sId ).
" and oxobject2delivery.oxtype = 'oxgroups' ";
49 if ( $sSynchId && $sSynchId != $sId ) {
50 $sQAdd .=
" and $sGroupTable.oxid not in ( select $sGroupTable.oxid from oxobject2delivery left join $sGroupTable on $sGroupTable.oxid=oxobject2delivery.oxobjectid ";
51 $sQAdd .=
" where oxobject2delivery.oxdeliveryid = ".$oDb->quote( $sSynchId ).
" and oxobject2delivery.oxtype = 'oxgroups' ) ";
64 $aRemoveGroups = $this->
_getActionIds(
'oxobject2delivery.oxid' );
65 if ( $this->
getConfig()->getRequestParameter(
'all' ) ) {
70 } elseif ( $aRemoveGroups && is_array( $aRemoveGroups ) ) {
71 $sQ =
"delete from oxobject2delivery where oxobject2delivery.oxid in (" . implode(
", ",
oxDb::getInstance()->quoteArray( $aRemoveGroups ) ) .
") ";
84 $soxId = $this->
getConfig()->getRequestParameter(
'synchoxid' );
87 if ( $this->
getConfig()->getRequestParameter(
'all' ) ) {
92 if ( $soxId && $soxId !=
"-1" && is_array( $aChosenCat ) ) {
93 foreach ( $aChosenCat as $sChosenCat) {
94 $oObject2Delivery =
oxNew(
'oxbase' );
95 $oObject2Delivery->init(
'oxobject2delivery' );
96 $oObject2Delivery->oxobject2delivery__oxdeliveryid =
new oxField($soxId);
97 $oObject2Delivery->oxobject2delivery__oxobjectid =
new oxField($sChosenCat);
98 $oObject2Delivery->oxobject2delivery__oxtype =
new oxField(
'oxgroups');
99 $oObject2Delivery->save();