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