ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

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

  • Creator
    Topic
  • #4426

    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
  • #4443

    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)

You must be logged in to reply to this topic.