dever 6 anos atrás
pai
commit
ec68a3dd07
1 arquivos alterados com 2 adições e 4 exclusões
  1. 2 4
      tm/lib/Controller/UserHelp.class.php

+ 2 - 4
tm/lib/Controller/UserHelp.class.php

@@ -61,9 +61,6 @@ class UserHelp  extends EventsController {
 
 		$this->LotteryUserHelp = new LotteryUserHelp ();
 
-		$totals = $this->LotteryUserHelpLog->totals(array('help_id' => $help_id));
-		$this->LotteryUserHelp->modify(array('num' => $totals), array('id' => $help_id));
-
 		$condition = array
 		(
 			'help_id' => $help_id,
@@ -80,7 +77,8 @@ class UserHelp  extends EventsController {
 			$id = $this->LotteryUserHelpLog->add($condition);
 		}
 
-
+		$totals = $this->LotteryUserHelpLog->totals(array('help_id' => $help_id));
+		$this->LotteryUserHelp->modify(array('num' => $totals), array('id' => $help_id));
 		
 		self::ajax_success_exit();
 	}