Index: branches/5.3.x/units/products/products_event_handler.php
===================================================================
diff -u -N -r15936 -r15983
--- branches/5.3.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15936)
+++ branches/5.3.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15983)
@@ -1,6 +1,6 @@
Application->RecallVar('user_id');
- $sql = ' SELECT * FROM ' . TABLE_PREFIX . 'SpamControl
+ $sql = ' SELECT Id, Expire FROM ' . TABLE_PREFIX . 'SpamControl
WHERE ItemResourceId=' . $object->GetDBField('ResourceId') . '
AND IPaddress="' . $this->Application->getClientIp() . '"
AND PortalUserId=' . $user_id . '
@@ -702,10 +702,7 @@
if ( $res && $res['Expire'] < time() ) {
$sql = ' DELETE FROM ' . TABLE_PREFIX . 'SpamControl
- WHERE ItemResourceId=' . $object->GetDBField('ResourceId') . '
- AND IPaddress="' . $this->Application->getClientIp() . '"
- AND PortalUserId=' . $user_id . '
- AND DataType="Rating"';
+ WHERE Id= ' . $res['Id'];
$this->Conn->Query($sql);
unset($res);
}
@@ -938,7 +935,11 @@
'MembershipExpires' => $expire,
);
- $this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'UserGroupRelations', 'REPLACE');
+ if ( isset($user_groups[$group_id]) ) {
+ $this->Conn->doUpdate($fields_hash, TABLE_PREFIX . 'UserGroupRelations', 'Id = ' . $user_groups['Id']);
+ } else {
+ $this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'UserGroupRelations');
+ }
$sub_order = $this->Application->recallObject('ord.-sub'.$event->getEventParam('next_sub_number'), 'ord');
$sub_order->SetDBField('IsRecurringBilling', getArrayValue($item_data, 'IsRecurringBilling') ? 1 : 0);
Index: branches/5.3.x/admin_templates/products/products_categories.tpl
===================================================================
diff -u -N -r15971 -r15983
--- branches/5.3.x/admin_templates/products/products_categories.tpl (.../products_categories.tpl) (revision 15971)
+++ branches/5.3.x/admin_templates/products/products_categories.tpl (.../products_categories.tpl) (revision 15983)
@@ -76,7 +76,7 @@
-
+