Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -7,16 +7,19 @@
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage
|
||||
* @since 6/25/2024
|
||||
* @since 7/23/2024
|
||||
*/
|
||||
|
||||
namespace IPS\Node;
|
||||
|
||||
use BadMethodCallException;
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Data\Store;
|
||||
use IPS\Redis;
|
||||
use OutOfRangeException;
|
||||
use BadMethodCallException;
|
||||
use function get_called_class;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
@@ -30,7 +33,7 @@ trait DelayedCount
|
||||
*/
|
||||
protected function getStorageId() : string
|
||||
{
|
||||
return \get_called_class() . '_' . $this->_id;
|
||||
return get_called_class() . '_' . $this->_id;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,7 +74,7 @@ trait DelayedCount
|
||||
Redis::i()->expire( 'nodeSyncTimes', ( 2 * 3600 ) );
|
||||
}
|
||||
}
|
||||
catch( BadMethodCallException | \RedisException )
|
||||
catch( BadMethodCallException )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -93,10 +96,7 @@ trait DelayedCount
|
||||
/* Bubble up to parent nodes */
|
||||
try
|
||||
{
|
||||
if( $parent = $this->parent() )
|
||||
{
|
||||
$parent->storeUpdateTime();
|
||||
}
|
||||
$this->parent()?->storeUpdateTime();
|
||||
}
|
||||
catch( \OutOfRangeException )
|
||||
{}
|
||||
@@ -156,7 +156,7 @@ trait DelayedCount
|
||||
/**
|
||||
* Count all comments, items, etc
|
||||
*
|
||||
* @return mixed
|
||||
* @return void
|
||||
*/
|
||||
abstract protected function recount();
|
||||
}
|
||||
abstract protected function recount() : void;
|
||||
}
|
||||
Reference in new issue
Block a user