diff --git a/core/extension.php b/core/extension.php index 7ef28fb2..c5b7edec 100644 --- a/core/extension.php +++ b/core/extension.php @@ -19,7 +19,7 @@ namespace Shimmie2; abstract class Extension { public string $key; - protected ?Themelet $theme; + protected Themelet $theme; public ExtensionInfo $info; private static array $enabled_extensions = []; @@ -35,7 +35,7 @@ abstract class Extension /** * Find the theme object for a given extension. */ - private function get_theme_object(string $base): ?Themelet + private function get_theme_object(string $base): Themelet { $base = str_replace("Shimmie2\\", "", $base); $custom = "Shimmie2\Custom{$base}Theme"; @@ -46,7 +46,7 @@ abstract class Extension } elseif (class_exists($normal)) { return new $normal(); } else { - return null; + return new Themelet(); } } diff --git a/ext/admin/main.php b/ext/admin/main.php index 1269fcd8..43783a83 100644 --- a/ext/admin/main.php +++ b/ext/admin/main.php @@ -33,7 +33,7 @@ class AdminActionEvent extends Event class AdminPage extends Extension { /** @var AdminPageTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/alias_editor/main.php b/ext/alias_editor/main.php index 9232b8c0..c62286bf 100644 --- a/ext/alias_editor/main.php +++ b/ext/alias_editor/main.php @@ -59,7 +59,7 @@ class AddAliasException extends SCoreException class AliasEditor extends Extension { /** @var AliasEditorTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/approval/main.php b/ext/approval/main.php index e27d0db7..6f2b15ed 100644 --- a/ext/approval/main.php +++ b/ext/approval/main.php @@ -14,7 +14,7 @@ abstract class ApprovalConfig class Approval extends Extension { /** @var ApprovalTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onInitExt(InitExtEvent $event) { diff --git a/ext/artists/main.php b/ext/artists/main.php index 88c7e7b3..929eb7f6 100644 --- a/ext/artists/main.php +++ b/ext/artists/main.php @@ -22,7 +22,7 @@ class AuthorSetEvent extends Event class Artists extends Extension { /** @var ArtistsTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onImageInfoSet(ImageInfoSetEvent $event) { diff --git a/ext/auto_tagger/main.php b/ext/auto_tagger/main.php index 370cdac5..d67c3cf3 100644 --- a/ext/auto_tagger/main.php +++ b/ext/auto_tagger/main.php @@ -65,7 +65,7 @@ class AddAutoTagException extends SCoreException class AutoTagger extends Extension { /** @var AutoTaggerTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/autocomplete/main.php b/ext/autocomplete/main.php index 006dddf0..35b379c8 100644 --- a/ext/autocomplete/main.php +++ b/ext/autocomplete/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class AutoComplete extends Extension { /** @var AutoCompleteTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function get_priority(): int { diff --git a/ext/biography/main.php b/ext/biography/main.php index 1c9816df..fac41f5f 100644 --- a/ext/biography/main.php +++ b/ext/biography/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class Biography extends Extension { /** @var BiographyTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onUserPageBuilding(UserPageBuildingEvent $event) { diff --git a/ext/blocks/main.php b/ext/blocks/main.php index 9d04f8c2..e864b311 100644 --- a/ext/blocks/main.php +++ b/ext/blocks/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class Blocks extends Extension { /** @var BlocksTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onDatabaseUpgrade(DatabaseUpgradeEvent $event) { diff --git a/ext/blotter/main.php b/ext/blotter/main.php index c62eb92a..7c7d5451 100644 --- a/ext/blotter/main.php +++ b/ext/blotter/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class Blotter extends Extension { /** @var BlotterTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onInitExt(InitExtEvent $event) { diff --git a/ext/bulk_actions/main.php b/ext/bulk_actions/main.php index 4b45a08e..1bfc081c 100644 --- a/ext/bulk_actions/main.php +++ b/ext/bulk_actions/main.php @@ -55,7 +55,7 @@ class BulkActionEvent extends Event class BulkActions extends Extension { /** @var BulkActionsTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPostListBuilding(PostListBuildingEvent $event) { diff --git a/ext/bulk_add/main.php b/ext/bulk_add/main.php index 54946f7b..83d84d9c 100644 --- a/ext/bulk_add/main.php +++ b/ext/bulk_add/main.php @@ -20,7 +20,7 @@ class BulkAddEvent extends Event class BulkAdd extends Extension { /** @var BulkAddTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/bulk_add_csv/main.php b/ext/bulk_add_csv/main.php index 93089737..868ae5ac 100644 --- a/ext/bulk_add_csv/main.php +++ b/ext/bulk_add_csv/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class BulkAddCSV extends Extension { /** @var BulkAddCSVTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/comment/main.php b/ext/comment/main.php index bf588318..113161fb 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -114,7 +114,7 @@ class Comment class CommentList extends Extension { /** @var CommentListTheme $theme */ - public ?Themelet $theme; + public Themelet $theme; public function onInitExt(InitExtEvent $event) { diff --git a/ext/cron_uploader/main.php b/ext/cron_uploader/main.php index e548fc85..8690ce48 100644 --- a/ext/cron_uploader/main.php +++ b/ext/cron_uploader/main.php @@ -9,7 +9,7 @@ require_once "config.php"; class CronUploader extends Extension { /** @var CronUploaderTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public const NAME = "cron_uploader"; diff --git a/ext/downtime/main.php b/ext/downtime/main.php index dec32985..28d6aeef 100644 --- a/ext/downtime/main.php +++ b/ext/downtime/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class Downtime extends Extension { /** @var DowntimeTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function get_priority(): int { diff --git a/ext/emoticons_list/main.php b/ext/emoticons_list/main.php index 12d660a4..07bd6f80 100644 --- a/ext/emoticons_list/main.php +++ b/ext/emoticons_list/main.php @@ -10,7 +10,7 @@ namespace Shimmie2; class EmoticonList extends Extension { /** @var EmoticonListTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/et/main.php b/ext/et/main.php index 00d74a4e..0d919f92 100644 --- a/ext/et/main.php +++ b/ext/et/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class ET extends Extension { /** @var ETTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/ext_manager/main.php b/ext/ext_manager/main.php index 2fa7d5db..0eeee676 100644 --- a/ext/ext_manager/main.php +++ b/ext/ext_manager/main.php @@ -37,7 +37,7 @@ class ExtensionAuthor class ExtManager extends Extension { /** @var ExtManagerTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/favorites/main.php b/ext/favorites/main.php index 8a6e72f9..eb94d62c 100644 --- a/ext/favorites/main.php +++ b/ext/favorites/main.php @@ -25,7 +25,7 @@ class FavoriteSetEvent extends Event class Favorites extends Extension { /** @var FavoritesTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onImageAdminBlockBuilding(ImageAdminBlockBuildingEvent $event) { diff --git a/ext/featured/main.php b/ext/featured/main.php index c0c221c7..11cba6ec 100644 --- a/ext/featured/main.php +++ b/ext/featured/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class Featured extends Extension { /** @var FeaturedTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onInitExt(InitExtEvent $event) { diff --git a/ext/forum/main.php b/ext/forum/main.php index 443af4ac..f7b70b5a 100644 --- a/ext/forum/main.php +++ b/ext/forum/main.php @@ -15,7 +15,7 @@ Todo: class Forum extends Extension { /** @var ForumTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onDatabaseUpgrade(DatabaseUpgradeEvent $event) { diff --git a/ext/handle_svg/main.php b/ext/handle_svg/main.php index e4b214a4..be79cbb6 100644 --- a/ext/handle_svg/main.php +++ b/ext/handle_svg/main.php @@ -11,7 +11,7 @@ class SVGFileHandler extends DataHandlerExtension protected array $SUPPORTED_MIME = [MimeType::SVG]; /** @var SVGFileHandlerTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/help_pages/main.php b/ext/help_pages/main.php index 2a208c46..6c35390a 100644 --- a/ext/help_pages/main.php +++ b/ext/help_pages/main.php @@ -37,7 +37,7 @@ class HelpPageBuildingEvent extends Event class HelpPages extends Extension { /** @var HelpPagesTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public const SEARCH = "search"; private ?array $pages = null; diff --git a/ext/holiday/main.php b/ext/holiday/main.php index 8dd450c2..4386fe5c 100644 --- a/ext/holiday/main.php +++ b/ext/holiday/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class Holiday extends Extension { /** @var HolidayTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onInitExt(InitExtEvent $event) { diff --git a/ext/home/main.php b/ext/home/main.php index e828e281..77bfb24e 100644 --- a/ext/home/main.php +++ b/ext/home/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class Home extends Extension { /** @var HomeTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/image/main.php b/ext/image/main.php index 3871799e..94effd32 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -12,7 +12,7 @@ require_once "config.php"; class ImageIO extends Extension { /** @var ImageIOTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public const COLLISION_OPTIONS = [ 'Error'=>ImageConfig::COLLISION_ERROR, diff --git a/ext/image_hash_ban/main.php b/ext/image_hash_ban/main.php index 2b3d302d..c50604cf 100644 --- a/ext/image_hash_ban/main.php +++ b/ext/image_hash_ban/main.php @@ -60,7 +60,7 @@ class AddImageHashBanEvent extends Event class ImageBan extends Extension { /** @var ImageBanTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onDatabaseUpgrade(DatabaseUpgradeEvent $event) { diff --git a/ext/image_view_counter/main.php b/ext/image_view_counter/main.php index 41e8c200..4b79d50e 100644 --- a/ext/image_view_counter/main.php +++ b/ext/image_view_counter/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class ImageViewCounter extends Extension { /** @var ImageViewCounterTheme */ - protected ?Themelet $theme; + protected Themelet $theme; private int $view_interval = 3600; # allows views to be added each hour # Add Setup Block with options for view counter diff --git a/ext/index/main.php b/ext/index/main.php index 917a921e..ae9800b3 100644 --- a/ext/index/main.php +++ b/ext/index/main.php @@ -10,7 +10,7 @@ require_once "events.php"; class Index extends Extension { /** @var IndexTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onInitExt(InitExtEvent $event) { diff --git a/ext/ipban/main.php b/ext/ipban/main.php index e8c6c33b..ce97c6af 100644 --- a/ext/ipban/main.php +++ b/ext/ipban/main.php @@ -81,7 +81,7 @@ class AddIPBanEvent extends Event class IPBan extends Extension { /** @var IPBanTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function get_priority(): int { diff --git a/ext/link_image/main.php b/ext/link_image/main.php index 315ed858..cb56b787 100644 --- a/ext/link_image/main.php +++ b/ext/link_image/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class LinkImage extends Extension { /** @var LinkImageTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onDisplayingImage(DisplayingImageEvent $event) { diff --git a/ext/log_db/main.php b/ext/log_db/main.php index e7848631..d827ee75 100644 --- a/ext/log_db/main.php +++ b/ext/log_db/main.php @@ -222,7 +222,7 @@ class LogTable extends Table class LogDatabase extends Extension { /** @var LogDatabaseTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onInitExt(InitExtEvent $event) { diff --git a/ext/media/main.php b/ext/media/main.php index bd6bf019..96e2be55 100644 --- a/ext/media/main.php +++ b/ext/media/main.php @@ -19,7 +19,7 @@ class MediaException extends SCoreException class Media extends Extension { /** @var MediaTheme */ - protected ?Themelet $theme; + protected Themelet $theme; private const LOSSLESS_FORMATS = [ MimeType::WEBP_LOSSLESS, diff --git a/ext/mime/main.php b/ext/mime/main.php index 1e1380fe..d5fe4402 100644 --- a/ext/mime/main.php +++ b/ext/mime/main.php @@ -11,7 +11,7 @@ require_once "mime_type.php"; class MimeSystem extends Extension { /** @var MimeSystemTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public const VERSION = "ext_mime_version"; diff --git a/ext/not_a_tag/main.php b/ext/not_a_tag/main.php index 167cff8d..74cb064e 100644 --- a/ext/not_a_tag/main.php +++ b/ext/not_a_tag/main.php @@ -33,7 +33,7 @@ class NotATagTable extends Table class NotATag extends Extension { /** @var NotATagTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function get_priority(): int { diff --git a/ext/notes/main.php b/ext/notes/main.php index 67df6f02..2b1c7b8c 100644 --- a/ext/notes/main.php +++ b/ext/notes/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class Notes extends Extension { /** @var NotesTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onDatabaseUpgrade(DatabaseUpgradeEvent $event) { diff --git a/ext/numeric_score/main.php b/ext/numeric_score/main.php index 0fff5e68..fbdc4e3e 100644 --- a/ext/numeric_score/main.php +++ b/ext/numeric_score/main.php @@ -102,7 +102,7 @@ class NumericScoreSetEvent extends Event class NumericScore extends Extension { /** @var NumericScoreTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onDisplayingImage(DisplayingImageEvent $event) { diff --git a/ext/pm/main.php b/ext/pm/main.php index 6d022eb3..2d363aeb 100644 --- a/ext/pm/main.php +++ b/ext/pm/main.php @@ -139,7 +139,7 @@ class PM class PrivMsg extends Extension { /** @var PrivMsgTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onDatabaseUpgrade(DatabaseUpgradeEvent $event) { diff --git a/ext/pools/main.php b/ext/pools/main.php index a8c49110..2c64b635 100644 --- a/ext/pools/main.php +++ b/ext/pools/main.php @@ -108,7 +108,7 @@ function _image_to_id(Image $image): int class Pools extends Extension { /** @var PoolsTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onInitExt(InitExtEvent $event) { diff --git a/ext/post_titles/main.php b/ext/post_titles/main.php index 0088964f..ff3ef241 100644 --- a/ext/post_titles/main.php +++ b/ext/post_titles/main.php @@ -10,7 +10,7 @@ require_once "events/post_title_set_event.php"; class PostTitles extends Extension { /** @var PostTitlesTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function get_priority(): int { diff --git a/ext/private_image/main.php b/ext/private_image/main.php index 03f02c00..88f06d35 100644 --- a/ext/private_image/main.php +++ b/ext/private_image/main.php @@ -14,7 +14,7 @@ abstract class PrivateImageConfig class PrivateImage extends Extension { /** @var PrivateImageTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onInitExt(InitExtEvent $event) { diff --git a/ext/qr_code/main.php b/ext/qr_code/main.php index 405d1cfb..22468c8c 100644 --- a/ext/qr_code/main.php +++ b/ext/qr_code/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class QRImage extends Extension { /** @var QRImageTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onDisplayingImage(DisplayingImageEvent $event) { diff --git a/ext/random_image/main.php b/ext/random_image/main.php index d835e926..2733708c 100644 --- a/ext/random_image/main.php +++ b/ext/random_image/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class RandomImage extends Extension { /** @var RandomImageTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/random_list/main.php b/ext/random_list/main.php index 83584801..18b077d1 100644 --- a/ext/random_list/main.php +++ b/ext/random_list/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class RandomList extends Extension { /** @var RandomListTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/rating/main.php b/ext/rating/main.php index bd2644a4..a5e0bd04 100644 --- a/ext/rating/main.php +++ b/ext/rating/main.php @@ -73,7 +73,7 @@ abstract class RatingsConfig class Ratings extends Extension { /** @var RatingsTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public const UNRATED_KEYWORDS = ["unknown", "unrated"]; diff --git a/ext/regen_thumb/main.php b/ext/regen_thumb/main.php index c07c9908..b66389ee 100644 --- a/ext/regen_thumb/main.php +++ b/ext/regen_thumb/main.php @@ -7,7 +7,7 @@ namespace Shimmie2; class RegenThumb extends Extension { /** @var RegenThumbTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function regenerate_thumbnail(Image $image, bool $force = true): bool { diff --git a/ext/relationships/main.php b/ext/relationships/main.php index f1bc7db1..e6684cb8 100644 --- a/ext/relationships/main.php +++ b/ext/relationships/main.php @@ -21,7 +21,7 @@ class ImageRelationshipSetEvent extends Event class Relationships extends Extension { /** @var RelationshipsTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public const NAME = "Relationships"; diff --git a/ext/report_image/main.php b/ext/report_image/main.php index 8a30f8a2..01f83c3e 100644 --- a/ext/report_image/main.php +++ b/ext/report_image/main.php @@ -43,7 +43,7 @@ class ImageReport class ReportImage extends Extension { /** @var ReportImageTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public function onPageRequest(PageRequestEvent $event) { diff --git a/ext/resize/main.php b/ext/resize/main.php index 96ca6ec3..543c2437 100644 --- a/ext/resize/main.php +++ b/ext/resize/main.php @@ -20,7 +20,7 @@ abstract class ResizeConfig class ResizeImage extends Extension { /** @var ResizeImageTheme */ - protected ?Themelet $theme; + protected Themelet $theme; /** * Needs to be after the data processing extensions diff --git a/ext/rotate/main.php b/ext/rotate/main.php index 030a2ac2..f8dcfa45 100644 --- a/ext/rotate/main.php +++ b/ext/rotate/main.php @@ -19,7 +19,7 @@ class ImageRotateException extends SCoreException class RotateImage extends Extension { /** @var RotateImageTheme */ - protected ?Themelet $theme; + protected Themelet $theme; public const SUPPORTED_MIME = [MimeType::JPEG, MimeType::PNG, MimeType::GIF, MimeType::WEBP]; diff --git a/ext/rss_images/theme.php b/ext/rss_images/theme.php deleted file mode 100644 index 2affd486..00000000 --- a/ext/rss_images/theme.php +++ /dev/null @@ -1,10 +0,0 @@ -