// Fix PSCFV-4060

This commit is contained in:
rGaillard
2012-09-19 14:11:24 +00:00
parent 8c548e2e22
commit 25625c3d5a
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -1476,16 +1476,16 @@ class WebserviceRequestCore
}
elseif ((!isset($fieldProperties['required']) || !$fieldProperties['required']) && property_exists($object, $sqlId))
$object->$sqlId = null;
if (isset($fieldProperties['i18n']) && $fieldProperties['i18n'])
{
$i18n = true;
if (isset($attributes->$fieldName, $attributes->$fieldName->language))
foreach ($attributes->$fieldName->language as $lang)
$object->{$fieldName}[(int)$lang->attributes()->id] = (string)$lang;
else
$object->{$fieldName} = (string)$attributes->$fieldName;
}
}
if (!$this->hasErrors())
{
if ($i18n && ($retValidateFieldsLang = $object->validateFieldsLang(false, true)) !== true)
@@ -976,6 +976,10 @@ class WebserviceSpecificManagementImagesCore implements WebserviceSpecificManage
}
@unlink($tmpName);
$this->imgToDisplay = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$image->image_format;
$this->objOutput->setFieldsToDisplay('full');
$this->output = $this->objOutput->renderEntity($image, 1);
$image_content = array('sqlId' => 'content', 'value' => file_get_contents($this->imgToDisplay));
$this->output .= $this->objOutput->objectRender->renderField($image_content);
}
elseif ($this->imageType == 'categories')
{