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',
'oxobject2payment', 0, 0, 1 )
39 $sCountryId = $this->
getConfig()->getRequestParameter(
'oxid' );
40 $sSynchCountryId = $this->
getConfig()->getRequestParameter(
'synchoxid' );
45 $sQAdd =
" from $sCountryTable where $sCountryTable.oxactive = '1' ";
48 $sQAdd =
" from oxobject2payment left join $sCountryTable on $sCountryTable.oxid=oxobject2payment.oxobjectid ";
49 $sQAdd .=
"where $sCountryTable.oxactive = '1' and oxobject2payment.oxpaymentid = ".$oDb->quote( $sCountryId ).
" and oxobject2payment.oxtype = 'oxcountry' ";
52 if ( $sSynchCountryId && $sSynchCountryId != $sCountryId ) {
53 $sQAdd .=
"and $sCountryTable.oxid not in ( ";
54 $sQAdd .=
"select $sCountryTable.oxid from oxobject2payment left join $sCountryTable on $sCountryTable.oxid=oxobject2payment.oxobjectid ";
55 $sQAdd .=
"where oxobject2payment.oxpaymentid = ".$oDb->quote( $sSynchCountryId ).
" and oxobject2payment.oxtype = 'oxcountry' ) ";
69 $soxId = $this->
getConfig()->getRequestParameter(
'synchoxid');
71 if ( $this->
getConfig()->getRequestParameter(
'all' ) ) {
75 if ( $soxId && $soxId !=
"-1" && is_array( $aChosenCntr ) ) {
76 foreach ( $aChosenCntr as $sChosenCntr) {
77 $oObject2Payment =
oxNew(
'oxbase' );
78 $oObject2Payment->init(
'oxobject2payment' );
79 $oObject2Payment->oxobject2payment__oxpaymentid =
new oxField($soxId);
80 $oObject2Payment->oxobject2payment__oxobjectid =
new oxField($sChosenCntr);
81 $oObject2Payment->oxobject2payment__oxtype =
new oxField(
"oxcountry");
82 $oObject2Payment->save();
94 $aChosenCntr = $this->
_getActionIds(
'oxobject2payment.oxid' );
95 if ( $this->
getConfig()->getRequestParameter(
'all' ) ) {
100 } elseif ( is_array( $aChosenCntr ) ) {
101 $sQ =
"delete from oxobject2payment where oxobject2payment.oxid in (" . implode(
", ",
oxDb::getInstance()->quoteArray( $aChosenCntr ) ) .
") ";