Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -30,17 +30,21 @@ class _Records
|
||||
public $classes = array();
|
||||
|
||||
/**
|
||||
* Define classes here
|
||||
* Constructor
|
||||
*
|
||||
* @return array
|
||||
* @param \IPS\Member|NULL $member If checking access, the member to check for, or NULL to not check access
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
public function __construct( \IPS\Member $member = NULL )
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach ( \IPS\Db::i()->select( 'database_id', 'cms_databases', 'database_page_id>0' ) as $id )
|
||||
{
|
||||
$this->classes[] = 'IPS\cms\Records' . $id;
|
||||
if ( !$member or call_user_func( array( 'IPS\cms\Databases', 'load' ), $id )->can( 'view', $member ) )
|
||||
{
|
||||
$this->classes[] = 'IPS\cms\Records' . $id;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( \Exception $e ) {} // If you have not upgraded pages but it is installed, this throws an error
|
||||
|
||||
Reference in new issue
Block a user