mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-04 19:14:41 +00:00
uwuzu v1.6.3 Hapuego
This commit is contained in:
@@ -79,7 +79,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
||||
if($AuthData[0] === true){
|
||||
$userData = $AuthData[2];
|
||||
|
||||
$messageQuery = $pdo->prepare("SELECT fromuserid,title,msg,url,datetime,userchk,category FROM notification WHERE touserid = :userid ORDER BY datetime DESC LIMIT :offset, :itemsPerPage");
|
||||
$messageQuery = $pdo->prepare("SELECT fromuserid,title,msg,url,datetime,userchk,category,valueid FROM notification WHERE touserid = :userid ORDER BY datetime DESC LIMIT :offset, :itemsPerPage");
|
||||
$messageQuery->bindValue(':userid', $userData["userid"], PDO::PARAM_STR);
|
||||
$messageQuery->bindValue(':offset', $offset, PDO::PARAM_INT);
|
||||
$messageQuery->bindValue(':itemsPerPage', $limit, PDO::PARAM_INT);
|
||||
@@ -126,6 +126,12 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
||||
}else{
|
||||
$userchk = false;
|
||||
}
|
||||
|
||||
if(!(empty($notificationdata["valueid"]))){
|
||||
$valueid = decode_yajirushi(htmlspecialchars_decode($notificationdata["valueid"]));
|
||||
}else{
|
||||
$valueid = null;
|
||||
}
|
||||
|
||||
$item = [
|
||||
'from' => $now_userdata,
|
||||
@@ -133,6 +139,7 @@ if(isset($_GET['token']) || (!(empty($Get_Post_Json)))) {
|
||||
'title' => decode_yajirushi(htmlspecialchars_decode($notificationdata["title"])),
|
||||
'text' => decode_yajirushi(htmlspecialchars_decode($notificationdata["msg"])),
|
||||
'datetime' => decode_yajirushi(htmlspecialchars_decode($notificationdata["datetime"])),
|
||||
'valueid' => $valueid,
|
||||
'is_checked' => $userchk,
|
||||
];
|
||||
|
||||
|
||||
+100
-16
@@ -1148,7 +1148,7 @@ function GenNotificationId($to, $from, $title, $message, $url, $category) {
|
||||
return hash('sha3-512', $data);
|
||||
}
|
||||
|
||||
function send_notification($to,$from,$title,$message,$url,$category){
|
||||
function send_notification($to,$from,$title,$message,$url,$category,$valueid = null){
|
||||
// データベースに接続
|
||||
try {
|
||||
$option = array(
|
||||
@@ -1169,6 +1169,15 @@ function send_notification($to,$from,$title,$message,$url,$category){
|
||||
if(in_array($category, explode(',', $to_result["notification_settings"])) || empty($to_result["notification_settings"]) || $category === "system" || $category === "other"){
|
||||
//ブロックされてたら送らない
|
||||
if(!(in_array($from, explode(',', $to_result["blocklist"])))){
|
||||
if(!(empty($valueid))){
|
||||
if(mb_strlen($valueid) > 256){
|
||||
$save_valueid = "";
|
||||
}else{
|
||||
$save_valueid = $valueid;
|
||||
}
|
||||
}else{
|
||||
$save_valueid = "";
|
||||
}
|
||||
if(!(empty($pdo))){
|
||||
$pdo->beginTransaction();
|
||||
try {
|
||||
@@ -1183,7 +1192,7 @@ function send_notification($to,$from,$title,$message,$url,$category){
|
||||
$notification_id = GenNotificationId($touserid, $fromuserid, $title, $msg, $url, $notification_category);
|
||||
|
||||
// 通知用SQL作成
|
||||
$stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title, category, notificationid) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title, :category, :notificationid)");
|
||||
$stmt = $pdo->prepare("INSERT INTO notification (fromuserid, touserid, msg, url, datetime, userchk, title, category, notificationid, valueid) VALUES (:fromuserid, :touserid, :msg, :url, :datetime, :userchk, :title, :category, :notificationid, :valueid)");
|
||||
|
||||
$stmt->bindParam(':fromuserid', $fromuserid, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':touserid', $touserid, PDO::PARAM_STR);
|
||||
@@ -1193,6 +1202,8 @@ function send_notification($to,$from,$title,$message,$url,$category){
|
||||
$stmt->bindParam(':title', $title, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':category', $notification_category, PDO::PARAM_STR);
|
||||
$stmt->bindParam(':notificationid', $notification_id, PDO::PARAM_STR);
|
||||
|
||||
$stmt->bindParam(':valueid', $save_valueid, PDO::PARAM_STR);
|
||||
|
||||
$stmt->bindParam(':datetime', $datetime, PDO::PARAM_STR);
|
||||
|
||||
@@ -1367,7 +1378,8 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
||||
}else{
|
||||
$save_nsfw = "false";
|
||||
}
|
||||
if(empty($ueuse) && empty($ruUniqid)) {
|
||||
|
||||
if (($ueuse === '' || $ueuse === null) && empty($ruUniqid)) {
|
||||
$error_message[] = '内容を入力してください。(INPUT_PLEASE)';
|
||||
} else {
|
||||
// 文字数を確認
|
||||
@@ -1387,11 +1399,11 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
||||
}
|
||||
|
||||
// 改行ユーズ確認
|
||||
if(preg_match('/^[\n\r]+$/', $ueuse) === 1){
|
||||
if(preg_match('/^\s+$/u', $ueuse) === 1){
|
||||
$error_message[] = '内容を入力してください。(INPUT_PLEASE)';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$old_datetime = date("Y-m-d H:i:00");
|
||||
$now_datetime = date("Y-m-d H:i:00",strtotime("+1 minute"));
|
||||
$rate_Query = $pdo->prepare("SELECT * FROM ueuse WHERE account = :userid AND TIME(datetime) BETWEEN :old_datetime AND :now_datetime");
|
||||
@@ -1711,7 +1723,7 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
||||
$res = $pdo->commit();
|
||||
|
||||
foreach ($mentionedUsers as $mentionedUser) {
|
||||
send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention");
|
||||
send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention", $uniqid);
|
||||
}
|
||||
|
||||
} catch(Exception $e) {
|
||||
@@ -1766,10 +1778,10 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
||||
$res = $pdo->commit();
|
||||
|
||||
foreach ($mentionedUsers as $mentionedUser) {
|
||||
send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention");
|
||||
send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention", $uniqid);
|
||||
}
|
||||
|
||||
send_notification($touserid,$userid,"".$userid."さんが返信しました!",$ueuse,"/!".$uniqid."", "reply");
|
||||
send_notification($touserid,$userid,"".$userid."さんが返信しました!",$ueuse,"/!".$uniqid."", "reply", $uniqid);
|
||||
} catch(Exception $e) {
|
||||
// エラーが発生した時はロールバック
|
||||
$pdo->rollBack();
|
||||
@@ -1824,10 +1836,10 @@ function send_ueuse($userid,$rpUniqid,$ruUniqid,$ueuse,$photo1,$photo2,$photo3,$
|
||||
$res = $pdo->commit();
|
||||
|
||||
foreach ($mentionedUsers as $mentionedUser) {
|
||||
send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention");
|
||||
send_notification($mentionedUser,$userid,"".$userid."さんにメンションされました!",$ueuse,"/!".$uniqid."", "mention", $uniqid);
|
||||
}
|
||||
|
||||
send_notification($touserid,$userid,"".$userid."さんがリユーズしました!",$ueuse,"/!".$uniqid."", "reuse");
|
||||
send_notification($touserid,$userid,"".$userid."さんがリユーズしました!",$ueuse,"/!".$uniqid."", "reuse", $uniqid);
|
||||
|
||||
} catch(Exception $e) {
|
||||
// エラーが発生した時はロールバック
|
||||
@@ -2111,7 +2123,7 @@ function follow_user($pdo, $to_userid, $userid){
|
||||
$updateQuery->bindValue(':userid', $userid, PDO::PARAM_STR);
|
||||
$res_follow = $updateQuery->execute();
|
||||
|
||||
send_notification($userData["userid"], $userid, "🎉" . $userid . "さんにフォローされました!🎉", "" . $userid . "さんにフォローされました。", "/@" . $userid . "", "follow");
|
||||
send_notification($userData["userid"], $userid, "🎉" . $userid . "さんにフォローされました!🎉", "" . $userid . "さんにフォローされました。", "/@" . $userid . "", "follow", $userid);
|
||||
|
||||
if ($res && $res_follow) {
|
||||
$pdo->commit();
|
||||
@@ -2348,7 +2360,7 @@ function deleteUser($pdo, $userid, $step, $job_uniqid){
|
||||
if ($res) {
|
||||
$pdo->commit();
|
||||
|
||||
send_notification($userid, "uwuzu-fromsys", "🗑️アカウントの削除が開始されました🗑️", "アカウントの削除が開始されました!\n今後、アカウントのデータは順次削除されます。\n削除には時間がかかります。\n\nログアウトしてお待ち下さい。\n\nアカウントの復旧はできません。", "/others", "system");
|
||||
send_notification($userid, "uwuzu-fromsys", "🗑️アカウントの削除が開始されました🗑️", "アカウントの削除が開始されました!\n今後、アカウントのデータは順次削除されます。\n削除には時間がかかります。\n\nログアウトしてお待ち下さい。\n\nアカウントの復旧はできません。", "/others", "system", $userid);
|
||||
if(changeJob($pdo, $userid, $job_uniqid, "delete_ueuse", "waiting")){
|
||||
return true;
|
||||
}else{
|
||||
@@ -2649,7 +2661,7 @@ function addFavorite($pdo, $uniqid, $userid){
|
||||
// ユーザーIDを追加
|
||||
$favoriteList[] = $userid;
|
||||
|
||||
send_notification(safetext($post['account']),$userid,"".$userid."さんがいいねしました!",safetext($post['ueuse']),"/!".$uniqid."","favorite");
|
||||
send_notification(safetext($post['account']),$userid,"".$userid."さんがいいねしました!",safetext($post['ueuse']),"/!".$uniqid."","favorite", $uniqid);
|
||||
|
||||
//1いいねでスコアが1増加
|
||||
changePopularity($pdo, $uniqid, $userid, 1);
|
||||
@@ -2755,7 +2767,7 @@ function getUeuseData($pdo, $uniqid) {
|
||||
|
||||
$fav = $ueuseDatas['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$ueuseDatas["favorite_conut"] = count($favIds)-1;
|
||||
$ueuseDatas["favorite_count"] = count($favIds)-1;
|
||||
|
||||
return $ueuseDatas;
|
||||
}
|
||||
@@ -3336,7 +3348,7 @@ function FormatUeuseItem(array $value, string $myblocklist, string $mybookmark,
|
||||
"rpuniqid" => $reused["rpuniqid"],
|
||||
"ruuniqid" => $reused["ruuniqid"],
|
||||
"nsfw" => filter_var($reused["nsfw"], FILTER_VALIDATE_BOOLEAN),
|
||||
"favoritecount" => $reused["favorite_conut"],
|
||||
"favoritecount" => $reused["favorite_count"],
|
||||
"replycount" => $reused["reply_count"],
|
||||
"reusecount" => $reused["reuse_count"],
|
||||
"is_favorite" => in_array($userId, explode(',', $reused['favorite'])),
|
||||
@@ -3375,7 +3387,7 @@ function FormatUeuseItem(array $value, string $myblocklist, string $mybookmark,
|
||||
"rpuniqid" => $value["rpuniqid"],
|
||||
"ruuniqid" => $value["ruuniqid"],
|
||||
"nsfw" => filter_var($value["nsfw"], FILTER_VALIDATE_BOOLEAN),
|
||||
"favoritecount" => $value["favorite_conut"],
|
||||
"favoritecount" => $value["favorite_count"],
|
||||
"replycount" => $value["reply_count"],
|
||||
"reusecount" => $value["reuse_count"],
|
||||
"is_favorite" => in_array($userId, explode(',', $value['favorite'])),
|
||||
@@ -3581,4 +3593,76 @@ function APIAuth($pdo, $token, $scope){
|
||||
}
|
||||
}
|
||||
|
||||
function getDatasUeuse(PDO $pdo, array $messages): array {
|
||||
if (empty($messages)) return [];
|
||||
|
||||
// --- userId / uniqid を安全に抽出 ---
|
||||
$userIds = array_values(array_unique(array_filter(array_column($messages, 'account'), fn($v) => $v !== null && $v !== '')));
|
||||
$uniqids = array_values(array_unique(array_filter(array_column($messages, 'uniqid'), fn($v) => $v !== null && $v !== '')));
|
||||
|
||||
$users = [];
|
||||
if (!empty($userIds)) {
|
||||
$placeholders = implode(',', array_fill(0, count($userIds), '?'));
|
||||
$stmt = $pdo->prepare("SELECT userid, username, profile, role, iconname, headname, sacinfo FROM account WHERE userid IN ($placeholders)");
|
||||
$stmt->execute($userIds);
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$users[$row['userid']] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
$replyCounts = [];
|
||||
$reuseCounts = [];
|
||||
if (!empty($uniqids)) {
|
||||
$placeholders = implode(',', array_fill(0, count($uniqids), '?'));
|
||||
|
||||
$stmt = $pdo->prepare("SELECT rpuniqid, COUNT(*) AS reply_count FROM ueuse WHERE rpuniqid IN ($placeholders) GROUP BY rpuniqid");
|
||||
$stmt->execute($uniqids);
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$replyCounts[$row['rpuniqid']] = (int)$row['reply_count'];
|
||||
}
|
||||
|
||||
$stmt = $pdo->prepare("SELECT ruuniqid, COUNT(*) AS reuse_count FROM ueuse WHERE ruuniqid IN ($placeholders) GROUP BY ruuniqid");
|
||||
$stmt->execute($uniqids);
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$reuseCounts[$row['ruuniqid']] = (int)$row['reuse_count'];
|
||||
}
|
||||
}
|
||||
|
||||
// --- messages に反映(ループ内でDBを叩かない)---
|
||||
foreach ($messages as &$message) {
|
||||
// account のユーザー情報をマージ(存在すれば上書き)
|
||||
$acc = $message['account'] ?? null;
|
||||
if ($acc !== null && isset($users[$acc])) {
|
||||
$userRow = $users[$acc];
|
||||
$message['username'] = $userRow['username'] ?? ($message['username'] ?? null);
|
||||
$message['profile'] = $userRow['profile'] ?? ($message['profile'] ?? null);
|
||||
$message['role'] = $userRow['role'] ?? ($message['role'] ?? null);
|
||||
$message['iconname'] = $userRow['iconname'] ?? ($message['iconname'] ?? null);
|
||||
$message['headname'] = $userRow['headname'] ?? ($message['headname'] ?? null);
|
||||
$message['sacinfo'] = $userRow['sacinfo'] ?? ($message['sacinfo'] ?? null);
|
||||
}
|
||||
|
||||
// reply / reuse
|
||||
$uniq = $message['uniqid'] ?? '';
|
||||
$message['reply_count'] = $replyCounts[$uniq] ?? 0;
|
||||
$message['reuse_count'] = $reuseCounts[$uniq] ?? 0;
|
||||
|
||||
// --- favorite_count を安全に計算 ---
|
||||
// 1) 値を文字列として扱い、2) explode して trim、3) 空文字を除去、4) count
|
||||
$favStr = isset($message['favorite']) ? (string)$message['favorite'] : '';
|
||||
if ($favStr === '') {
|
||||
$favCount = 0;
|
||||
} else {
|
||||
$parts = array_map('trim', explode(',', $favStr));
|
||||
$parts = array_filter($parts, fn($v) => $v !== '');
|
||||
$favCount = count($parts);
|
||||
}
|
||||
|
||||
$message['favorite_count'] = $favCount;
|
||||
}
|
||||
unset($message);
|
||||
|
||||
return $messages;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -314,6 +314,7 @@ $pdo = null;
|
||||
</div>
|
||||
<p>パスワードを表示する</p>
|
||||
</div>
|
||||
<div class="p2">パスワードに絵文字や日本語を使用している場合はパスワードの表示をオンにして入力してください。</div>
|
||||
|
||||
<?php if(!empty(H_CAPTCHA_ONOFF && H_CAPTCHA_ONOFF == "true")){?>
|
||||
<div class="captcha_zone">
|
||||
|
||||
@@ -81,44 +81,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
}
|
||||
|
||||
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||
foreach ($messages as &$message) {
|
||||
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $message["account"]);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
if ($userData) {
|
||||
$message['iconname'] = $userData['iconname'];
|
||||
$message['headname'] = $userData['headname'];
|
||||
$message['username'] = $userData['username'];
|
||||
$message['sacinfo'] = $userData['sacinfo'];
|
||||
$message['role'] = $userData['role'];
|
||||
}
|
||||
|
||||
//リプライ数取得
|
||||
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||
$rpQuery->execute();
|
||||
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($rpData){
|
||||
$message['reply_count'] = $rpData['reply_count'];
|
||||
}
|
||||
|
||||
//リユーズ数取得
|
||||
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||
$ruQuery->execute();
|
||||
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($ruData){
|
||||
$message['reuse_count'] = $ruData['reuse_count'];
|
||||
}
|
||||
|
||||
$fav = $message['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$message["favorite_conut"] = count($favIds)-1;
|
||||
}
|
||||
$messages = getDatasUeuse($pdo, $messages);
|
||||
//adsystem------------------
|
||||
|
||||
$message['ads'] = "false";
|
||||
|
||||
@@ -78,44 +78,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
}
|
||||
|
||||
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||
foreach ($messages as &$message) {
|
||||
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $message["account"]);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
if ($userData) {
|
||||
$message['iconname'] = $userData['iconname'];
|
||||
$message['headname'] = $userData['headname'];
|
||||
$message['username'] = $userData['username'];
|
||||
$message['sacinfo'] = $userData['sacinfo'];
|
||||
$message['role'] = $userData['role'];
|
||||
}
|
||||
|
||||
//リプライ数取得
|
||||
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||
$rpQuery->execute();
|
||||
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($rpData){
|
||||
$message['reply_count'] = $rpData['reply_count'];
|
||||
}
|
||||
|
||||
//リユーズ数取得
|
||||
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||
$ruQuery->execute();
|
||||
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($ruData){
|
||||
$message['reuse_count'] = $ruData['reuse_count'];
|
||||
}
|
||||
|
||||
$fav = $message['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$message["favorite_conut"] = count($favIds)-1;
|
||||
}
|
||||
$messages = getDatasUeuse($pdo, $messages);
|
||||
//adsystem------------------
|
||||
|
||||
$message['ads'] = "false";
|
||||
|
||||
@@ -196,44 +196,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
shuffle($messages);
|
||||
|
||||
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||
foreach ($messages as &$message) {
|
||||
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $message["account"]);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
if ($userData) {
|
||||
$message['iconname'] = $userData['iconname'];
|
||||
$message['headname'] = $userData['headname'];
|
||||
$message['username'] = $userData['username'];
|
||||
$message['sacinfo'] = $userData['sacinfo'];
|
||||
$message['role'] = $userData['role'];
|
||||
}
|
||||
|
||||
//リプライ数取得
|
||||
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||
$rpQuery->execute();
|
||||
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($rpData){
|
||||
$message['reply_count'] = $rpData['reply_count'];
|
||||
}
|
||||
|
||||
//リユーズ数取得
|
||||
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||
$ruQuery->execute();
|
||||
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($ruData){
|
||||
$message['reuse_count'] = $ruData['reuse_count'];
|
||||
}
|
||||
|
||||
$fav = $message['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$message["favorite_conut"] = count($favIds)-1;
|
||||
}
|
||||
$messages = getDatasUeuse($pdo, $messages);
|
||||
//adsystem------------------
|
||||
|
||||
$message['ads'] = "false";
|
||||
|
||||
@@ -60,44 +60,9 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
}
|
||||
|
||||
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||
foreach ($messages as &$message) {
|
||||
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $message["account"]);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
if ($userData) {
|
||||
$message['iconname'] = $userData['iconname'];
|
||||
$message['headname'] = $userData['headname'];
|
||||
$message['username'] = $userData['username'];
|
||||
$message['sacinfo'] = $userData['sacinfo'];
|
||||
$message['role'] = $userData['role'];
|
||||
}
|
||||
$messages = getDatasUeuse($pdo, $messages);
|
||||
|
||||
//リプライ数取得
|
||||
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||
$rpQuery->execute();
|
||||
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($rpData){
|
||||
$message['reply_count'] = $rpData['reply_count'];
|
||||
}
|
||||
|
||||
//リユーズ数取得
|
||||
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||
$ruQuery->execute();
|
||||
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($ruData){
|
||||
$message['reuse_count'] = $ruData['reuse_count'];
|
||||
}
|
||||
|
||||
$fav = $message['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$message["favorite_conut"] = count($favIds)-1;
|
||||
}
|
||||
//adsystem------------------
|
||||
|
||||
$message['ads'] = "false";
|
||||
|
||||
@@ -91,44 +91,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
}
|
||||
|
||||
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||
foreach ($messages as &$message) {
|
||||
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $message["account"]);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
if ($userData) {
|
||||
$message['iconname'] = $userData['iconname'];
|
||||
$message['headname'] = $userData['headname'];
|
||||
$message['username'] = $userData['username'];
|
||||
$message['sacinfo'] = $userData['sacinfo'];
|
||||
$message['role'] = $userData['role'];
|
||||
}
|
||||
|
||||
//リプライ数取得
|
||||
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||
$rpQuery->execute();
|
||||
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($rpData){
|
||||
$message['reply_count'] = $rpData['reply_count'];
|
||||
}
|
||||
|
||||
//リユーズ数取得
|
||||
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||
$ruQuery->execute();
|
||||
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($ruData){
|
||||
$message['reuse_count'] = $ruData['reuse_count'];
|
||||
}
|
||||
|
||||
$fav = $message['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$message["favorite_conut"] = count($favIds)-1;
|
||||
}
|
||||
$messages = getDatasUeuse($pdo, $messages);
|
||||
//adsystem------------------
|
||||
|
||||
$message['ads'] = "false";
|
||||
|
||||
@@ -74,44 +74,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
}
|
||||
|
||||
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||
foreach ($messages as &$message) {
|
||||
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $message["account"]);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
if ($userData) {
|
||||
$message['iconname'] = $userData['iconname'];
|
||||
$message['headname'] = $userData['headname'];
|
||||
$message['username'] = $userData['username'];
|
||||
$message['sacinfo'] = $userData['sacinfo'];
|
||||
$message['role'] = $userData['role'];
|
||||
}
|
||||
|
||||
//リプライ数取得
|
||||
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||
$rpQuery->execute();
|
||||
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($rpData){
|
||||
$message['reply_count'] = $rpData['reply_count'];
|
||||
}
|
||||
|
||||
//リユーズ数取得
|
||||
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||
$ruQuery->execute();
|
||||
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($ruData){
|
||||
$message['reuse_count'] = $ruData['reuse_count'];
|
||||
}
|
||||
|
||||
$fav = $message['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$message["favorite_conut"] = count($favIds)-1;
|
||||
}
|
||||
$messages = getDatasUeuse($pdo, $messages);
|
||||
//adsystem------------------
|
||||
|
||||
$message['ads'] = "false";
|
||||
|
||||
@@ -104,44 +104,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
}
|
||||
|
||||
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||
foreach ($messages as &$message) {
|
||||
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $message["account"]);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
if ($userData) {
|
||||
$message['iconname'] = $userData['iconname'];
|
||||
$message['headname'] = $userData['headname'];
|
||||
$message['username'] = $userData['username'];
|
||||
$message['sacinfo'] = $userData['sacinfo'];
|
||||
$message['role'] = $userData['role'];
|
||||
}
|
||||
|
||||
//リプライ数取得
|
||||
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||
$rpQuery->execute();
|
||||
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($rpData){
|
||||
$message['reply_count'] = $rpData['reply_count'];
|
||||
}
|
||||
|
||||
//リユーズ数取得
|
||||
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||
$ruQuery->execute();
|
||||
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($ruData){
|
||||
$message['reuse_count'] = $ruData['reuse_count'];
|
||||
}
|
||||
|
||||
$fav = $message['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$message["favorite_conut"] = count($favIds)-1;
|
||||
}
|
||||
$messages = getDatasUeuse($pdo, $messages);
|
||||
//adsystem------------------
|
||||
|
||||
$message['ads'] = "false";
|
||||
|
||||
@@ -101,44 +101,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
}
|
||||
|
||||
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||
foreach ($messages as &$message) {
|
||||
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $message["account"]);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
if ($userData) {
|
||||
$message['iconname'] = $userData['iconname'];
|
||||
$message['headname'] = $userData['headname'];
|
||||
$message['username'] = $userData['username'];
|
||||
$message['sacinfo'] = $userData['sacinfo'];
|
||||
$message['role'] = $userData['role'];
|
||||
}
|
||||
|
||||
//リプライ数取得
|
||||
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||
$rpQuery->execute();
|
||||
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($rpData){
|
||||
$message['reply_count'] = $rpData['reply_count'];
|
||||
}
|
||||
|
||||
//リユーズ数取得
|
||||
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||
$ruQuery->execute();
|
||||
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($ruData){
|
||||
$message['reuse_count'] = $ruData['reuse_count'];
|
||||
}
|
||||
|
||||
$fav = $message['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$message["favorite_conut"] = count($favIds)-1;
|
||||
}
|
||||
$messages = getDatasUeuse($pdo, $messages);
|
||||
//adsystem------------------
|
||||
|
||||
$message['ads'] = "false";
|
||||
|
||||
@@ -87,44 +87,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
}
|
||||
|
||||
// ユーザー情報を取得して、$messages内のusernameをuserDataのusernameに置き換える
|
||||
foreach ($messages as &$message) {
|
||||
$userQuery = $pdo->prepare("SELECT username, userid, profile, role, iconname, headname, sacinfo FROM account WHERE userid = :userid");
|
||||
$userQuery->bindValue(':userid', $message["account"]);
|
||||
$userQuery->execute();
|
||||
$userData = $userQuery->fetch();
|
||||
|
||||
if ($userData) {
|
||||
$message['iconname'] = $userData['iconname'];
|
||||
$message['headname'] = $userData['headname'];
|
||||
$message['username'] = $userData['username'];
|
||||
$message['sacinfo'] = $userData['sacinfo'];
|
||||
$message['role'] = $userData['role'];
|
||||
}
|
||||
|
||||
//リプライ数取得
|
||||
$rpQuery = $pdo->prepare("SELECT COUNT(*) as reply_count FROM ueuse WHERE rpuniqid = :rpuniqid");
|
||||
$rpQuery->bindValue(':rpuniqid', $message['uniqid']);
|
||||
$rpQuery->execute();
|
||||
$rpData = $rpQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($rpData) {
|
||||
$message['reply_count'] = $rpData['reply_count'];
|
||||
}
|
||||
|
||||
//リユーズ数取得
|
||||
$ruQuery = $pdo->prepare("SELECT COUNT(*) as reuse_count FROM ueuse WHERE ruuniqid = :ruuniqid");
|
||||
$ruQuery->bindValue(':ruuniqid', $message['uniqid']);
|
||||
$ruQuery->execute();
|
||||
$ruData = $ruQuery->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($ruData) {
|
||||
$message['reuse_count'] = $ruData['reuse_count'];
|
||||
}
|
||||
|
||||
$fav = $message['favorite'];
|
||||
$favIds = explode(',', $fav);
|
||||
$message["favorite_conut"] = count($favIds) - 1;
|
||||
}
|
||||
$messages = getDatasUeuse($pdo, $messages);
|
||||
} elseif($userData != null) {
|
||||
$activity_base = GetActivityPubJson($userData['outbox']);
|
||||
$pageUrl = $activity_base['first'] ?? null;
|
||||
@@ -210,7 +173,7 @@ if (safetext(isset($_POST['page'])) && safetext(isset($_POST['userid'])) && safe
|
||||
"video1" => $video,
|
||||
"nsfw" => $object["sensitive"] ?? false,
|
||||
"favorite" => "",
|
||||
"favorite_conut" => 0,
|
||||
"favorite_count" => 0,
|
||||
"reply_count" => 0,
|
||||
"reuse_count" => 0,
|
||||
"abi" => "",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
uwuzu
|
||||
1.6.2
|
||||
2025/08/08
|
||||
1.6.3
|
||||
2025/08/10
|
||||
daichimarukana,putonfps
|
||||
@@ -1,6 +1,18 @@
|
||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||
|
||||
## Version 1.6.3
|
||||
2025/08/10
|
||||
fix: 「0」のみのユーズが行えない問題を修正しました!
|
||||
fix: banuserid.txt(登録禁止ユーザーID)内のinfomationという誤った綴りををinformationに修正しました!
|
||||
chg: すべてのタイムラインの大幅高速化を行いました!
|
||||
chg: 設定画面にて、新しいパスワードの入力フィールドにカーソルを合わせた際に新しいパスワードの自動生成が促されるように変更しました!
|
||||
chg: ログインフォームに「パスワードに絵文字や日本語を使用している場合はパスワードの表示をオンにして入力してください。」と記載しました!
|
||||
new: 通知APIにvalueidという値を追加しました!
|
||||
valueidでは、ユーズのメンションや返信では、メンション・返信してきたユーズのID、フォローなどではフォローしてきたユーザーのIDなどが入ります。
|
||||
すべての通知にvalueidの値が含まれるわけではありませんので、ご注意ください。
|
||||
これにより、uwuzuのDB内のnotificationテーブルの構造に「valueid」(varchar(256))を追加する必要があります。
|
||||
|
||||
## Version 1.6.2 (Hapuego)
|
||||
2025/08/08
|
||||
fix: 引用リユーズにおいて、公式・Botアカウントのユーズをリユーズした際に公式・Botではないアカウントのユーズに公式マーク・Bot表示が付いてしまう問題を修正しました!
|
||||
|
||||
+1
-1
@@ -626,7 +626,7 @@ $pdo = null;
|
||||
</div>
|
||||
<div>
|
||||
<p>新しいパスワード</p>
|
||||
<input id="password" type="password" class="inbox" name="password" oncopy="return false" onpaste="return false" oncontextmenu="return false" value="">
|
||||
<input id="password" type="password" class="inbox" name="password" oncopy="return false" onpaste="return false" oncontextmenu="return false" value="" autocomplete="new-password">
|
||||
<div id="password_zxcvbn" class="p2" style="display: none;"></div>
|
||||
<p>パスワードを表示する</p>
|
||||
<div class="switch_button">
|
||||
|
||||
+17
-7
@@ -1,14 +1,24 @@
|
||||
{
|
||||
"software": "uwuzu",
|
||||
"version": "1.6.2",
|
||||
"release_date": "2025/08/08",
|
||||
"release_notes": "このアップデートでは、リプライ取得APIが正常に動作しない問題やユーズの表示に関する問題を修正しました!\n詳細はリリースノートをご確認ください。",
|
||||
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!\nアップデート後はキャッシュクリアをお忘れなく!",
|
||||
"version": "1.6.3",
|
||||
"release_date": "2025/08/10",
|
||||
"release_notes": "このアップデートでは、「0」のみのユーズが行えない問題の修正や、タイムラインの大幅高速化などの改善が含まれています!\nアップデートの前にDBの構造の更新が必要です。リリースノートに従って更新をしてください!\n詳細はリリースノートをご確認ください。",
|
||||
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!",
|
||||
"files": {
|
||||
"overwrite": [
|
||||
"/js/view_function.js",
|
||||
"/css/home.css",
|
||||
"/api/ueuse/replies.php",
|
||||
"/api/me/notification/index.php",
|
||||
"/function/function.php",
|
||||
"/nextpage/bookmarktimeline.php",
|
||||
"/nextpage/followtimeline.php",
|
||||
"/nextpage/foryoutimeline.php",
|
||||
"/nextpage/localtimeline.php",
|
||||
"/nextpage/searchtimeline.php",
|
||||
"/nextpage/ueusetimeline.php",
|
||||
"/nextpage/userliketimeline.php",
|
||||
"/nextpage/usermediatimeline.php",
|
||||
"/nextpage/usertimeline.php",
|
||||
"/settings/index.php",
|
||||
"/login.php",
|
||||
"/server/uwuzuabout.txt",
|
||||
"/server/uwuzuinfo.txt",
|
||||
"/server/uwuzurelease.txt"
|
||||
|
||||
+3
-2
@@ -3,7 +3,7 @@
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- ホスト: 127.0.0.1
|
||||
-- 生成日時: 2025-08-05 05:53:23
|
||||
-- 生成日時: 2025-08-10 11:10:28
|
||||
-- サーバのバージョン: 10.4.32-MariaDB
|
||||
-- PHP のバージョン: 8.2.12
|
||||
|
||||
@@ -211,7 +211,8 @@ CREATE TABLE `notification` (
|
||||
`userchk` varchar(32) NOT NULL,
|
||||
`title` varchar(1024) NOT NULL,
|
||||
`category` varchar(256) NOT NULL,
|
||||
`notificationid` varchar(512) NOT NULL
|
||||
`notificationid` varchar(512) NOT NULL,
|
||||
`valueid` varchar(256) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user