Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
+44
-25
@@ -63,10 +63,7 @@ class History extends \IPS\Helpers\Table\Db
|
||||
|
||||
foreach( $apps as $application )
|
||||
{
|
||||
$result = $application->extensions( 'core', 'MemberHistory' );
|
||||
|
||||
/* Since we're parsing, we only want to have one extension */
|
||||
static::$extensions[ $application->directory ] = array_pop( $result );
|
||||
static::$extensions[ $application->directory ] = $application->extensions( 'core', 'MemberHistory' );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,27 +87,30 @@ class History extends \IPS\Helpers\Table\Db
|
||||
$options = array();
|
||||
$extensions = static::$extensions;
|
||||
|
||||
foreach( $extensions as $app => $extension )
|
||||
foreach( $extensions as $app => $appExtensions )
|
||||
{
|
||||
if( $extension === null )
|
||||
{
|
||||
unset( $extensions[ $app ] );
|
||||
continue;
|
||||
}
|
||||
foreach( $appExtensions as $index => $extension )
|
||||
{
|
||||
if( $extension === null )
|
||||
{
|
||||
unset( $extensions[ $app ][ $index ] );
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach( $extension->getTypes() as $type )
|
||||
{
|
||||
if ( $type === 'oauth' and Db::i()->select( 'COUNT(*)', 'core_oauth_clients', array( Db::i()->findInSet( 'oauth_grant_types', array( 'authorization_code', 'implicit', 'password' ) ) ) )->first() === 1 )
|
||||
{
|
||||
foreach ( new ActiveRecordIterator( Db::i()->select( '*', 'core_oauth_clients', array( Db::i()->findInSet( 'oauth_grant_types', array( 'authorization_code', 'implicit', 'password' ) ) ) ), 'IPS\Api\OAuthClient' ) as $client )
|
||||
{
|
||||
$options[ $type ] = $client->_title;
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
foreach( $extension->getTypes() as $type )
|
||||
{
|
||||
if ( $type === 'oauth' and Db::i()->select( 'COUNT(*)', 'core_oauth_clients', array( Db::i()->findInSet( 'oauth_grant_types', array( 'authorization_code', 'implicit', 'password' ) ) ) )->first() === 1 )
|
||||
{
|
||||
foreach ( new ActiveRecordIterator( Db::i()->select( '*', 'core_oauth_clients', array( Db::i()->findInSet( 'oauth_grant_types', array( 'authorization_code', 'implicit', 'password' ) ) ) ), 'IPS\Api\OAuthClient' ) as $client )
|
||||
{
|
||||
$options[ $type ] = $client->_title;
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
|
||||
$options[ $type ] = 'log_type_title_' . $type;
|
||||
}
|
||||
$options[ $type ] = 'log_type_title_' . $type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->advancedSearch = array(
|
||||
@@ -127,7 +127,13 @@ class History extends \IPS\Helpers\Table\Db
|
||||
{
|
||||
try
|
||||
{
|
||||
return $extensions[ $row['log_app'] ]->parseLogType( $val, $row );
|
||||
foreach( $extensions[ $row['log_app'] ] as $extension )
|
||||
{
|
||||
if( in_array( $row['log_type'], $extension->getTypes() ) )
|
||||
{
|
||||
return $extension->parseLogType( $val, $row );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( Throwable $e )
|
||||
{
|
||||
@@ -146,13 +152,26 @@ class History extends \IPS\Helpers\Table\Db
|
||||
},
|
||||
'log_member'=> function( $val, $row ) use ( $extensions )
|
||||
{
|
||||
return $extensions[ $row['log_app'] ]->parseLogMember( $val, $row );
|
||||
foreach( $extensions[ $row['log_app'] ] as $extension )
|
||||
{
|
||||
if( in_array( $row['log_type'], $extension->getTypes() ) )
|
||||
{
|
||||
return $extension->parseLogMember( $val, $row );
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
'log_data' => function( $val, $row ) use ( $extensions )
|
||||
{
|
||||
try
|
||||
{
|
||||
return $extensions[ $row['log_app'] ]->parseLogData( $val, $row );
|
||||
foreach( $extensions[ $row['log_app'] ] as $extension )
|
||||
{
|
||||
if( in_array( $row['log_type'], $extension->getTypes() ) )
|
||||
{
|
||||
return $extension->parseLogData( $val, $row );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( Throwable $e )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user