forked from Cavemanon/cavepaintings
drop php7.3 support, make use of 7.4 features
This commit is contained in:
@@ -4,13 +4,13 @@ class RandomImageInfo extends ExtensionInfo
|
||||
{
|
||||
public const KEY = "random_image";
|
||||
|
||||
public $key = self::KEY;
|
||||
public $name = "Random Post";
|
||||
public $url = self::SHIMMIE_URL;
|
||||
public $authors = self::SHISH_AUTHOR;
|
||||
public $license = self::LICENSE_GPLV2;
|
||||
public $description = "Do things with a random post";
|
||||
public $documentation =
|
||||
public string $key = self::KEY;
|
||||
public string $name = "Random Post";
|
||||
public string $url = self::SHIMMIE_URL;
|
||||
public array $authors = self::SHISH_AUTHOR;
|
||||
public string $license = self::LICENSE_GPLV2;
|
||||
public string $description = "Do things with a random post";
|
||||
public ?string $documentation =
|
||||
"<b>Viewing a random post</b>
|
||||
<br>Visit <code>/random_image/view</code>
|
||||
<p><b>Downloading a random post</b>
|
||||
|
@@ -3,7 +3,7 @@
|
||||
class RandomImage extends Extension
|
||||
{
|
||||
/** @var RandomImageTheme */
|
||||
protected $theme;
|
||||
protected ?Themelet $theme;
|
||||
|
||||
public function onPageRequest(PageRequestEvent $event)
|
||||
{
|
||||
@@ -28,9 +28,7 @@ class RandomImage extends Extension
|
||||
}
|
||||
|
||||
if ($action === "download") {
|
||||
if (!is_null($image)) {
|
||||
send_event(new ImageDownloadingEvent($image, $image->get_image_filename(), $image->get_mime()));
|
||||
}
|
||||
send_event(new ImageDownloadingEvent($image, $image->get_image_filename(), $image->get_mime()));
|
||||
} elseif ($action === "view") {
|
||||
send_event(new DisplayingImageEvent($image));
|
||||
} elseif ($action === "widget") {
|
||||
|
Reference in New Issue
Block a user