Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -69,6 +69,20 @@ class _Databases
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$page = \IPS\cms\Pages\Page::load( $database->page_id );
|
||||
|
||||
if( !$page->can( 'view', new \IPS\Member ) )
|
||||
{
|
||||
throw new \OutOfRangeException;
|
||||
}
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$class = '\IPS\cms\Records' . $database->id;
|
||||
|
||||
@@ -117,7 +131,7 @@ class _Databases
|
||||
$select = array();
|
||||
if ( in_array( 'IPS\Content\Permissions', class_implements( $nodeClass ) ) or in_array( 'IPS\Node\Permissions', class_implements( $nodeClass ) ) )
|
||||
{
|
||||
$select = new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', $nodeClass::$databaseTable, array( '(' . \IPS\Db::i()->findInSet( 'perm_view', array( \IPS\Settings::i()->guest_group ) ) . ' OR ' . 'perm_view=? )', '*' ) )->join( 'core_permission_index', array( "core_permission_index.app=? AND core_permission_index.perm_type=? AND core_permission_index.perm_type_id={$nodeClass::$databaseTable}.{$nodeClass::$databasePrefix}{$nodeClass::$databaseColumnId}", $nodeClass::$permApp, $nodeClass::$permType ) ), $nodeClass );
|
||||
$select = new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', $nodeClass::$databaseTable, array( 'category_database_id=? AND (' . \IPS\Db::i()->findInSet( 'perm_view', array( \IPS\Settings::i()->guest_group ) ) . ' OR ' . 'perm_view=? )', $databaseId, '*' ) )->join( 'core_permission_index', array( "core_permission_index.app=? AND core_permission_index.perm_type=? AND core_permission_index.perm_type_id={$nodeClass::$databaseTable}.{$nodeClass::$databasePrefix}{$nodeClass::$databaseColumnId}", $nodeClass::$permApp, $nodeClass::$permType ) ), $nodeClass );
|
||||
}
|
||||
else if ( $nodeClass::$ownerTypes !== NULL and is_subclass_of( $nodeClass, 'IPS\Node\Model' ) )
|
||||
{
|
||||
@@ -134,8 +148,9 @@ class _Databases
|
||||
if ( $priority !== -1 )
|
||||
{
|
||||
$data['priority'] = $priority;
|
||||
$entries[] = $data;
|
||||
}
|
||||
|
||||
$entries[] = $data;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -160,8 +175,9 @@ class _Databases
|
||||
if ( $priority !== -1 )
|
||||
{
|
||||
$data['priority'] = $priority;
|
||||
$entries[] = $data;
|
||||
}
|
||||
|
||||
$entries[] = $data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user