Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

@@ -13,6 +13,7 @@ namespace IPS\calendar\extensions\core\EditorLocations;
/* To prevent PHP errors (extending class does not exist) revealing path */
use Exception;
use IPS\calendar\Event;
use IPS\calendar\Event\Comment;
use IPS\calendar\Event\Review;
@@ -117,20 +118,25 @@ class Calendar extends EditorLocationsAbstract
*/
public function attachmentLookup( ?int $id1=null, ?int $id2=null, ?string $id3=null ): Model|Content|Url|Member|null
{
if ( $id2 )
try
{
if ( $id3 === 'review' )
if( $id2 )
{
return Review::load( $id2 );
}
else
if( $id3 === 'review' )
{
return Review::load( $id2 );
}else
{
return Comment::load( $id2 );
}
}else
{
return Comment::load( $id2 );
return Event::load( $id1 );
}
}
else
catch( Exception $e )
{
return Event::load( $id1 );
throw new LogicException;
}
}
}