Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -254,7 +254,17 @@ abstract class _AdminNotification extends \IPS\Patterns\ActiveRecord
|
||||
{
|
||||
if ( \IPS\Application::appIsEnabled( $notification['app'] ) )
|
||||
{
|
||||
$notifications[ $notification['id'] ] = \IPS\core\AdminNotification::constructFromData( $notification );
|
||||
$notificationObject = \IPS\core\AdminNotification::constructFromData( $notification );
|
||||
|
||||
if( $notificationObject )
|
||||
{
|
||||
$notifications[ $notificationObject->id ] = $notificationObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Remove orphan entry */
|
||||
\IPS\Db::i()->delete( 'core_acp_notifications', array( 'id=?', $notification['id'] ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
return $notifications;
|
||||
@@ -388,12 +398,17 @@ abstract class _AdminNotification extends \IPS\Patterns\ActiveRecord
|
||||
*
|
||||
* @param array $data Row from database table
|
||||
* @param bool $updateMultitonStoreIfExists Replace current object in multiton store if it already exists there?
|
||||
* @return static
|
||||
* @return static|false
|
||||
*/
|
||||
public static function constructFromData( $data, $updateMultitonStoreIfExists = TRUE )
|
||||
public static function constructFromData( $data, $updateMultitonStoreIfExists = TRUE ): static|false
|
||||
{
|
||||
$classname = 'IPS\\' . $data['app'] . '\extensions\core\AdminNotifications\\' . mb_ucfirst( $data['ext'] );
|
||||
|
||||
|
||||
if( !class_exists( $classname ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Initiate an object */
|
||||
$obj = new $classname;
|
||||
$obj->_new = FALSE;
|
||||
|
||||
Reference in new issue
Block a user