mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-04 19:14:41 +00:00
uwuzu v1.5.4 Combeny
This commit is contained in:
@@ -12,8 +12,6 @@ if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
|||||||
|
|
||||||
$domain = $_SERVER['HTTP_HOST'];
|
$domain = $_SERVER['HTTP_HOST'];
|
||||||
|
|
||||||
require('../../db.php');
|
|
||||||
|
|
||||||
// データベースに接続
|
// データベースに接続
|
||||||
try {
|
try {
|
||||||
$option = array(
|
$option = array(
|
||||||
|
|||||||
+2
-2
@@ -77,13 +77,13 @@ if(safetext($serversettings["serverinfo"]["server_activitypub"]) === "true"){
|
|||||||
"icon" => array(
|
"icon" => array(
|
||||||
"type" => "Image",
|
"type" => "Image",
|
||||||
"mediaType" => "image/".$icon_kakucho_ci."",
|
"mediaType" => "image/".$icon_kakucho_ci."",
|
||||||
"url" => "https://".$domain."/".$userData["iconname"]."",
|
"url" => localcloudURLtoAPI(localcloudURL($userData["iconname"])),
|
||||||
),
|
),
|
||||||
|
|
||||||
"image" => array(
|
"image" => array(
|
||||||
"type" => "Image",
|
"type" => "Image",
|
||||||
"mediaType" => "image/".$icon_kakucho_ci."",
|
"mediaType" => "image/".$icon_kakucho_ci."",
|
||||||
"url" => "https://".$domain."/".$userData["headname"]."",
|
"url" => localcloudURLtoAPI(localcloudURL($userData["headname"])),
|
||||||
),
|
),
|
||||||
|
|
||||||
/*"publicKey" => array(
|
/*"publicKey" => array(
|
||||||
|
|||||||
+18
-1
@@ -3,7 +3,6 @@ require('../db.php');
|
|||||||
//関数呼び出し
|
//関数呼び出し
|
||||||
//- EXIF
|
//- EXIF
|
||||||
require('../function/function.php');
|
require('../function/function.php');
|
||||||
blockedIP($_SERVER['REMOTE_ADDR']);
|
|
||||||
if(file_exists("../settings_admin/plugin_settings/amazons3_settings.php")){
|
if(file_exists("../settings_admin/plugin_settings/amazons3_settings.php")){
|
||||||
require_once '../settings_admin/plugin_settings/amazons3_settings.php';
|
require_once '../settings_admin/plugin_settings/amazons3_settings.php';
|
||||||
if(AMS3_CHKS == "true"){
|
if(AMS3_CHKS == "true"){
|
||||||
@@ -58,6 +57,24 @@ try {
|
|||||||
// 接続エラーのときエラー内容を取得する
|
// 接続エラーのときエラー内容を取得する
|
||||||
$error_message[] = $e->getMessage();
|
$error_message[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
if(empty($error_message)){
|
||||||
|
$stmt = $pdo->prepare("
|
||||||
|
SELECT COUNT(*)
|
||||||
|
FROM information_schema.tables
|
||||||
|
WHERE table_schema = :schema AND table_name = :table
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
$stmt->execute([
|
||||||
|
':schema' => DB_NAME,
|
||||||
|
':table' => "ipblock",
|
||||||
|
]);
|
||||||
|
|
||||||
|
$exists = $stmt->fetchColumn() > 0;
|
||||||
|
|
||||||
|
if ($exists) {
|
||||||
|
blockedIP($_SERVER['REMOTE_ADDR']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$aduser = "yes";
|
$aduser = "yes";
|
||||||
|
|
||||||
|
|||||||
+19
-1
@@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require('../db.php');
|
require('../db.php');
|
||||||
require("../function/function.php");
|
require("../function/function.php");
|
||||||
blockedIP($_SERVER['REMOTE_ADDR']);
|
|
||||||
|
|
||||||
$softwarefile = "../server/uwuzuinfo.txt";
|
$softwarefile = "../server/uwuzuinfo.txt";
|
||||||
$softwaredata = file_get_contents($softwarefile);
|
$softwaredata = file_get_contents($softwarefile);
|
||||||
@@ -50,6 +49,25 @@ if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
|||||||
$error_message[] = $e->getMessage();
|
$error_message[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(empty($error_message)){
|
||||||
|
$stmt = $pdo->prepare("
|
||||||
|
SELECT COUNT(*)
|
||||||
|
FROM information_schema.tables
|
||||||
|
WHERE table_schema = :schema AND table_name = :table
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
$stmt->execute([
|
||||||
|
':schema' => DB_NAME,
|
||||||
|
':table' => "ipblock",
|
||||||
|
]);
|
||||||
|
|
||||||
|
$exists = $stmt->fetchColumn() > 0;
|
||||||
|
|
||||||
|
if ($exists) {
|
||||||
|
blockedIP($_SERVER['REMOTE_ADDR']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$aduser = "yes";
|
$aduser = "yes";
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
|
|||||||
+18
-1
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
require('../db.php');
|
require('../db.php');
|
||||||
require("../function/function.php");
|
require("../function/function.php");
|
||||||
blockedIP($_SERVER['REMOTE_ADDR']);
|
|
||||||
|
|
||||||
$softwarefile = "../server/uwuzuinfo.txt";
|
$softwarefile = "../server/uwuzuinfo.txt";
|
||||||
$softwaredata = file_get_contents($softwarefile);
|
$softwaredata = file_get_contents($softwarefile);
|
||||||
@@ -50,6 +49,24 @@ if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
|||||||
// 接続エラーのときエラー内容を取得する
|
// 接続エラーのときエラー内容を取得する
|
||||||
$error_message[] = $e->getMessage();
|
$error_message[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
if(empty($error_message)){
|
||||||
|
$stmt = $pdo->prepare("
|
||||||
|
SELECT COUNT(*)
|
||||||
|
FROM information_schema.tables
|
||||||
|
WHERE table_schema = :schema AND table_name = :table
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
$stmt->execute([
|
||||||
|
':schema' => DB_NAME,
|
||||||
|
':table' => "ipblock",
|
||||||
|
]);
|
||||||
|
|
||||||
|
$exists = $stmt->fetchColumn() > 0;
|
||||||
|
|
||||||
|
if ($exists) {
|
||||||
|
blockedIP($_SERVER['REMOTE_ADDR']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$aduser = "yes";
|
$aduser = "yes";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require('../db.php');
|
require('../db.php');
|
||||||
require("../function/function.php");
|
require("../function/function.php");
|
||||||
blockedIP($_SERVER['REMOTE_ADDR']);
|
|
||||||
|
|
||||||
$softwarefile = "../server/uwuzuinfo.txt";
|
$softwarefile = "../server/uwuzuinfo.txt";
|
||||||
$softwaredata = file_get_contents($softwarefile);
|
$softwaredata = file_get_contents($softwarefile);
|
||||||
@@ -49,6 +48,24 @@ if(!(empty(DB_NAME) && empty(DB_HOST) && empty(DB_USER) && empty(DB_PASS))){
|
|||||||
// 接続エラーのときエラー内容を取得する
|
// 接続エラーのときエラー内容を取得する
|
||||||
$error_message[] = $e->getMessage();
|
$error_message[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
if(empty($error_message)){
|
||||||
|
$stmt = $pdo->prepare("
|
||||||
|
SELECT COUNT(*)
|
||||||
|
FROM information_schema.tables
|
||||||
|
WHERE table_schema = :schema AND table_name = :table
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
$stmt->execute([
|
||||||
|
':schema' => DB_NAME,
|
||||||
|
':table' => "ipblock",
|
||||||
|
]);
|
||||||
|
|
||||||
|
$exists = $stmt->fetchColumn() > 0;
|
||||||
|
|
||||||
|
if ($exists) {
|
||||||
|
blockedIP($_SERVER['REMOTE_ADDR']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$aduser = "yes";
|
$aduser = "yes";
|
||||||
|
|
||||||
|
|||||||
+19
-1
@@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
require('../db.php');
|
require('../db.php');
|
||||||
require("../function/function.php");
|
require("../function/function.php");
|
||||||
blockedIP($_SERVER['REMOTE_ADDR']);
|
|
||||||
|
|
||||||
$serversettings_file = "../server/serversettings.ini";
|
$serversettings_file = "../server/serversettings.ini";
|
||||||
$serversettings = parse_ini_file($serversettings_file, true);
|
$serversettings = parse_ini_file($serversettings_file, true);
|
||||||
@@ -40,6 +39,25 @@ try {
|
|||||||
$error_message[] = $e->getMessage();
|
$error_message[] = $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(empty($error_message)){
|
||||||
|
$stmt = $pdo->prepare("
|
||||||
|
SELECT COUNT(*)
|
||||||
|
FROM information_schema.tables
|
||||||
|
WHERE table_schema = :schema AND table_name = :table
|
||||||
|
LIMIT 1
|
||||||
|
");
|
||||||
|
$stmt->execute([
|
||||||
|
':schema' => DB_NAME,
|
||||||
|
':table' => "ipblock",
|
||||||
|
]);
|
||||||
|
|
||||||
|
$exists = $stmt->fetchColumn() > 0;
|
||||||
|
|
||||||
|
if ($exists) {
|
||||||
|
blockedIP($_SERVER['REMOTE_ADDR']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$aduser = "yes";
|
$aduser = "yes";
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
|
|||||||
+2
-2
@@ -161,8 +161,8 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
'username' => decode_yajirushi(htmlspecialchars_decode($userdata["username"])),
|
'username' => decode_yajirushi(htmlspecialchars_decode($userdata["username"])),
|
||||||
'userid' => decode_yajirushi(htmlspecialchars_decode($userdata["userid"])),
|
'userid' => decode_yajirushi(htmlspecialchars_decode($userdata["userid"])),
|
||||||
'profile' => decode_yajirushi(htmlspecialchars_decode($userdata["profile"])),
|
'profile' => decode_yajirushi(htmlspecialchars_decode($userdata["profile"])),
|
||||||
'user_icon' => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userdata["iconname"])),
|
'user_icon' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userdata["iconname"])))),
|
||||||
'user_header' => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userdata["headname"])),
|
'user_header' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userdata["headname"])))),
|
||||||
'registered_date' => decode_yajirushi(htmlspecialchars_decode($userdata["datetime"])),
|
'registered_date' => decode_yajirushi(htmlspecialchars_decode($userdata["datetime"])),
|
||||||
'followee' => $followee,
|
'followee' => $followee,
|
||||||
'followee_cnt' => $userdata["follow_cnt"],
|
'followee_cnt' => $userdata["follow_cnt"],
|
||||||
|
|||||||
+7
-7
@@ -120,8 +120,8 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
$now_userdata = array(
|
$now_userdata = array(
|
||||||
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
||||||
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
||||||
"user_icon" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['iconname'])),
|
"user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))),
|
||||||
"user_head" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['headname'])),
|
"user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,11 +136,11 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
||||||
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
||||||
'account' => $now_userdata,
|
'account' => $now_userdata,
|
||||||
'photo1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo1"]))),
|
'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))),
|
||||||
'photo2' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo2"]))),
|
'photo2' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo2"])))),
|
||||||
'photo3' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo3"]))),
|
'photo3' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo3"])))),
|
||||||
'photo4' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo4"]))),
|
'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))),
|
||||||
'video1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["video1"]))),
|
'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))),
|
||||||
'favorite' => $favorite,
|
'favorite' => $favorite,
|
||||||
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
||||||
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
||||||
|
|||||||
+7
-7
@@ -134,8 +134,8 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
$now_userdata = array(
|
$now_userdata = array(
|
||||||
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
||||||
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
||||||
"user_icon" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['iconname'])),
|
"user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))),
|
||||||
"user_head" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['headname'])),
|
"user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,11 +150,11 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
||||||
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
||||||
'account' => $now_userdata,
|
'account' => $now_userdata,
|
||||||
'photo1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo1"]))),
|
'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))),
|
||||||
'photo2' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo2"]))),
|
'photo2' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo2"])))),
|
||||||
'photo3' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo3"]))),
|
'photo3' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo3"])))),
|
||||||
'photo4' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo4"]))),
|
'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))),
|
||||||
'video1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["video1"]))),
|
'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))),
|
||||||
'favorite' => $favorite,
|
'favorite' => $favorite,
|
||||||
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
||||||
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
||||||
|
|||||||
@@ -132,8 +132,8 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
$now_userdata = array(
|
$now_userdata = array(
|
||||||
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
||||||
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
||||||
"user_icon" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['iconname'])),
|
"user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))),
|
||||||
"user_head" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['headname'])),
|
"user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,11 +148,11 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
||||||
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
||||||
'account' => $now_userdata,
|
'account' => $now_userdata,
|
||||||
'photo1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo1"]))),
|
'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))),
|
||||||
'photo2' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo2"]))),
|
'photo2' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo2"])))),
|
||||||
'photo3' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo3"]))),
|
'photo3' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo3"])))),
|
||||||
'photo4' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo4"]))),
|
'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))),
|
||||||
'video1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["video1"]))),
|
'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))),
|
||||||
'favorite' => $favorite,
|
'favorite' => $favorite,
|
||||||
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
||||||
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
||||||
|
|||||||
@@ -143,8 +143,8 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
$now_userdata = array(
|
$now_userdata = array(
|
||||||
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
||||||
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
||||||
"user_icon" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['iconname'])),
|
"user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))),
|
||||||
"user_head" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['headname'])),
|
"user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,11 +159,11 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
||||||
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
||||||
'account' => $now_userdata,
|
'account' => $now_userdata,
|
||||||
'photo1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo1"]))),
|
'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))),
|
||||||
'photo2' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo2"]))),
|
'photo2' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo2"])))),
|
||||||
'photo3' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo3"]))),
|
'photo3' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo3"])))),
|
||||||
'photo4' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo4"]))),
|
'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))),
|
||||||
'video1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["video1"]))),
|
'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))),
|
||||||
'favorite' => $favorite,
|
'favorite' => $favorite,
|
||||||
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
||||||
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
||||||
|
|||||||
@@ -146,8 +146,8 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
$now_userdata = array(
|
$now_userdata = array(
|
||||||
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
"username" => decode_yajirushi(htmlspecialchars_decode($userData['username'])),
|
||||||
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
"userid" => decode_yajirushi(htmlspecialchars_decode($userData['userid'])),
|
||||||
"user_icon" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['iconname'])),
|
"user_icon" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['iconname'])))),
|
||||||
"user_head" => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userData['headname'])),
|
"user_head" => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userData['headname'])))),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,11 +162,11 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
'replyid' => decode_yajirushi(htmlspecialchars_decode($ueusedata["rpuniqid"])),
|
||||||
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
'text' => decode_yajirushi(htmlspecialchars_decode($ueusedata["ueuse"])),
|
||||||
'account' => $now_userdata,
|
'account' => $now_userdata,
|
||||||
'photo1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo1"]))),
|
'photo1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo1"])))),
|
||||||
'photo2' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo2"]))),
|
'photo2' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo2"])))),
|
||||||
'photo3' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo3"]))),
|
'photo3' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo3"])))),
|
||||||
'photo4' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["photo4"]))),
|
'photo4' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["photo4"])))),
|
||||||
'video1' => decode_yajirushi(htmlspecialchars_decode(str_replace('../', 'https://' . $_SERVER['HTTP_HOST'] . '/', $ueusedata["video1"]))),
|
'video1' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($ueusedata["video1"])))),
|
||||||
'favorite' => $favorite,
|
'favorite' => $favorite,
|
||||||
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
'favorite_cnt' => decode_yajirushi(htmlspecialchars_decode($ueusedata["favorite_cnt"])),
|
||||||
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
'datetime' => decode_yajirushi(htmlspecialchars_decode($ueusedata["datetime"])),
|
||||||
|
|||||||
+2
-2
@@ -177,8 +177,8 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
|||||||
'username' => decode_yajirushi(htmlspecialchars_decode($userdata["username"])),
|
'username' => decode_yajirushi(htmlspecialchars_decode($userdata["username"])),
|
||||||
'userid' => decode_yajirushi(htmlspecialchars_decode($userdata["userid"])),
|
'userid' => decode_yajirushi(htmlspecialchars_decode($userdata["userid"])),
|
||||||
'profile' => decode_yajirushi(htmlspecialchars_decode($userdata["profile"])),
|
'profile' => decode_yajirushi(htmlspecialchars_decode($userdata["profile"])),
|
||||||
'user_icon' => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userdata["iconname"])),
|
'user_icon' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userdata["iconname"])))),
|
||||||
'user_header' => decode_yajirushi(htmlspecialchars_decode("https://".$domain."/".$userdata["headname"])),
|
'user_header' => decode_yajirushi(htmlspecialchars_decode(localcloudURLtoAPI(localcloudURL($userdata["headname"])))),
|
||||||
'registered_date' => decode_yajirushi(htmlspecialchars_decode($userdata["datetime"])),
|
'registered_date' => decode_yajirushi(htmlspecialchars_decode($userdata["datetime"])),
|
||||||
'followee' => $followee,
|
'followee' => $followee,
|
||||||
'followee_cnt' => $userdata["follow_cnt"],
|
'followee_cnt' => $userdata["follow_cnt"],
|
||||||
|
|||||||
+38
-11
@@ -634,7 +634,9 @@ function uploadAmazonS3($tmp_name){
|
|||||||
|
|
||||||
function deleteAmazonS3($url){
|
function deleteAmazonS3($url){
|
||||||
$key = explode("/", mb_substr(parse_url($url, PHP_URL_PATH), 1));
|
$key = explode("/", mb_substr(parse_url($url, PHP_URL_PATH), 1));
|
||||||
array_shift($key);//最初の一個を消す
|
if ($key[0] == AMS3_BUCKET_NM) {
|
||||||
|
array_shift($key);
|
||||||
|
}
|
||||||
$key = implode("/", $key);
|
$key = implode("/", $key);
|
||||||
|
|
||||||
$credentials = [
|
$credentials = [
|
||||||
@@ -1778,17 +1780,17 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
|||||||
}
|
}
|
||||||
|
|
||||||
function delete_ueuse($uniqid, $userid, $account_id){
|
function delete_ueuse($uniqid, $userid, $account_id){
|
||||||
if(file_exists("../settings_admin/plugin_settings/amazons3_settings.php")){
|
if(file_exists(__DIR__ . "/../settings_admin/plugin_settings/amazons3_settings.php")){
|
||||||
require_once '../settings_admin/plugin_settings/amazons3_settings.php';
|
require_once __DIR__ . '/../settings_admin/plugin_settings/amazons3_settings.php';
|
||||||
if(AMS3_CHKS == "true"){
|
if(AMS3_CHKS == "true"){
|
||||||
if(file_exists("../plugin/aws/aws-autoloader.php")){
|
if(file_exists(__DIR__ . "/../plugin/aws/aws-autoloader.php")){
|
||||||
require_once '../plugin/aws/aws-autoloader.php';
|
require_once __DIR__ . '/../plugin/aws/aws-autoloader.php';
|
||||||
}else{
|
}else{
|
||||||
actionLog(null, "error", "uploadAmazonS3", null, "AWS SDK for PHPが見つかりませんでした!", 4);
|
actionLog(null, "error", "delete_ueuse", null, "AWS SDK for PHPが見つかりませんでした!", 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
actionLog(null, "error", "uploadAmazonS3", null, "amazons3_settings.phpが見つかりませんでした!", 3);
|
actionLog(null, "error", "delete_ueuse", null, "amazons3_settings.phpが見つかりませんでした!", 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (safetext(isset($uniqid)) && safetext(isset($userid)) && safetext(isset($account_id))){
|
if (safetext(isset($uniqid)) && safetext(isset($userid)) && safetext(isset($account_id))){
|
||||||
@@ -2388,11 +2390,11 @@ function deleteUser($pdo, $userid, $step, $job_uniqid){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($step == "delete_account"){
|
if($step == "delete_account"){
|
||||||
if(file_exists("../settings_admin/plugin_settings/amazons3_settings.php")){
|
if(file_exists(__DIR__ . "/../settings_admin/plugin_settings/amazons3_settings.php")){
|
||||||
require_once '../settings_admin/plugin_settings/amazons3_settings.php';
|
require_once __DIR__ . '/../settings_admin/plugin_settings/amazons3_settings.php';
|
||||||
if(AMS3_CHKS == "true"){
|
if(AMS3_CHKS == "true"){
|
||||||
if(file_exists("../plugin/aws/aws-autoloader.php")){
|
if(file_exists(__DIR__ . "/../plugin/aws/aws-autoloader.php")){
|
||||||
require_once '../plugin/aws/aws-autoloader.php';
|
require_once __DIR__ . '/../plugin/aws/aws-autoloader.php';
|
||||||
}else{
|
}else{
|
||||||
actionLog(null, "error", "uploadAmazonS3", null, "AWS SDK for PHPが見つかりませんでした!", 4);
|
actionLog(null, "error", "uploadAmazonS3", null, "AWS SDK for PHPが見つかりませんでした!", 4);
|
||||||
}
|
}
|
||||||
@@ -2861,6 +2863,31 @@ function getJob($pdo, $userid){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function localcloudURL($url){
|
||||||
|
if(!($url == null || $url == "" || $url == "none")){
|
||||||
|
if(filter_var($url, FILTER_VALIDATE_URL)){
|
||||||
|
return $url;
|
||||||
|
}else{
|
||||||
|
return "../" . $url;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function localcloudURLtoAPI($text){
|
||||||
|
if(!($text == null || $text == "" || $text == "none")){
|
||||||
|
$domain = $_SERVER['HTTP_HOST'];
|
||||||
|
$address = localcloudURL($text);
|
||||||
|
if(strpos($address, '../') !== false){
|
||||||
|
$address = "https://".$domain."/".str_replace('../', '', $address);
|
||||||
|
}
|
||||||
|
return $address;
|
||||||
|
}else{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function safetext($text){
|
function safetext($text){
|
||||||
// テキストの安全化
|
// テキストの安全化
|
||||||
return htmlspecialchars(preg_replace('/[\x00-\x08\x0b\x0c\x0e-\x1f]/', '', $text), ENT_QUOTES, 'UTF-8', false);
|
return htmlspecialchars(preg_replace('/[\x00-\x08\x0b\x0c\x0e-\x1f]/', '', $text), ENT_QUOTES, 'UTF-8', false);
|
||||||
|
|||||||
+81
-13
@@ -12,8 +12,24 @@ const mentionCache = {};
|
|||||||
const fetchingMentions = false;
|
const fetchingMentions = false;
|
||||||
|
|
||||||
async function replaceMentions(text) {
|
async function replaceMentions(text) {
|
||||||
|
const placeholders = [];
|
||||||
|
let index = 0;
|
||||||
|
|
||||||
|
text = text.replace(/<a\b[^>]*>.*?<\/a>/gi, (match) => {
|
||||||
|
const placeholder = `\u2063{{PLACEHOLDER${index}}}\u2063`;
|
||||||
|
placeholders.push(match);
|
||||||
|
index++;
|
||||||
|
return placeholder;
|
||||||
|
});
|
||||||
|
|
||||||
const mentionMatches = [...text.matchAll(/@([a-zA-Z0-9_]+)/g)];
|
const mentionMatches = [...text.matchAll(/@([a-zA-Z0-9_]+)/g)];
|
||||||
if (mentionMatches.length === 0) return text;
|
if (mentionMatches.length === 0) {
|
||||||
|
placeholders.forEach((original, i) => {
|
||||||
|
text = text.replace(`\u2063{{PLACEHOLDER${i}}}\u2063`, original);
|
||||||
|
});
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
const uniqueMentions = [...new Set(mentionMatches.map(match => match[1]))];
|
const uniqueMentions = [...new Set(mentionMatches.map(match => match[1]))];
|
||||||
const mentionsToFetch = uniqueMentions.filter(userID => !mentionCache[userID]);
|
const mentionsToFetch = uniqueMentions.filter(userID => !mentionCache[userID]);
|
||||||
|
|
||||||
@@ -42,7 +58,6 @@ async function replaceMentions(text) {
|
|||||||
resolve();
|
resolve();
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
// すべて失敗扱いでそのまま
|
|
||||||
for (const name of mentionsToFetch) {
|
for (const name of mentionsToFetch) {
|
||||||
mentionCache[name] = `@${name}`;
|
mentionCache[name] = `@${name}`;
|
||||||
}
|
}
|
||||||
@@ -52,17 +67,48 @@ async function replaceMentions(text) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 実際の置換
|
|
||||||
text = text.replace(/@([a-zA-Z0-9_]+)/g, (_, id) => mentionCache[id] || `@${id}`);
|
text = text.replace(/@([a-zA-Z0-9_]+)/g, (_, id) => mentionCache[id] || `@${id}`);
|
||||||
|
|
||||||
|
placeholders.forEach((original, i) => {
|
||||||
|
text = text.replace(`\u2063{{PLACEHOLDER${i}}}\u2063`, original);
|
||||||
|
});
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
const emojiCache = {}; // 絵文字キャッシュ
|
const CACHE_KEY = 'emojiCache';
|
||||||
const fetchingEmojis = {}; // 同時問い合わせ防止(Promiseキャッシュ)
|
const CACHE_EXPIRY_KEY = 'emojiCacheExpiry';
|
||||||
|
const CACHE_LIFETIME_MS = 24 * 60 * 60 * 1000; // 24時間
|
||||||
|
|
||||||
|
let emojiCache = {};
|
||||||
|
let fetchingEmojis = {};
|
||||||
|
|
||||||
|
(function loadEmojiCache() {
|
||||||
|
const savedCache = localStorage.getItem(CACHE_KEY);
|
||||||
|
const savedExpiry = localStorage.getItem(CACHE_EXPIRY_KEY);
|
||||||
|
|
||||||
|
if (savedCache && savedExpiry && Date.now() < Number(savedExpiry)) {
|
||||||
|
try {
|
||||||
|
emojiCache = JSON.parse(savedCache);
|
||||||
|
} catch (e) {
|
||||||
|
localStorage.removeItem(CACHE_KEY);
|
||||||
|
localStorage.removeItem(CACHE_EXPIRY_KEY);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
localStorage.removeItem(CACHE_KEY);
|
||||||
|
localStorage.removeItem(CACHE_EXPIRY_KEY);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
|
function saveEmojiCache() {
|
||||||
|
localStorage.setItem(CACHE_KEY, JSON.stringify(emojiCache));
|
||||||
|
localStorage.setItem(CACHE_EXPIRY_KEY, (Date.now() + CACHE_LIFETIME_MS).toString());
|
||||||
|
}
|
||||||
|
|
||||||
async function replaceCustomEmojis(text) {
|
async function replaceCustomEmojis(text) {
|
||||||
const emojiMatches = [...text.matchAll(/:([a-zA-Z0-9_]+):/g)];
|
const emojiMatches = [...text.matchAll(/:([a-zA-Z0-9_]+):/g)];
|
||||||
if (emojiMatches.length === 0) return text;
|
if (emojiMatches.length === 0) return text;
|
||||||
|
|
||||||
const uniqueEmojis = [...new Set(emojiMatches.map(match => match[1]))];
|
const uniqueEmojis = [...new Set(emojiMatches.map(match => match[1]))];
|
||||||
const emojisToFetch = uniqueEmojis.filter(name => !emojiCache[name] && !fetchingEmojis[name]);
|
const emojisToFetch = uniqueEmojis.filter(name => !emojiCache[name] && !fetchingEmojis[name]);
|
||||||
|
|
||||||
@@ -72,46 +118,61 @@ async function replaceCustomEmojis(text) {
|
|||||||
url: '../function/get_customemoji.php',
|
url: '../function/get_customemoji.php',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
emoji: emojisToFetch.join(','), // カンマ区切りで送信
|
emoji: emojisToFetch.join(','),
|
||||||
userid: global_userid,
|
userid: global_userid,
|
||||||
account_id: global_account_id
|
account_id: global_account_id
|
||||||
},
|
},
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
success: function(response) {
|
success: function (response) {
|
||||||
|
if (response.success && response.emojis) {
|
||||||
|
for (const name of emojisToFetch) {
|
||||||
if (response.success && response.emojis) {
|
if (response.success && response.emojis) {
|
||||||
for (const name of emojisToFetch) {
|
for (const name of emojisToFetch) {
|
||||||
if (response.emojis[name]) {
|
if (response.emojis[name]) {
|
||||||
const emoji = response.emojis[name];
|
const emoji = response.emojis[name];
|
||||||
emojiCache[name] = `<img src="${emoji.emojipath}" alt=":${emoji.emojiname}:" class="custom-emoji">`;
|
emojiCache[name] = emoji.emojipath;
|
||||||
} else {
|
} else {
|
||||||
emojiCache[name] = `:${name}:`; // 存在しない場合は元のまま
|
emojiCache[name] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const name of emojisToFetch) {
|
for (const name of emojisToFetch) {
|
||||||
emojiCache[name] = `:${name}:`;
|
emojiCache[name] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
saveEmojiCache();
|
||||||
resolve();
|
resolve();
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function () {
|
||||||
for (const name of emojisToFetch) {
|
for (const name of emojisToFetch) {
|
||||||
emojiCache[name] = `:${name}:`;
|
emojiCache[name] = null;
|
||||||
}
|
}
|
||||||
|
saveEmojiCache();
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
emojisToFetch.forEach(name => {
|
emojisToFetch.forEach(name => {
|
||||||
fetchingEmojis[name] = fetchPromise;
|
fetchingEmojis[name] = fetchPromise;
|
||||||
});
|
});
|
||||||
|
|
||||||
await fetchPromise;
|
await fetchPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
await Promise.all(uniqueEmojis.map(name => fetchingEmojis[name]));
|
await Promise.all(uniqueEmojis.map(name => fetchingEmojis[name]));
|
||||||
|
|
||||||
text = text.replace(/:([a-zA-Z0-9_]+):/g, (_, name) => emojiCache[name] || `:${name}:`);
|
text = text.replace(/:([a-zA-Z0-9_]+):/g, (_, name) => {
|
||||||
|
const url = emojiCache[name];
|
||||||
|
if (url === undefined) return `:${name}:`; // 未取得
|
||||||
|
if (url === null) return `:${name}:`; // 存在しない
|
||||||
|
|
||||||
|
return `<img src="${url}" alt=":${name}:">`; // ここで生成
|
||||||
|
});
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,6 +214,13 @@ function formatMarkdown(text) {
|
|||||||
const placeholders = {};
|
const placeholders = {};
|
||||||
let placeholderIndex = 0;
|
let placeholderIndex = 0;
|
||||||
|
|
||||||
|
// URLをプレースホルダーに退避
|
||||||
|
text = text.replace(/<a\b[^>]*>[\s\S]*?<\/a>/g, (match) => {
|
||||||
|
const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
|
||||||
|
placeholders[key] = match; // 元の文字列を保存
|
||||||
|
return key;
|
||||||
|
});
|
||||||
|
|
||||||
// 複数行インラインコード(バッククォート3つ)を検出して、<pre><code>で囲む
|
// 複数行インラインコード(バッククォート3つ)を検出して、<pre><code>で囲む
|
||||||
text = text.replace(/```([\s\S]+?)```/g, (match, code) => {
|
text = text.replace(/```([\s\S]+?)```/g, (match, code) => {
|
||||||
const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
|
const key = `\u2063{{PLACEHOLDER${placeholderIndex++}}}\u2063`;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
uwuzu
|
uwuzu
|
||||||
1.5.3
|
1.5.4
|
||||||
2025/05/12
|
2025/06/08
|
||||||
daichimarukana,putonfps
|
daichimarukana,putonfps
|
||||||
@@ -1,6 +1,16 @@
|
|||||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||||
|
|
||||||
|
## Version 1.5.4 (Combeny)
|
||||||
|
2025/06/08
|
||||||
|
fix: uwuzuのセットアップ時にエラーが発生して進めなくなる問題を修正しました。
|
||||||
|
fix: @useridの含まれるURLの表示がおかしくなってしまう問題を修正しました。
|
||||||
|
fix: オブジェクトストレージにアップロードされたファイルが正常に削除されていないのにもかかわらず削除された判定となってしまっている可能性のある問題を修正しました。
|
||||||
|
fix: API・ActivityPub用エンドポイントで、オブジェクトストレージを使用してアップロードされたファイルのURLが正常に返されない問題を修正しました。
|
||||||
|
fix: URL内にアンダーバーが含まれていると、正常にハイパーリンク化されない問題を修正しました。
|
||||||
|
chg: 絵文字の読み込みを初めの一回以降省略することでタイムラインの読み込みを高速化しました!
|
||||||
|
なお、絵文字の削除等で正常に絵文字が表示されなくなった場合はその他ページよりキャッシュクリアをしてください。
|
||||||
|
|
||||||
## Version 1.5.3 (Combeny)
|
## Version 1.5.3 (Combeny)
|
||||||
2025/05/12
|
2025/05/12
|
||||||
fix: ユーズに何も引用などしていない通常のリユーズがある場合にユーズを削除しようとした場合にエラーが発生する恐れのある問題を修正しました!
|
fix: ユーズに何も引用などしていない通常のリユーズがある場合にユーズを削除しようとした場合にエラーが発生する恐れのある問題を修正しました!
|
||||||
|
|||||||
+28
-13
@@ -1,22 +1,37 @@
|
|||||||
{
|
{
|
||||||
"software": "uwuzu",
|
"software": "uwuzu",
|
||||||
"version": "1.5.3",
|
"version": "1.5.4",
|
||||||
"release_date": "2025/05/12",
|
"release_date": "2025/06/08",
|
||||||
"release_notes": "このアップデートにはアカウント削除に失敗する問題の修正や、ユーズのMarkdownの解析に失敗する問題の修正が含まれます!詳細はリリースノートをご覧ください。",
|
"release_notes": "このアップデートにはユーズのMarkdownの解析に失敗する問題の修正やuwuzuのセットアップが行えなくなってしまう問題の修正が含まれます!詳細はリリースノートをご覧ください。",
|
||||||
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!\nまた、アップデート後はキャッシュクリアをお忘れなく!",
|
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!\nまた、アップデート後はキャッシュクリアをお忘れなく!",
|
||||||
"files": {
|
"files": {
|
||||||
"overwrite": [
|
"overwrite": [
|
||||||
"/js/view_function.js",
|
"/.well-known/webfinger/index.php",
|
||||||
|
"/actor/index.php",
|
||||||
|
"/admin/addadmin.php",
|
||||||
|
"/admin/index.php",
|
||||||
|
"/admin/setup_db_php.php",
|
||||||
|
"/admin/setup_uwuzu_db.php",
|
||||||
|
"/admin/success.php",
|
||||||
|
"/api/favorite/change.php",
|
||||||
|
"/api/favorite/get.php",
|
||||||
|
"/api/me/index.php",
|
||||||
|
"/api/ueuse/create.php",
|
||||||
|
"/api/ueuse/delete.php",
|
||||||
|
"/api/ueuse/get.php",
|
||||||
|
"/api/ueuse/index.php",
|
||||||
|
"/api/ueuse/mentions.php",
|
||||||
|
"/api/ueuse/replies.php",
|
||||||
|
"/api/ueuse/search.php",
|
||||||
|
"/api/users/follow.php",
|
||||||
|
"/api/users/index.php",
|
||||||
|
"/api/users/unfollow.php",
|
||||||
"/function/function.php",
|
"/function/function.php",
|
||||||
"/addauthcode.php",
|
"/js/nsfw_event.js",
|
||||||
"/authcodechk.php",
|
"/js/unsupported.js",
|
||||||
"/authlogin.php",
|
"/js/view_function.js",
|
||||||
"/check.php",
|
"/others/cache_clear.php",
|
||||||
"/index.php",
|
"/others/index.php",
|
||||||
"/login.php",
|
|
||||||
"/new_select.php",
|
|
||||||
"/new.php",
|
|
||||||
"/success.php",
|
|
||||||
|
|
||||||
"/server/uwuzuabout.txt",
|
"/server/uwuzuabout.txt",
|
||||||
"/server/uwuzuinfo.txt",
|
"/server/uwuzuinfo.txt",
|
||||||
|
|||||||
Reference in New Issue
Block a user