Version 5.0.0 beta 2

This commit is contained in:
Neo committed 2025-12-19 16:39:01 -08:00
1 parent 15c7beabc5
commit f61b0da85d
181 files changed
+3182 -1533

No files matched your search

+10 -5
View File
@@ -2313,7 +2313,12 @@ abstract class Model extends ActiveRecord
{
if( static::$_allPermissions === null )
{
static::$_allPermissions = iterator_to_array(
static::$_allPermissions = [];
}
if( !isset( static::$_allPermissions[ get_called_class() ] ) )
{
static::$_allPermissions[ get_called_class() ] = iterator_to_array(
Db::i()->select( array( 'perm_type_id', 'perm_id', 'perm_view', 'perm_2', 'perm_3', 'perm_4', 'perm_5', 'perm_6', 'perm_7' ), 'core_permission_index', array( "app=? AND perm_type=?", static::$permApp, static::$permType ) )
->setKeyField( 'perm_type_id' )
);
@@ -2331,11 +2336,11 @@ abstract class Model extends ActiveRecord
{
if ( $this->_permissions === NULL )
{
if( !isset( static::permissionStore()[ $this->_id ] ) )
if( !isset( static::permissionStore()[ get_called_class() ][ $this->_id ] ) )
{
try
{
static::$_allPermissions[ $this->_id ] = Db::i()->select( array( 'perm_type_id', 'perm_id', 'perm_view', 'perm_2', 'perm_3', 'perm_4', 'perm_5', 'perm_6', 'perm_7' ), 'core_permission_index', array( "app=? AND perm_type=? and perm_type_id=?", static::$permApp, static::$permType, $this->_id ) )->first();
static::$_allPermissions[ get_called_class() ][ $this->_id ] = Db::i()->select( array( 'perm_type_id', 'perm_id', 'perm_view', 'perm_2', 'perm_3', 'perm_4', 'perm_5', 'perm_6', 'perm_7' ), 'core_permission_index', array( "app=? AND perm_type=? and perm_type_id=?", static::$permApp, static::$permType, $this->_id ) )->first();
}
catch( UnderflowException )
{
@@ -2346,11 +2351,11 @@ abstract class Model extends ActiveRecord
'perm_view' => ''
) );
static::$_allPermissions[ $this->_id ] = array( 'perm_id' => $permId, 'perm_view' => '', 'perm_2' => NULL, 'perm_3' => NULL, 'perm_4' => NULL, 'perm_5' => NULL, 'perm_6' => NULL, 'perm_7' => NULL );
static::$_allPermissions[ get_called_class() ][ $this->_id ] = array( 'perm_id' => $permId, 'perm_view' => '', 'perm_2' => NULL, 'perm_3' => NULL, 'perm_4' => NULL, 'perm_5' => NULL, 'perm_6' => NULL, 'perm_7' => NULL );
}
}
$this->_permissions = static::permissionStore()[ $this->_id ];
$this->_permissions = static::permissionStore()[ get_called_class() ][ $this->_id ];
}
return $this->_permissions;