Beispiel #1
0
 /**
  * Inserts object data fields in DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxcreate
     $sNow = date('Y-m-d H:i:s', oxRegistry::get("oxUtilsDate")->getTime());
     $this->oxremark__oxcreate = new oxField($sNow, oxField::T_RAW);
     $this->oxremark__oxheader = new oxField($sNow, oxField::T_RAW);
     return parent::_insert();
 }
Beispiel #2
0
 /**
  * Inserts object data to DB, returns true on success.
  *
  * @return mixed
  */
 protected function _insert()
 {
     // marking basket as not new any more
     $this->_blNewBasket = false;
     if (!isset($this->oxuserbaskets__oxpublic->value)) {
         $this->oxuserbaskets__oxpublic = new oxField(1, oxField::T_RAW);
     }
     $iTime = oxRegistry::get("oxUtilsDate")->getTime();
     $this->oxuserbaskets__oxupdate = new oxField($iTime);
     return parent::_insert();
 }
 /**
  * Inserts nbews object data to DB. Returns true on success.
  *
  * @return mixed oxid on success or false on failure
  */
 protected function _insert()
 {
     // set subscription date
     $this->oxnewssubscribed__oxsubscribed = new oxField(date('Y-m-d H:i:s'), oxField::T_RAW);
     return parent::_insert();
 }
Beispiel #4
0
 /**
  * Force insert.
  *
  * @return mixed
  */
 public function insert()
 {
     return parent::_insert();
 }
 /**
  * Sets article creation date
  * (oxorderarticle::oxorderarticles__oxtimestamp). Then executes parent method
  * parent::_insert() and returns insertion status.
  *
  * @return bool
  */
 protected function _insert()
 {
     $iInsertTime = time();
     $now = date('Y-m-d H:i:s', $iInsertTime);
     $this->oxorderarticles__oxtimestamp = new oxField($now);
     return parent::_insert();
 }
Beispiel #6
0
 /**
  * Inserts payment information to DB. Returns insert status.
  *
  * @return bool
  */
 protected function _insert()
 {
     // we do not store credit card information
     // check and in case skip it
     if (!$this->getStoreCreditCardInfo() && $this->oxuserpayments__oxpaymentsid->value == 'oxidcreditcard') {
         return true;
     }
     //encode sensitive data
     if ($sValue = $this->oxuserpayments__oxvalue->value) {
         // Function is called from inside a transaction in Category::save (see ESDEV-3804 and ESDEV-3822).
         // No need to explicitly force master here.
         $database = oxDb::getDb();
         $sEncodedValue = $database->getOne("select encode( " . $database->quote($sValue) . ", '" . $this->getPaymentKey() . "' )");
         $this->oxuserpayments__oxvalue->setValue($sEncodedValue);
     }
     $blRet = parent::_insert();
     //restore, as encoding was needed only for saving
     if ($sEncodedValue) {
         $this->oxuserpayments__oxvalue->setValue($sValue);
     }
     return $blRet;
 }
 /**
  * Inserts new guestbook entry. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxcreate
     $this->oxgbentries__oxcreate = new oxField(date('Y-m-d H:i:s', oxUtilsDate::getInstance()->getTime()));
     return parent::_insert();
 }
 /**
  * Inserts object data into DB, returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxinsert value
     $this->oxpricealarm__oxinsert = new oxField(date('Y-m-d', oxRegistry::get("oxUtilsDate")->getTime()));
     return parent::_insert();
 }
Beispiel #9
0
 /**
  * Inserts payment information to DB. Returns insert status.
  *
  * @return bool
  */
 protected function _insert()
 {
     // we do not store credit card information
     // check and in case skip it
     if (!$this->getStoreCreditCardInfo() && $this->oxuserpayments__oxpaymentsid->value == 'oxidcreditcard') {
         return true;
     }
     //encode sensitive data
     if ($sValue = $this->oxuserpayments__oxvalue->value) {
         $oDb = oxDb::getDb();
         $sEncodedValue = $oDb->getOne("select encode( " . $oDb->quote($sValue) . ", '" . $this->getPaymentKey() . "' )", false, false);
         $this->oxuserpayments__oxvalue->setValue($sEncodedValue);
     }
     $blRet = parent::_insert();
     //restore, as encoding was needed only for saving
     if ($sEncodedValue) {
         $this->oxuserpayments__oxvalue->setValue($sValue);
     }
     return $blRet;
 }
Beispiel #10
0
 /**
  * Inserts user object data to DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxcreate date
     $this->oxuser__oxcreate = new oxField(date('Y-m-d H:i:s'), oxField::T_RAW);
     if (!isset($this->oxuser__oxboni->value)) {
         $this->oxuser__oxboni = new oxField($this->getBoni(), oxField::T_RAW);
     }
     return parent::_insert();
 }
Beispiel #11
0
 /**
  * Insert this Object into the database, this function only works
  * on the main table, it will not save any dependend tables, which
  * might be loaded through oxlist.
  *
  * @return bool
  */
 protected function _insert()
 {
     $blRet = parent::_insert();
     if ($blRet) {
         //also insert to multilang tables if it is separate
         foreach ($this->_getLanguageSetTables() as $sTable) {
             $sSq = "insert into {$sTable} set " . $this->_getUpdateFieldsForTable($sTable, $this->getUseSkipSaveFields());
             $blRet = $blRet && (bool) oxDb::getDb()->execute($sSq);
         }
     }
     return $blRet;
 }
Beispiel #12
0
 /**
  * Inserts object data fiels in DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxcreate
     $this->oxreviews__oxcreate = new oxField(date('Y-m-d H:i:s', oxRegistry::get("oxUtilsDate")->getTime()));
     return parent::_insert();
 }
Beispiel #13
0
 /**
  * Inserts order object information in DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     $myConfig = $this->getConfig();
     $oUtilsDate = oxRegistry::get("oxUtilsDate");
     //V #M525 orderdate must be the same as it was
     if (!$this->oxorder__oxorderdate->value) {
         $this->oxorder__oxorderdate = new oxField(date('Y-m-d H:i:s', $oUtilsDate->getTime()), oxField::T_RAW);
     } else {
         $this->oxorder__oxorderdate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxorderdate->value, true));
     }
     $this->oxorder__oxshopid = new oxField($myConfig->getShopId(), oxField::T_RAW);
     $this->oxorder__oxsenddate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxsenddate->value, true));
     $blInsert = parent::_insert();
     return $blInsert;
 }
 /**
  * Insert this Object into the database, this function only works
  * on the main table, it will not save any dependend tables, which
  * might be loaded through oxlist.
  *
  * @return bool
  */
 protected function _insert()
 {
     $result = parent::_insert();
     if ($result) {
         //also insert to multilang tables if it is separate
         foreach ($this->_getLanguageSetTables() as $table) {
             $sql = "insert into {$table} set " . $this->_getUpdateFieldsForTable($table, $this->getUseSkipSaveFields());
             $result = $result && (bool) $this->executeDatabaseQuery($sql);
         }
     }
     return $result;
 }
 /**
  * Inserts order object information in DB. Returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     $myConfig = $this->getConfig();
     $oUtilsDate = oxUtilsDate::getInstance();
     //V #M525 orderdate must be the same as it was
     if (!$this->oxorder__oxorderdate->value) {
         $this->oxorder__oxorderdate = new oxField(date('Y-m-d H:i:s', $oUtilsDate->getTime()), oxField::T_RAW);
     } else {
         $this->oxorder__oxorderdate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxorderdate->value, true));
     }
     $this->oxorder__oxshopid = new oxField($myConfig->getShopId(), oxField::T_RAW);
     $this->oxorder__oxsenddate = new oxField($oUtilsDate->formatDBDate($this->oxorder__oxsenddate->value, true));
     if ($blInsert = parent::_insert()) {
         // setting order number
         if (!$this->oxorder__oxordernr->value) {
             $aWhere = '';
             // separate order numbers for shops ...
             if ($this->_blSeparateNumbering) {
                 $aWhere = array('oxshopid = "' . $myConfig->getShopId() . '"');
             }
             $this->_setRecordNumber('oxordernr', $aWhere);
         }
     }
     return $blInsert;
 }
 /**
  * Inserts object data into DB, returns true on success.
  *
  * @return bool
  */
 protected function _insert()
 {
     // set oxinsert value
     $this->psarticlerequest__oxinsert = new oxField(date("Y-m-d H:i:s"));
     return parent::_insert();
 }