15 array(
'oxtitle',
'oxgroups', 1, 0, 0),
16 array(
'oxid',
'oxgroups', 0, 0, 0),
17 array(
'oxid',
'oxgroups', 0, 0, 1),
19 'container2' => array(
20 array(
'oxtitle',
'oxgroups', 1, 0, 0),
21 array(
'oxid',
'oxgroups', 0, 0, 0),
22 array(
'oxid',
'oxobject2delivery', 0, 0, 1),
39 $sId =
$myConfig->getRequestParameter(
'oxid');
40 $sSynchId =
$myConfig->getRequestParameter(
'synchoxid');
44 $sQAdd =
" from {$sGroupTable} where 1 ";
46 $sQAdd =
" from oxobject2delivery left join {$sGroupTable} " .
47 "on {$sGroupTable}.oxid=oxobject2delivery.oxobjectid " .
48 " where oxobject2delivery.oxdeliveryid = " . $oDb->quote($sId) .
49 " and oxobject2delivery.oxtype = 'oxgroups' ";
52 if ($sSynchId && $sSynchId != $sId) {
53 $sQAdd .=
" and {$sGroupTable}.oxid not in ( select {$sGroupTable}.oxid " .
54 "from oxobject2delivery left join {$sGroupTable} " .
55 "on {$sGroupTable}.oxid=oxobject2delivery.oxobjectid " .
56 " where oxobject2delivery.oxdeliveryid = " . $oDb->quote($sSynchId) .
57 " and oxobject2delivery.oxtype = 'oxgroups' ) ";
68 $aRemoveGroups = $this->
_getActionIds(
'oxobject2delivery.oxid');
69 if ($this->
getConfig()->getRequestParameter(
'all')) {
74 } elseif ($aRemoveGroups && is_array($aRemoveGroups)) {
76 $sQ =
"delete from oxobject2delivery where oxobject2delivery.oxid in (" . $sRemoveGroups .
") ";
87 $soxId = $this->
getConfig()->getRequestParameter(
'synchoxid');
90 if ($this->
getConfig()->getRequestParameter(
'all')) {
95 if ($soxId && $soxId !=
"-1" && is_array($aChosenCat)) {
96 foreach ($aChosenCat as $sChosenCat) {
97 $oObject2Delivery =
oxNew(
'oxbase');
98 $oObject2Delivery->init(
'oxobject2delivery');
99 $oObject2Delivery->oxobject2delivery__oxdeliveryid =
new oxField($soxId);
100 $oObject2Delivery->oxobject2delivery__oxobjectid =
new oxField($sChosenCat);
101 $oObject2Delivery->oxobject2delivery__oxtype =
new oxField(
'oxgroups');
102 $oObject2Delivery->save();