From 7afca150a503f3aae02f500afd571521f22fe171 Mon Sep 17 00:00:00 2001 From: satopian Date: Mon, 16 Dec 2024 23:03:54 +0900 Subject: [PATCH] sns_share.inc.php --- potiboard5/sns_share.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/potiboard5/sns_share.inc.php b/potiboard5/sns_share.inc.php index d511f172..2550b68b 100644 --- a/potiboard5/sns_share.inc.php +++ b/potiboard5/sns_share.inc.php @@ -61,13 +61,13 @@ public static function post_share_server(){ // $share_url="https://x.com/intent/post?text="; $share_url="https://twitter.com/intent/tweet?text="; } - if($sns_server_radio === "https://bsky.app"||!$sns_server_radio && ($sns_server_direct_input === "https://bsky.app")){ + if(in_array("https://bsky.app",[$sns_server_radio,$sns_server_direct_input])){ $share_url="https://bsky.app/intent/compose?text="; } - if($sns_server_radio === "https://www.threads.net"||!$sns_server_radio && ($sns_server_direct_input === "https://www.threads.net")){ + if(in_array("https://www.threads.net",[$sns_server_radio,$sns_server_direct_input])){ $share_url="https://www.threads.net/intent/post?text="; } - $share_url.=$encoded_t.'%20'.$encoded_u; + $share_url.=$encoded_t.'%20'.$encoded_u; $share_url = filter_var($share_url, FILTER_VALIDATE_URL) ? $share_url : ''; if(!$share_url){ error($en ? "Please select an SNS sharing destination.":"SNSの共有先を選択してください。");