Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

+7 -15
View File
@@ -415,7 +415,7 @@ class _App extends \IPS\Patterns\ActiveRecord
{
$table = 'convert_link';
if ( \in_array( $type, array( 'core_message_topics', 'core_message_posts', 'core_message_topic_user_map', 'forums_topics', 'forums_posts' ) ) AND $mainTable === FALSE )
if ( \in_array( $type, [ 'core_message_topics', 'core_message_posts', 'core_message_topic_user_map', 'forums_topics', 'forums_posts', 'forums_topics_old', 'forums_posts_old' ] ) AND $mainTable === FALSE )
{
if ( \in_array( $type, array( 'core_message_topics', 'core_message_posts', 'core_message_topic_user_map' ) ) )
{
@@ -423,7 +423,7 @@ class _App extends \IPS\Patterns\ActiveRecord
}
else
{
$tableType = str_replace( 'forums_', '', $type );
$tableType = str_replace( [ 'forums_', '_old' ], '', $type );
$table = "convert_link_{$tableType}";
}
}
@@ -558,24 +558,16 @@ class _App extends \IPS\Patterns\ActiveRecord
* @param string $type The type of item
* @return void
*/
public function deleteLink( $foreignId, $type )
public function deleteLink( $foreignId, string $type )
{
/* Build cache key */
if ( !\is_array( $type ) )
{
$type = array( $type );
}
$key = \count( $type ) > 1 ? md5( implode('', $type ) ) : $type[0];
$table = $this->_getLinkTableName( $type );
\IPS\Db::i()->delete( $table, array( 'foreign_id=? AND type=? AND app=?', $foreignId, $type, $this->app_id ) );
/* Remove this from the link cache */
if( isset( $this->linkCache[ $key ][ $foreignId ] ) )
if( isset( $this->linkCache[ $type ][ $foreignId ] ) )
{
unset( $this->linkCache[ $key ][ $foreignId ] );
unset( $this->linkCache[ $type ][ $foreignId ] );
}
}
@@ -827,7 +819,7 @@ class _App extends \IPS\Patterns\ActiveRecord
if ( $mainTable === FALSE )
{
if ( \in_array( $type, array( 'core_message_topics', 'core_message_posts', 'core_message_topic_user_map', 'forums_topics', 'forums_posts' ) ) )
if ( \in_array( $type, array( 'core_message_topics', 'core_message_posts', 'core_message_topic_user_map', 'forums_topics', 'forums_posts', 'forums_topics_old', 'forums_posts_old' ) ) )
{
if ( \in_array( $type, array( 'core_message_topics', 'core_message_posts', 'core_message_topic_user_map' ) ) )
{
@@ -835,7 +827,7 @@ class _App extends \IPS\Patterns\ActiveRecord
}
else
{
$tableType = str_replace( 'forums_', '', $type );
$tableType = str_replace( [ 'forums_', '_old' ], '', $type );
$table = "convert_link_{$tableType}";
}
}