OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions ApiEntityManager->getOffset wrong

This topic contains 1 reply, has 2 voices, and was last updated by  Alexandr Smaga 9 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #24790

    manhapt
    Participant

    I wonder that how function getOffset works in tracksideoro\vendor\oro\platform\src\Oro\Bundle\SoapBundle\Entity\Manager\ApiEntityManager.php .

    protected function getOffset($page)
    {
    if (!$page !== null) {
    $page = $page > 0 ? $page – 1 : 0;
    }

    return $page;
    }

    It looks totally incorrect.

    It should like this:

    private function calculateOffset() {
    //Calculet offset for items based on current page number
    $this->offset = ($this->currentpage – 1) * $this->limit;
    }

    What do you think?

    Regards,
    Tom Nguyen

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #24791

    Alexandr Smaga
    Participant

    Hi. Yes it looks like a bug. Fix will be included in the nearest release.

    Thank you!

Viewing 1 replies (of 1 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top