[*] WS : improved web service performances
This commit is contained in:
1 parent
6b71ec8b09
commit
c60c3da6a1
2 files changed
+15
-6
No files matched your search
@@ -376,7 +376,7 @@ class WebserviceOutputBuilderCore
|
|||||||
{
|
{
|
||||||
if ($key !== 'empty')
|
if ($key !== 'empty')
|
||||||
{
|
{
|
||||||
if ($this->fieldsToDisplay === 'minimum')
|
if ($this->fieldsToDisplay === 'minimum')
|
||||||
$output .= $this->renderEntityMinimum($object, $depth);
|
$output .= $this->renderEntityMinimum($object, $depth);
|
||||||
else
|
else
|
||||||
$output .= $this->renderEntity($object, $depth);
|
$output .= $this->renderEntity($object, $depth);
|
||||||
|
|||||||
@@ -530,9 +530,10 @@ class WebserviceRequestCore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this->returnOutput();
|
$return = $this->returnOutput();
|
||||||
unset($webservice_call);
|
unset($webservice_call);
|
||||||
unset ($display_errors);
|
unset($display_errors);
|
||||||
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function webserviceChecks()
|
protected function webserviceChecks()
|
||||||
@@ -1158,6 +1159,7 @@ class WebserviceRequestCore
|
|||||||
$sorts = array($this->urlFragments['sort']);
|
$sorts = array($this->urlFragments['sort']);
|
||||||
|
|
||||||
$sql_sort .= ' ORDER BY ';
|
$sql_sort .= ' ORDER BY ';
|
||||||
|
|
||||||
foreach ($sorts as $sort)
|
foreach ($sorts as $sort)
|
||||||
{
|
{
|
||||||
$delimiterPosition = strrpos($sort, '_');
|
$delimiterPosition = strrpos($sort, '_');
|
||||||
@@ -1219,8 +1221,6 @@ class WebserviceRequestCore
|
|||||||
return $filters;
|
return $filters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getFilteredObjectList()
|
public function getFilteredObjectList()
|
||||||
{
|
{
|
||||||
$objects = array();
|
$objects = array();
|
||||||
@@ -1241,7 +1241,16 @@ class WebserviceRequestCore
|
|||||||
if ($sqlObjects)
|
if ($sqlObjects)
|
||||||
{
|
{
|
||||||
foreach ($sqlObjects as $sqlObject)
|
foreach ($sqlObjects as $sqlObject)
|
||||||
$objects[] = new $this->resourceConfiguration['retrieveData']['className']((int)$sqlObject[$this->resourceConfiguration['fields']['id']['sqlId']]);
|
{
|
||||||
|
if ($this->fieldsToDisplay == 'minimum')
|
||||||
|
{
|
||||||
|
$obj = new $this->resourceConfiguration['retrieveData']['className']();
|
||||||
|
$obj->id = (int)$sqlObject[$this->resourceConfiguration['fields']['id']['sqlId']];
|
||||||
|
$objects[] = $obj;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$objects[] = new $this->resourceConfiguration['retrieveData']['className']((int)$sqlObject[$this->resourceConfiguration['fields']['id']['sqlId']]);
|
||||||
|
}
|
||||||
return $objects;
|
return $objects;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user