Version 5.0.0 beta 7

This commit is contained in:
Neo committed 2025-12-19 17:18:38 -08:00
1 parent fa2a720105
commit 54d5dcd0a0
156 files changed
+4337 -2995

No files matched your search

+19
View File
@@ -19,6 +19,7 @@ use Exception;
use InvalidArgumentException;
use IPS\Application;
use IPS\Content;
use IPS\core\FrontNavigation;
use IPS\Data\Store;
use IPS\DateTime;
use IPS\Db;
@@ -654,6 +655,24 @@ class Tag extends Model
$photo->delete();
}
/* Delete any navigation items that reference this tag */
foreach( Db::i()->select( '*', 'core_menu', [ 'app=? and extension=?', 'core', 'Tags' ] ) as $row )
{
if( $row['config'] and $config = json_decode( $row['config'], true ) )
{
if( $config['id'] == $this->id )
{
Db::i()->delete( 'core_menu', [ 'id=?', $row['id'] ] );
}
}
}
try
{
unset( Store::i()->frontNavigation );
}
catch( OutOfRangeException ){}
/* Queue the background task to remove the tag from all currently tagged items */
Task::queue( 'core', 'UpdateTaggedItems', [ 'tag' => $this->text, 'delete' => true ], 5, [ 'tag' ] );
}