|
@@ 472-478 (lines=7) @@
|
| 469 |
|
|
| 470 |
|
// Note $inlinecount=allpages means include the total count regardless of paging..so we set the counts first |
| 471 |
|
// regardless if POData does the paging or not. |
| 472 |
|
if ($this->getRequest()->queryType == QueryType::ENTITIES_WITH_COUNT()) { |
| 473 |
|
if ($this->getProviders()->handlesOrderedPaging()) { |
| 474 |
|
$this->getRequest()->setCountValue($result->count); |
| 475 |
|
} else { |
| 476 |
|
$this->getRequest()->setCountValue(count($result->results)); |
| 477 |
|
} |
| 478 |
|
} |
| 479 |
|
|
| 480 |
|
//Have POData perform paging if necessary |
| 481 |
|
if (!$this->getProviders()->handlesOrderedPaging() && !empty($result->results)) { |
|
@@ 487-493 (lines=7) @@
|
| 484 |
|
|
| 485 |
|
//a bit surprising, but $skip and $top affects $count so update it here, not above |
| 486 |
|
//IE data.svc/Collection/$count?$top=10 returns 10 even if Collection has 11+ entries |
| 487 |
|
if ($this->getRequest()->queryType == QueryType::COUNT()) { |
| 488 |
|
if ($this->getProviders()->handlesOrderedPaging()) { |
| 489 |
|
$this->getRequest()->setCountValue($result->count); |
| 490 |
|
} else { |
| 491 |
|
$this->getRequest()->setCountValue(count($result->results)); |
| 492 |
|
} |
| 493 |
|
} |
| 494 |
|
|
| 495 |
|
$segment->setResult($result->results); |
| 496 |
|
} |