Ejemplo n.º 1
0
 private static function cleanPost($sReturn, $bSkipTrim = false)
 {
     if (get_magic_quotes_gpc()) {
         $sReturn = stripslashes($sReturn);
     }
     if (!$bSkipTrim) {
         $sReturn = trim($sReturn);
     }
     $sReturn = AnwUtils::standardizeCRLF($sReturn);
     return $sReturn;
 }
Ejemplo n.º 2
0
 static function getContentFieldValuesFromArrayItems($oContentField, $cfg)
 {
     if (!$oContentField instanceof AnwStructuredContentField_atomic) {
         throw new AnwUnexpectedException("getContentFieldValuesFromArrayItems called on composed field");
     }
     $asValues = array();
     $sFieldName = $oContentField->getName();
     if ($oContentField->isMultiple()) {
         foreach ($cfg as $mArrayItem) {
             $sValue = $oContentField->getValueFromArrayItem($mArrayItem);
             $sValue = AnwUtils::standardizeCRLF($sValue);
             //required for comparing override values against default values
             $asValues[] = $sValue;
         }
     } else {
         $sValue = $oContentField->getValueFromArrayItem($cfg);
         $sValue = AnwUtils::standardizeCRLF($sValue);
         //required for comparing override values against default values
         $asValues[] = $sValue;
     }
     return $asValues;
 }