Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+27 -5
View File
@@ -2,9 +2,9 @@
/**
* @brief Module Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 18 Feb 2013
* @version SVN_VERSION_NUMBER
*/
@@ -42,6 +42,11 @@ class _Module extends \IPS\Node\Model implements \IPS\Node\Permissions
* @brief [ActiveRecord] Database ID Fields
*/
protected static $databaseIdFields = array( 'sys_module_key' );
/**
* @brief [ActiveRecord] Multiton Map
*/
protected static $multitonMap = array();
/**
* @brief [Node] Parent Node ID Database Column
@@ -161,8 +166,8 @@ class _Module extends \IPS\Node\Model implements \IPS\Node\Permissions
*/
public function setAsDefault()
{
\IPS\DB::i()->update( 'core_modules', array( 'sys_module_default' => 0 ), array( 'sys_module_area=? AND sys_module_application=?', $this->area, $this->application ) );
\IPS\DB::i()->update( 'core_modules', array( 'sys_module_default' => 1 ), array( 'sys_module_id=?', $this->id ) );
\IPS\Db::i()->update( 'core_modules', array( 'sys_module_default' => 0 ), array( 'sys_module_area=? AND sys_module_application=?', $this->area, $this->application ) );
\IPS\Db::i()->update( 'core_modules', array( 'sys_module_default' => 1 ), array( 'sys_module_id=?', $this->id ) );
unset( \IPS\Data\Store::i()->modules );
/* Clear guest page caches */
@@ -189,7 +194,7 @@ class _Module extends \IPS\Node\Model implements \IPS\Node\Permissions
{
try
{
$module = self::load( $matches[2], 'sys_module_key', count( $where ) ? array_merge( array( array( 'sys_module_application=?', $matches[1] ) ), array( $where ) ) : array( array( 'sys_module_application=?', $matches[1] ) ) );
$module = static::load( $matches[2], 'sys_module_key', count( $where ) ? array_merge( array( array( 'sys_module_application=?', $matches[1] ) ), array( $where ) ) : array( array( 'sys_module_application=?', $matches[1] ) ) );
$return[ $module->_id ] = $module;
}
catch ( \OutOfRangeException $e ) { }
@@ -256,6 +261,23 @@ class _Module extends \IPS\Node\Model implements \IPS\Node\Permissions
return \IPS\Member::loggedIn()->language()->addToStack( $key );
}
/**
* [Node] Get the title to store in the log
*
* @return string|null
*/
public function titleForLog()
{
try
{
return \IPS\Lang::load( \IPS\Lang::defaultLanguage() )->get( "module__{$this->application}_{$this->key}" );
}
catch ( \UnderflowException $e )
{
return $this->_title;
}
}
/**
* [Node] Get Node Icon
*