Ejemplo n.º 1
0
 /**
  * Sets data field value
  *
  * @param string $sFieldName index OR name (eg. 'oxarticles__oxtitle') of a data field to set
  * @param string $sValue     value of data field
  * @param int    $iDataType  field type
  *
  * @return null
  */
 protected function _setFieldData($sFieldName, $sValue, $iDataType = oxField::T_TEXT)
 {
     if ('oxurldesc' === strtolower($sFieldName) || 'oxlinks__oxurldesc' === strtolower($sFieldName)) {
         $iDataType = oxField::T_RAW;
     }
     return parent::_setFieldData($sFieldName, $sValue, $iDataType);
 }
Ejemplo n.º 2
0
 /**
  * Sets data field value
  *
  * @param string $sFieldName index OR name (eg. 'oxarticles__oxtitle') of a data field to set
  * @param string $sValue     value of data field
  * @param int    $iDataType  field type
  *
  * @return null
  */
 protected function _setFieldData($sFieldName, $sValue, $iDataType = oxField::T_TEXT)
 {
     switch (strtolower($sFieldName)) {
         case 'oxlongdesc':
         case 'oxnews__oxlongdesc':
             $iDataType = oxField::T_RAW;
             break;
     }
     return parent::_setFieldData($sFieldName, $sValue, $iDataType);
 }
Ejemplo n.º 3
0
 /**
  * Sets data field value
  *
  * @param string $sFieldName index OR name (eg. 'oxarticles__oxtitle') of a data field to set
  * @param string $sValue     value of data field
  * @param int    $iDataType  field type
  *
  * @return null
  */
 protected function _setFieldData($sFieldName, $sValue, $iDataType = oxField::T_TEXT)
 {
     //preliminary quick check saves 3% of execution time in category lists by avoiding redundant strtolower() call
     if ($sFieldName[2] == 'l' || $sFieldName[2] == 'L' || isset($sFieldName[16]) && ($sFieldName[16] == 'l' || $sFieldName[16] == 'L')) {
         if ('oxlongdesc' === strtolower($sFieldName) || 'oxcategories__oxlongdesc' === strtolower($sFieldName)) {
             $iDataType = oxField::T_RAW;
         }
     }
     return parent::_setFieldData($sFieldName, $sValue, $iDataType);
 }