"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php" between
phplist-3.4.9.tgz and phplist-3.5.0.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

RedisHandler.php  (phplist-3.4.9.tgz):RedisHandler.php  (phplist-3.5.0.tgz)
skipping to change at line 76 skipping to change at line 76
/** /**
* Write and cap the collection * Write and cap the collection
* Writes the record to the redis list and caps its * Writes the record to the redis list and caps its
* *
* @param array $record associative record array * @param array $record associative record array
* @return void * @return void
*/ */
protected function writeCapped(array $record) protected function writeCapped(array $record)
{ {
if ($this->redisClient instanceof \Redis) { if ($this->redisClient instanceof \Redis) {
$this->redisClient->multi() $mode = defined('\Redis::MULTI') ? \Redis::MULTI : 1;
$this->redisClient->multi($mode)
->rpush($this->redisKey, $record["formatted"]) ->rpush($this->redisKey, $record["formatted"])
->ltrim($this->redisKey, -$this->capSize, -1) ->ltrim($this->redisKey, -$this->capSize, -1)
->exec(); ->exec();
} else { } else {
$redisKey = $this->redisKey; $redisKey = $this->redisKey;
$capSize = $this->capSize; $capSize = $this->capSize;
$this->redisClient->transaction(function ($tx) use ($record, $redisK ey, $capSize) { $this->redisClient->transaction(function ($tx) use ($record, $redisK ey, $capSize) {
$tx->rpush($redisKey, $record["formatted"]); $tx->rpush($redisKey, $record["formatted"]);
$tx->ltrim($redisKey, -$capSize, -1); $tx->ltrim($redisKey, -$capSize, -1);
}); });
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)