Version 5.0.0 beta 7

This commit is contained in:
Neo committed 2025-12-19 17:18:38 -08:00
1 parent fa2a720105
commit 54d5dcd0a0
156 files changed
+4337 -2995

No files matched your search

@@ -13,6 +13,7 @@ namespace IPS\core;
/* To prevent PHP errors (extending class does not exist) revealing path */
use IPS\Application;
use IPS\convert\App;
use IPS\Data\Store;
use IPS\DateTime;
use IPS\Db;
@@ -272,12 +273,12 @@ abstract class AdminNotification extends ActiveRecord
$notifications = array();
foreach ( Store::i()->acpNotifications as $notification )
{
if ( Application::appIsEnabled( $notification['app'] ) AND class_exists( 'IPS\\' . $notification['app'] . '\extensions\core\AdminNotifications\\' . IPS::mb_ucfirst( $notification['ext'] ) ) )
if( Application::appIsEnabled( $notification['app'] ) )
{
$notificationObject = static::constructFromData( $notification );
if ( $notificationObject )
$app = Application::load( $notification['app'] );
if( array_key_exists( $notification['ext'], $app->extensions( $app, 'AdminNotifications', false ) ) AND class_exists( 'IPS\\' . $notification['app'] . '\extensions\core\AdminNotifications\\' . IPS::mb_ucfirst( $notification['ext'] ) ) )
{
$notificationObject = static::constructFromData( $notification );
$notifications[$notificationObject->id] = $notificationObject;
}
else
@@ -585,7 +585,7 @@ HTML,
*/
public static function i(): static
{
if ( empty( static::$instance ) )
if ( !static::hasInstance() )
{
if ( ( \IPS\IN_DEV OR CIC ) AND class_exists( '\IPS\cloud\DataLayer' ) )
{
@@ -607,6 +607,16 @@ HTML,
return static::$instance;
}
/**
* Check if there is an instance currently
*
* @return bool
*/
public static function hasInstance() : bool
{
return !empty( static::$instance );
}
/**
* Initialize this instance
*
@@ -631,6 +641,12 @@ HTML,
*/
public function addEvent( string $key, array $values, bool $odkUpdate=true ) : void
{
/* Do we care about the datalayer on this request? */
if ( Output::i()->bypassDataLayer )
{
return;
}
/* Is it set */
if ( !$odkUpdate AND isset( $this->events[$key] ) )
{
@@ -796,6 +812,11 @@ HTML,
*/
public function addContextProperty( string $key, mixed $value, bool $odkUpdate=true ) : void
{
if ( Output::i()->bypassDataLayer )
{
return;
}
/* Did we set it already? */
if ( !$odkUpdate AND isset( $this->context[$key] ) )
{
@@ -343,6 +343,11 @@ abstract class FrontNavigationAbstract
*/
public function isAvailableFor( string $type ): bool
{
if( !$this->canView() )
{
return false;
}
if ( $this->menuTypes === '*' )
{
return true;