Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+46 -3
View File
@@ -460,6 +460,46 @@ class _App extends \IPS\Patterns\ActiveRecord
throw new \OutOfRangeException;
}
}
/**
* Delete a stored foreignId <-> IPS4 ID relation
*
* @param mixed $foreignId Foreign data ID
* @param string $type The type of item
*/
public function deleteLink( $foreignId, $type )
{
/* Build cache key */
if ( !is_array( $type ) )
{
$type = array( $type );
}
$key = md5( json_encode( $type ) );
$table = 'convert_link';
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' ) ) )
{
$table = 'convert_link_pms';
}
else
{
$tableType = str_replace( 'forums_', '', $type );
$table = "convert_link_{$tableType}";
}
}
\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 ] ) )
{
unset( $this->linkCache[ $key ][ $foreignId ] );
}
}
/**
* @brief Sibling Cache
@@ -510,10 +550,13 @@ class _App extends \IPS\Patterns\ActiveRecord
break;
}
if( $this->_data['app_key'] == 'photopost8' )
/* Change any app keys to newer versions */
switch( $this->data['app_key'] )
{
$this->app_key = 'photopost';
$this->save();
case 'photopost8':
$this->app_key = 'photopost';
$this->save();
break;
}
if ( ! class_exists( 'IPS\\convert\\Software\\' . ucwords( $this->_data['sw'] ) . '\\' . ucwords( $this->_data['app_key'] ) ) )