From 48c3eae6b9c6f9b791421c247627551dbce2ca9d Mon Sep 17 00:00:00 2001 From: NottyNoz Date: Thu, 16 Mar 2023 22:29:45 -0400 Subject: [PATCH] fixes --- ext/private_image/main.php | 6 +++--- ext/private_image/theme.php | 2 +- ext/qr_code/info.php | 2 +- ext/static_files/static/README.txt | 2 +- themes/rule34v2/{ => static}/favicon.ico | Bin 5 files changed, 6 insertions(+), 6 deletions(-) rename themes/rule34v2/{ => static}/favicon.ico (100%) diff --git a/ext/private_image/main.php b/ext/private_image/main.php index 0e8034c1..a0768dd2 100644 --- a/ext/private_image/main.php +++ b/ext/private_image/main.php @@ -76,7 +76,7 @@ class PrivateImage extends Extension throw new SCoreException("Post not found."); } if ($image->owner_id!=$user->can(Permissions::SET_OTHERS_PRIVATE_IMAGES)) { - throw new SCoreException("Cannot set another user's image to private."); + throw new SCoreException("Cannot set another user's image to public."); } self::publicize_image($image_id); @@ -114,7 +114,7 @@ class PrivateImage extends Extension { global $user, $page; - if ($event->image->private===true && $event->image->owner_id!=$user->id && !$user->can(Permissions::SET_OTHERS_PRIVATE_IMAGES)) { + if ($event->image->private==true && $event->image->owner_id!=$user->id && !$user->can(Permissions::SET_OTHERS_PRIVATE_IMAGES)) { $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("post/list")); } @@ -221,7 +221,7 @@ class PrivateImage extends Extension public function onImageAdminBlockBuilding(ImageAdminBlockBuildingEvent $event) { global $user; - if ($user->can(Permissions::SET_PRIVATE_IMAGE) && $user->id==$event->image->owner_id) { + if (($user->can(Permissions::SET_PRIVATE_IMAGE) && $user->id==$event->image->owner_id) || $user->can(Permissions::SET_OTHERS_PRIVATE_IMAGES)) { $event->add_part($this->theme->get_image_admin_html($event->image)); } } diff --git a/ext/private_image/theme.php b/ext/private_image/theme.php index a06a2239..9f63c7d2 100644 --- a/ext/private_image/theme.php +++ b/ext/private_image/theme.php @@ -10,7 +10,7 @@ class PrivateImageTheme extends Themelet { public function get_image_admin_html(Image $image): string { - if ($image->private===false) { + if ($image->private==false) { $html = SHM_SIMPLE_FORM( 'privatize_image/'.$image->id, INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image->id]), diff --git a/ext/qr_code/info.php b/ext/qr_code/info.php index e8e6098c..8e9d5fd5 100644 --- a/ext/qr_code/info.php +++ b/ext/qr_code/info.php @@ -13,7 +13,7 @@ class QRImageInfo extends ExtensionInfo public string $url = "http://seemslegit.com"; public array $authors = ["Zach Hall"=>"zach@sosguy.net"]; public string $license = self::LICENSE_GPLV2; - public string $description = "Turns BBCode into HTML"; + public string $description = "Shows a QR Code for downloading a post to cell phones"; public ?string $documentation = "Shows a QR Code for downloading a post to cell phones. Based on Artanis's Link to Post Extension diff --git a/ext/static_files/static/README.txt b/ext/static_files/static/README.txt index fa7c2e9e..e9d67c48 100644 --- a/ext/static_files/static/README.txt +++ b/ext/static_files/static/README.txt @@ -1,4 +1,4 @@ These files can be overriden by placing files in themes/$your_theme/filename.foo. For example if you want your theme "radiance" to have a custom -favicon, place it in themes/radiance/favicon.ico +favicon, place it in themes/radiance/static/favicon.ico diff --git a/themes/rule34v2/favicon.ico b/themes/rule34v2/static/favicon.ico similarity index 100% rename from themes/rule34v2/favicon.ico rename to themes/rule34v2/static/favicon.ico