X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fpoints%2Fclass_UserPoints.php;h=efbd9c82e4f4892636dbc4349499604f47aca967;hp=f4dbad4d5cb57280a2d94ae915b47b4f17d56096;hb=51caaa61ae7ee017abdfd116bbd8c438451315b2;hpb=afc9d5686bbf81324095f687ec007c1818c7dc21 diff --git a/inc/classes/main/points/class_UserPoints.php b/inc/classes/main/points/class_UserPoints.php index f4dbad4d..efbd9c82 100644 --- a/inc/classes/main/points/class_UserPoints.php +++ b/inc/classes/main/points/class_UserPoints.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -63,6 +63,9 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo // Get result back $resultInstance = $wrapperInstance->doSelectByCriteria($searchInstance); + // Advance to first entry by default + $resultInstance->next(); + // Set it in this instance $pointsInstance->setResultInstance($resultInstance); @@ -103,6 +106,9 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo // Get the required points entry $requiredPoints = $this->getConfigInstance()->getConfigEntry($action . '_action_points'); + // Rewind always + $this->getResultInstance()->rewind(); + // Do we have an entry? if ($this->getResultInstance()->next()) { // Get the entry @@ -123,6 +129,9 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo * @return void */ function bookPointsDirectly ($amount) { + // Rewind always + $this->getResultInstance()->rewind(); + // Do we have an entry? if ($this->getResultInstance()->next()) { // Get the entry