-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop
Accepted Community Pull Requests: - #30405: 26133: Fixed - Coupon code text field not display in proper width in … (by @solwininfotech) - #30454: Remove incorrect use important in swatches option text (by @mrtuvn) - #30458: [Fixed-30452] - Design issue in minicart item remove confirmation modal (by @niravkrish) - #30355: Fix #30296 - Wrong ip value in sendfriend_log table (by @Bartlomiejsz) Fixed GitHub Issues: - #26133: Coupon code text field not display in proper width in Internet Explorer/EDGE browser (reported by @hasim32) has been fixed in #30405 by @solwininfotech in 2.4-develop branch Related commits: 1. a535faa 2. a37cf33 3. e8ad9ae - #30496: [Issue] Remove incorrect use important in swatches option text (reported by @m2-assistant[bot]) has been fixed in #30454 by @mrtuvn in 2.4-develop branch Related commits: 1. df5ae12 - #30452: Design issue in minicart item remove confirmation modal. (reported by @saumya1998) has been fixed in #30458 by @niravkrish in 2.4-develop branch Related commits: 1. daf0dc6 - #30296: Wrong ip value in send friend_log table (reported by @magento-engcom-team) has been fixed in #30355 by @Bartlomiejsz in 2.4-develop branch Related commits: 1. ccc83b2 2. bc53649
- Loading branch information
Showing
7 changed files
with
56 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,6 @@ | |
namespace Magento\SendFriend\Model\ResourceModel; | ||
|
||
/** | ||
* SendFriend Log Resource Model | ||
* | ||
* @author Magento Core Team <[email protected]> | ||
* | ||
* @api | ||
* @since 100.0.2 | ||
*/ | ||
|
@@ -32,6 +28,7 @@ protected function _construct() | |
* @param int $ip | ||
* @param int $startTime | ||
* @param int $websiteId | ||
* | ||
* @return int | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
|
@@ -46,7 +43,7 @@ public function getSendCount($object, $ip, $startTime, $websiteId = null) | |
AND time>=:time | ||
AND website_id=:website_id' | ||
); | ||
$bind = ['ip' => ip2long($ip), 'time' => $startTime, 'website_id' => (int)$websiteId]; | ||
$bind = ['ip' => $ip, 'time' => $startTime, 'website_id' => (int)$websiteId]; | ||
|
||
$row = $connection->fetchRow($select, $bind); | ||
return $row['count']; | ||
|
@@ -58,21 +55,24 @@ public function getSendCount($object, $ip, $startTime, $websiteId = null) | |
* @param int $ip | ||
* @param int $startTime | ||
* @param int $websiteId | ||
* | ||
* @return $this | ||
*/ | ||
public function addSendItem($ip, $startTime, $websiteId) | ||
{ | ||
$this->getConnection()->insert( | ||
$this->getMainTable(), | ||
['ip' => ip2long($ip), 'time' => $startTime, 'website_id' => $websiteId] | ||
['ip' => $ip, 'time' => $startTime, 'website_id' => $websiteId] | ||
); | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Delete Old logs | ||
* | ||
* @param int $time | ||
* | ||
* @return $this | ||
*/ | ||
public function deleteLogsBefore($time) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters