update fixed

This commit is contained in:
Daniel Seifert 2013-05-08 10:21:17 +00:00
parent e21c236a11
commit 9994c0d9ac
1 changed files with 19 additions and 14 deletions

View File

@ -56,7 +56,7 @@ UU9';
'oxshopid' => $oShop->getId(), 'oxshopid' => $oShop->getId(),
); );
$blRet = $this->_checkTableItemExist('d3_cfg_mod', $aWhere); $blRet = $this->_checkTableItemNotExist('d3_cfg_mod', $aWhere);
if ($blRet) if ($blRet)
{ {
@ -82,18 +82,22 @@ UU9';
$aWhere = array( $aWhere = array(
'oxmodid' => $this->sModKey, 'oxmodid' => $this->sModKey,
'oxshopid' => $oShop->getId(), 'oxshopid' => $oShop->getId(),
'oxnewrevision' => $this->sModRevision,
); );
if ($this->_checkTableItemNotExist('d3_cfg_mod', $aWhere)) if ($this->_checkTableItemNotExist('d3_cfg_mod', $aWhere))
{ {
// update don't use this property
unset($aWhere['oxnewrevision']);
$aInsertFields = array( $aInsertFields = array(
'OXID' => array( 'OXID' => array(
'content' => "md5('" . $this->sModKey . " " . $oShop->getId() . " de')", 'content' => "md5('" . $this->sModKey . " " . $oShop->getId() . "')",
'force_update' => TRUE, 'force_update' => false,
), ),
'OXSHOPID' => array( 'OXSHOPID' => array(
'content' => "'" . $oShop->getId() . "'", 'content' => "'" . $oShop->getId() . "'",
'force_update' => TRUE, 'force_update' => false,
), ),
'OXMODID' => array( 'OXMODID' => array(
'content' => "'" . $this->sModKey . "'", 'content' => "'" . $this->sModKey . "'",
@ -138,7 +142,6 @@ UU9';
); );
$aRet = $this->_updateTableItem('d3_cfg_mod', $aInsertFields, $aWhere); $aRet = $this->_updateTableItem('d3_cfg_mod', $aInsertFields, $aWhere);
$blRet = $aRet['blRet']; $blRet = $aRet['blRet'];
$this->_setActionLog('SQL', $aRet['sql'], __METHOD__); $this->_setActionLog('SQL', $aRet['sql'], __METHOD__);
$this->_setUpdateBreak(FALSE); $this->_setUpdateBreak(FALSE);
@ -149,6 +152,7 @@ UU9';
} }
} }
} }
return $blRet; return $blRet;
} }
@ -166,7 +170,7 @@ UU9';
'oxshopid' => $oShop->getId(), 'oxshopid' => $oShop->getId(),
); );
$blRet = $this->_checkTableItemExist('oxcontents', $aWhere); $blRet = $this->_checkTableItemNotExist('oxcontents', $aWhere);
if ($blRet) if ($blRet)
{ {
@ -194,12 +198,12 @@ UU9';
'oxshopid' => $oShop->getId(), 'oxshopid' => $oShop->getId(),
); );
if ($this->_checkTableItemExist('oxcontents', $aWhere)) if ($this->_checkTableItemNotExist('oxcontents', $aWhere))
{ {
$aInsertFields = array( $aInsertFields = array(
'OXID' => array( 'OXID' => array(
'content' => "md5(RAND())", 'content' => "md5(RAND())",
'force_update' => TRUE, 'force_update' => FALSE,
), ),
'OXLOADID' => array( 'OXLOADID' => array(
'content' => "'Analytics_Security_Informations'", 'content' => "'Analytics_Security_Informations'",
@ -211,11 +215,11 @@ UU9';
), ),
'OXSNIPPET' => array( 'OXSNIPPET' => array(
'content' => "'1'", 'content' => "'1'",
'force_update' => TRUE, 'force_update' => FALSE,
), ),
'OXTYPE' => array( 'OXTYPE' => array(
'content' => "'0'", 'content' => "'0'",
'force_update' => TRUE, 'force_update' => FALSE,
), ),
'OXACTIVE' => array( 'OXACTIVE' => array(
'content' => "'1'", 'content' => "'1'",
@ -227,7 +231,7 @@ UU9';
), ),
'OXPOSITION' => array( 'OXPOSITION' => array(
'content' => "''", 'content' => "''",
'force_update' => TRUE, 'force_update' => FALSE,
), ),
'OXTITLE' => array( 'OXTITLE' => array(
'content' => "'Analytics Datenschutz Information'", 'content' => "'Analytics Datenschutz Information'",
@ -238,12 +242,12 @@ UU9';
'force_update' => FALSE, 'force_update' => FALSE,
), ),
'OXCATID' => array( 'OXCATID' => array(
'content' => "'943a9ba3050e78b443c16e043ae60ef3'", 'content' => "''",
'force_update' => TRUE, 'force_update' => FALSE,
), ),
'OXFOLDER' => array( 'OXFOLDER' => array(
'content' => "'CMSFOLDER_USERINFO'", 'content' => "'CMSFOLDER_USERINFO'",
'force_update' => TRUE, 'force_update' => FALSE,
), ),
); );
$aRet = $this->_updateTableItem('oxcontents', $aInsertFields, $aWhere); $aRet = $this->_updateTableItem('oxcontents', $aInsertFields, $aWhere);
@ -285,6 +289,7 @@ UU9';
$this->_setUpdateBreak(FALSE); $this->_setUpdateBreak(FALSE);
$blRet = $aRet['blRet']; $blRet = $aRet['blRet'];
} }
return $blRet; return $blRet;
} }
} }