Class constants have to be prefixed with self:: in PHP

Signed-off-by: Michael Tänzer <neo@nhng.de>
This commit is contained in:
Michael Tänzer 2010-04-29 20:49:27 +02:00
parent 4af9e0a9bb
commit ac7f1ba03d

View file

@ -90,17 +90,17 @@ class AddPointsController extends Zend_Controller_Action
$points = $values['quantity'];
do {
// split up into multiple assurances
if ($points > MAX_POINTS_PER_ASSURANCE) {
$assurance['awarded'] = MAX_POINTS_PER_ASSURANCE;
$points -= MAX_POINTS_PER_ASSURANCE;
if ($points > self::MAX_POINTS_PER_ASSURANCE) {
$assurance['awarded'] = self::MAX_POINTS_PER_ASSURANCE;
$points -= self::MAX_POINTS_PER_ASSURANCE;
} else {
$assurance['awarded'] = $points;
$points = 0;
}
// only assign points whithin the limit
if ($user['points'] + $assurance['awarded'] > MAX_ASSURANCE_POINTS){
$assurance['points'] = MAX_ASSURANCE_POINTS - $user['points'];
if ($user['points'] + $assurance['awarded'] > self::MAX_ASSURANCE_POINTS){
$assurance['points'] = self::MAX_ASSURANCE_POINTS - $user['points'];
} else {
$assurance['points'] = $assurance['awarded'];
}