// Merge -> revision 9124

This commit is contained in:
rMalie
2011-10-07 09:54:43 +00:00
parent 22d560688d
commit d46fbbc039
56 changed files with 1682 additions and 1656 deletions
+9 -13
View File
@@ -1,6 +1,6 @@
<?php
/*
* 2007-2011 PrestaShop
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
@@ -25,29 +25,25 @@
* International Registered Trademark & Property of PrestaShop SA
*/
/**
* @author Lucas Cherifi - Nans Pellicari - Anatole Korczak - PrestaShop Team
*/
class WebserviceOutputXMLCore implements WebserviceOutputInterface
{
public $docUrl = '';
public $languages = array();
protected $wsUrl;
protected $schemaToDisplay;
public function setSchemaToDisplay($schema)
{
if (is_string($schema))
$this->schemaToDisplay = $schema;
return $this;
}
public function getSchemaToDisplay()
{
return $this->schemaToDisplay;
}
public function setWsUrl($url)
{
$this->wsUrl = $url;
@@ -98,10 +94,10 @@ class WebserviceOutputXMLCore implements WebserviceOutputInterface
foreach ($this->languages as $language)
{
$more_attr = '';
if (isset($field['synopsis_details']) || (isset($field['value']) AND is_array($field['value'])))
if (isset($field['synopsis_details']) || (isset($field['value']) AND is_array($field['value'])))
{
$more_attr .= ' xlink:href="'.$this->getWsUrl().'languages/'.$language.'"';
if (isset($field['synopsis_details']) && $this->schemaToDisplay != 'blank')
if (isset($field['synopsis_details']) && $this->schemaToDisplay != 'blank')
$more_attr .= ' format="isUnsignedId" ';
}
$node_content .= '<language id="'.$language.'"'.$more_attr.'>';
@@ -121,11 +117,11 @@ class WebserviceOutputXMLCore implements WebserviceOutputInterface
$ret .= ' xlink:href="'.$this->getWsUrl().$field['xlink_resource']['resourceName'].'/'.
(isset($field['xlink_resource']['subResourceName']) ? $field['xlink_resource']['subResourceName'].'/'.$field['object_id'].'/' : '').$field['value'].'"';
}
if (isset($field['getter']) && $this->schemaToDisplay != 'blank')
$ret .= ' not_filterable="true"';
if ($field['value'] != '')
if ($field['value'] != '')
$node_content .= '<![CDATA['.$field['value'].']]>';
}
if (isset($field['synopsis_details']) && !empty($field['synopsis_details']) && $this->schemaToDisplay !== 'blank')