Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -159,9 +159,9 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
protected static $loadedCatsFromPath = array();
|
||||
|
||||
/**
|
||||
* @brief [Records] Database object
|
||||
* @brief [Records] Database objects
|
||||
*/
|
||||
protected static $database = NULL;
|
||||
protected static $database = array();
|
||||
|
||||
/**
|
||||
* @brief Latest posted record
|
||||
@@ -223,12 +223,12 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
*/
|
||||
public static function database()
|
||||
{
|
||||
if ( static::$database === NULL )
|
||||
if ( !isset( static::$database[ static::$customDatabaseId ] ) )
|
||||
{
|
||||
static::$database = \IPS\cms\Databases::load( static::$customDatabaseId );
|
||||
static::$database[ static::$customDatabaseId ] = \IPS\cms\Databases::load( static::$customDatabaseId );
|
||||
}
|
||||
|
||||
return static::$database;
|
||||
return static::$database[ static::$customDatabaseId ];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -793,6 +793,20 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
return parent::canDelete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Changed Columns
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
if ( !$this->_new AND isset( $this->changed['can_view_others'] ) )
|
||||
{
|
||||
$this->updateSearchIndexPermissions();
|
||||
}
|
||||
parent::save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete
|
||||
*
|
||||
@@ -1002,13 +1016,13 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
/**
|
||||
* Get URL
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
* @return \IPS\Http\Url|NULL
|
||||
*/
|
||||
public function url()
|
||||
{
|
||||
if( $this->_url === NULL )
|
||||
{
|
||||
if ( \IPS\cms\Pages\Page::$currentPage and static::database()->page_id == \IPS\cms\Pages\Page::$currentPage->id )
|
||||
if ( \IPS\cms\Pages\Page::$currentPage and \IPS\cms\Databases::load( $this->database_id )->page_id == \IPS\cms\Pages\Page::$currentPage->id )
|
||||
{
|
||||
$pagePath = \IPS\cms\Pages\Page::$currentPage->full_path;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user