mirror of
https://github.com/Daichimarukana/uwuzu.git
synced 2026-06-04 19:14:41 +00:00
uwuzu v1.6.1 Hapuego
This commit is contained in:
+9
-12
@@ -32,32 +32,29 @@ if (safetext(isset($_POST['get_account'])) && safetext(isset($_POST['userid']))
|
||||
if (!empty($pdo)) {
|
||||
// カンマ区切りまたは1つのユーザーID文字列を処理
|
||||
$usernames = array_unique(array_filter(explode(',', $get_account)));
|
||||
$lower_usernames = array_map('mb_strtolower', $usernames);
|
||||
|
||||
$results = [];
|
||||
|
||||
if (count($usernames) > 0) {
|
||||
// プレースホルダを作成
|
||||
$placeholders = implode(',', array_fill(0, count($usernames), '?'));
|
||||
$stmt = $pdo->prepare("SELECT userid, username FROM account WHERE userid IN ($placeholders)");
|
||||
$stmt->execute($usernames);
|
||||
if (count($lower_usernames) > 0) {
|
||||
$placeholders = implode(',', array_fill(0, count($lower_usernames), '?'));
|
||||
$stmt = $pdo->prepare("SELECT userid, username FROM account WHERE LOWER(userid) IN ($placeholders)");
|
||||
$stmt->execute($lower_usernames);
|
||||
|
||||
$fetched = [];
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$fetched[$row['userid']] = [
|
||||
$fetched[mb_strtolower($row['userid'])] = [
|
||||
'userid' => $row['userid'],
|
||||
'username' => $row['username']
|
||||
];
|
||||
}
|
||||
|
||||
foreach ($usernames as $name) {
|
||||
if (isset($fetched[$name])) {
|
||||
$results[$name] = $fetched[$name];
|
||||
} else {
|
||||
$results[$name] = null;
|
||||
}
|
||||
$lower = mb_strtolower($name);
|
||||
$results[$name] = $fetched[$lower] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo json_encode([
|
||||
"success" => true,
|
||||
"users" => $results
|
||||
|
||||
+5
-5
@@ -32,7 +32,7 @@ async function replaceMentions(text) {
|
||||
}
|
||||
|
||||
// ユーザーIDを小文字に正規化
|
||||
const uniqueMentions = [...new Set(mentionMatches.map(match => match[1].toLowerCase()))];
|
||||
const uniqueMentions = [...new Set(mentionMatches.map(match => match[1]))];
|
||||
const mentionsToFetch = uniqueMentions.filter(userID => !mentionCache[userID]);
|
||||
|
||||
if (mentionsToFetch.length > 0) {
|
||||
@@ -51,9 +51,9 @@ async function replaceMentions(text) {
|
||||
if (response.success && response.users) {
|
||||
for (const [name, userInfo] of Object.entries(response.users)) {
|
||||
if (userInfo && userInfo.userid && userInfo.username) {
|
||||
mentionCache[name.toLowerCase()] = `<a href="/@${userInfo.userid}" class="mta">@${userInfo.username}</a>`;
|
||||
mentionCache[name] = `<a href="/@${userInfo.userid}" class="mta">@${userInfo.username}</a>`;
|
||||
} else {
|
||||
mentionCache[name.toLowerCase()] = `@${name}`;
|
||||
mentionCache[name] = `@${name}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ async function replaceMentions(text) {
|
||||
},
|
||||
error: function () {
|
||||
for (const name of mentionsToFetch) {
|
||||
mentionCache[name.toLowerCase()] = `@${name}`;
|
||||
mentionCache[name] = `@${name}`;
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
@@ -71,7 +71,7 @@ async function replaceMentions(text) {
|
||||
|
||||
// 元のtextに適用(小文字で照合)
|
||||
text = text.replace(/@([a-zA-Z0-9_]+)/g, (_, id) => {
|
||||
const lower = id.toLowerCase();
|
||||
const lower = id;
|
||||
return mentionCache[lower] || `@${id}`; // 表示は元の大文字小文字を保持
|
||||
});
|
||||
|
||||
|
||||
@@ -171,12 +171,9 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
|
||||
|
||||
$result = $dbh->prepare("SELECT userid, password, loginid, authcode FROM account WHERE userid = :userid");
|
||||
|
||||
$result->bindValue(':userid', $userid);
|
||||
// SQL実行
|
||||
$result->execute();
|
||||
|
||||
|
||||
if( empty($userid) ) {
|
||||
$error_message[] = 'ユーザーIDを入力してください。(USERID_INPUT_PLEASE)';
|
||||
} else {
|
||||
@@ -198,7 +195,7 @@ if( !empty($_POST['btn_submit']) ) {
|
||||
if($result->rowCount() > 0) {
|
||||
$row = $result->fetch(); // ここでデータベースから取得した値を $row に代入する
|
||||
|
||||
if($row["userid"] == $userid){
|
||||
if(strtolower($row["userid"]) == strtolower($userid)){
|
||||
if(uwuzu_password_verify($password,$row["password"])){
|
||||
if(empty($row["authcode"])){
|
||||
$_SESSION['userid'] = $userid;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
uwuzu
|
||||
1.6.0
|
||||
1.6.1
|
||||
2025/08/05
|
||||
daichimarukana,putonfps
|
||||
@@ -1,6 +1,11 @@
|
||||
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
|
||||
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
|
||||
|
||||
## Version 1.6.1 (Hapuego)
|
||||
2025/08/05
|
||||
fix: ログイン時にユーザーIDの大文字小文字が区別されてしまう問題を修正しました!
|
||||
fix: メンション時にうまく表示に反映されない問題を修正しました!
|
||||
|
||||
## Version 1.6.0 (Hapuego)
|
||||
2025/08/05
|
||||
fix: ローディングに時間がかかっている際に、ユーズの表示の順番が狂ってしまう問題を修正しました。
|
||||
|
||||
+5
-66
@@ -1,75 +1,14 @@
|
||||
{
|
||||
"software": "uwuzu",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"release_date": "2025/08/05",
|
||||
"release_notes": "このアップデートにはAPIの大幅強化や様々なバグの修正が含まれます!詳細はリリースノートをご覧ください。",
|
||||
"notices": "このアップデートには実行前にSQL構造の更新が必要です。\nまた、このアップデート前にデータのバックアップを行うことをおすすめします!\nアップデート後はキャッシュクリアをお忘れなく!",
|
||||
"release_notes": "このアップデートでは、メンションが正常に作動しない問題とログイン時にユーザーIDの大文字小文字が区別されてしまう問題を修正しました!\n詳細はリリースノートをご確認ください。",
|
||||
"notices": "アップデート前にデータのバックアップを行うことをおすすめします!\nアップデート後はキャッシュクリアをお忘れなく!",
|
||||
"files": {
|
||||
"overwrite": [
|
||||
"/.htaccess",
|
||||
"/.well-known/host-meta/index.php",
|
||||
"/.well-known/nodeinfo/index.php",
|
||||
"/.well-known/webfinger/index.php",
|
||||
"/.well-known/webfinger.php",
|
||||
"/.well-known/host-meta.php",
|
||||
"/.well-known/nodeinfo.php",
|
||||
"/actor/index.php",
|
||||
"/api/auth.php",
|
||||
"/api/favorite/change.php",
|
||||
"/api/favorite/get.php",
|
||||
"/api/me/index.php",
|
||||
"/api/me/notification/index.php",
|
||||
"/api/me/notification/read.php",
|
||||
"/api/me/settings/index.php",
|
||||
"/api/token/get.php",
|
||||
"/api/ueuse/bookmark/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",
|
||||
"/api/v1/instance.php",
|
||||
"/bookmark/bookmark.php",
|
||||
"/css/home.css",
|
||||
"/css/style.css",
|
||||
"/errorpage/httperror.php",
|
||||
"/function/delete_apitoken.php",
|
||||
"/function/function.php",
|
||||
"/home/index.php",
|
||||
"/img/titleimg/2.png",
|
||||
"/img/uwuzucolorlogo.svg",
|
||||
"/img/uwuzuicon.png",
|
||||
"/img/uwuzulogo.svg",
|
||||
"/function/get_userid.php",
|
||||
"/js/view_function.js",
|
||||
"/nextpage/bookmarktimeline.php",
|
||||
"/nextpage/followtimeline.php",
|
||||
"/nextpage/foryoutimeline.php",
|
||||
"/nextpage/localtimeline.php",
|
||||
"/nextpage/notification.php",
|
||||
"/nextpage/searchtimeline.php",
|
||||
"/nextpage/ueusetimeline.php",
|
||||
"/nextpage/userliketimeline.php",
|
||||
"/nextpage/usermediatimeline.php",
|
||||
"/nextpage/usertimeline.php",
|
||||
"/notification/index.php",
|
||||
"/others/index.php",
|
||||
"/others/token.php",
|
||||
"/search/index.php",
|
||||
"/settings/index.php",
|
||||
"/ueuse/index.php",
|
||||
"/ueuse/activity/index.php",
|
||||
"/user/index.php",
|
||||
"/user/outbox/index.php",
|
||||
"/uwuzu_error_code.txt",
|
||||
"/unsupported.php",
|
||||
"/check.php",
|
||||
"/authlogin.php",
|
||||
|
||||
"/login.php",
|
||||
"/server/uwuzuabout.txt",
|
||||
"/server/uwuzuinfo.txt",
|
||||
"/server/uwuzurelease.txt"
|
||||
|
||||
Reference in New Issue
Block a user