Merge branch 'bug-1391'
This commit is contained in:
commit
733814fd08
1 changed files with 97 additions and 98 deletions
|
@ -108,8 +108,8 @@ class Default_Model_User {
|
||||||
* user's points
|
* user's points
|
||||||
*/
|
*/
|
||||||
public function refreshPoints() {
|
public function refreshPoints() {
|
||||||
$query = "select sum(`points`) as `total` from `notary` " .
|
$query = "SELECT SUM(`points`) AS `total` FROM `notary` " .
|
||||||
"where `to` = :user and method != 'Administrative Increase' and from != to";
|
"WHERE `to` = :user AND `method` != 'Administrative Increase' AND `from` != `to`";
|
||||||
$query_params['user'] = $this->id;
|
$query_params['user'] = $this->id;
|
||||||
$row = $this->db->query($query, $query_params)->fetch();
|
$row = $this->db->query($query, $query_params)->fetch();
|
||||||
if ($row['total'] === null) $row['total'] = 0;
|
if ($row['total'] === null) $row['total'] = 0;
|
||||||
|
@ -225,8 +225,7 @@ class Default_Model_User {
|
||||||
* The amount of points that have been issued (might be less than
|
* The amount of points that have been issued (might be less than
|
||||||
* $points)
|
* $points)
|
||||||
*/
|
*/
|
||||||
public function assure(Default_Model_User $assuree, $points, $location,
|
public function assure(Default_Model_User $assuree, $points, $location, $date) {
|
||||||
$date) {
|
|
||||||
// Sanitize inputs
|
// Sanitize inputs
|
||||||
$points = intval($points);
|
$points = intval($points);
|
||||||
$location = stripslashes($location);
|
$location = stripslashes($location);
|
||||||
|
|
Loading…
Reference in a new issue