Skip to content
Permalink
Browse files

#319

Пересчет баллов пользователя
  • Loading branch information...
yusupovb committed Apr 27, 2017
1 parent 3a91596 commit af04dab05b0b614918ef5efc3a5ca0c185f47979
Showing with 4 additions and 1 deletion.
  1. +4 −1 plugins/userpoints/userpoints.folio.delete.done.php
@@ -16,6 +16,9 @@
*/
defined('COT_CODE') or die('Wrong URL.');
global $db_userpoints;
global $db_userpoints, $db_users;
$db->delete($db_userpoints, "item_type IN ('portfolioaddtocat', 'portfoliodeltocat') AND item_itemid=".$id);
$uuserpoints = $db->query("SELECT SUM(item_point) as summ FROM $db_userpoints WHERE item_userid=" . (int)$ritem['item_userid'])->fetchColumn();
$db->update($db_users, array('user_userpoints' => $uuserpoints), "user_id=" . (int)$ritem['item_userid']);

1 comment on commit af04dab

@eukraina

This comment has been minimized.

Copy link

eukraina commented on af04dab Apr 27, 2017

За исключением хвоста в flance_userpoints для уже не существующего юзера за логин + 1usp все остальное работает как надо, и при удалении фолио и при удалении всего юзера.

Please sign in to comment.
You can’t perform that action at this time.