Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -14,6 +14,7 @@ namespace IPS\gallery\Album;
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use BadMethodCallException;
|
||||
use InvalidArgumentException;
|
||||
use IPS\Content\ContentMenuLink;
|
||||
use IPS\Content\Embeddable;
|
||||
use IPS\Content\Filter;
|
||||
@@ -38,12 +39,14 @@ use IPS\gallery\Category;
|
||||
use IPS\gallery\Image;
|
||||
use IPS\Helpers\Badge;
|
||||
use IPS\Helpers\Menu;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
use IPS\Node\Model;
|
||||
use IPS\Output;
|
||||
use IPS\Patterns\ActiveRecordIterator;
|
||||
use IPS\Settings;
|
||||
use IPS\Theme;
|
||||
use OutOfRangeException;
|
||||
use function array_slice;
|
||||
use function count;
|
||||
use function defined;
|
||||
@@ -612,6 +615,28 @@ Filter
|
||||
return 'album_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Load record based on a URL
|
||||
*
|
||||
* @param Url $url URL to load from
|
||||
* @return mixed
|
||||
* @throws InvalidArgumentException
|
||||
* @throws OutOfRangeException
|
||||
*/
|
||||
public static function loadFromUrl( Url $url ): mixed
|
||||
{
|
||||
if ( isset( $url->queryString['album'] ) )
|
||||
{
|
||||
return static::load( $url->queryString['album'] );
|
||||
}
|
||||
if ( isset( $url->hiddenQueryString['album'] ) )
|
||||
{
|
||||
return static::load( $url->hiddenQueryString['album'] );
|
||||
}
|
||||
|
||||
return parent::loadFromUrl( $url );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content for embed
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user