1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-04 19:14:41 +00:00

uwuzu v1.4.8 Funium

This commit is contained in:
Daichimarukana
2024-11-14 21:39:31 +09:00
parent 6cdad111f0
commit eb28cc49cc
6 changed files with 96 additions and 79 deletions
+18 -12
View File
@@ -1394,20 +1394,26 @@ function val_OtherSettings($dataname, $jsontext){
//ユーザーのOther_Settings追加関数
function val_AddOtherSettings($dataname, $data, $jsontext){
$other_settings = json_decode($jsontext, true);
if(isset($dataname) && isset($data) && isset($jsontext)) {
if(is_bool($data) === true){
$new_data = [$dataname=>$data];
$ret = json_encode(array_merge($other_settings,$new_data));
}elseif(is_int($data) === true){
$new_data = [$dataname=>(int)$data];
$ret = json_encode(array_merge($other_settings,$new_data));
}elseif(is_string($data)){
$new_data = [$dataname=>$data];
$ret = json_encode(array_merge($other_settings,$new_data));
}
if(empty($other_settings)){
$new_data = [$dataname=>$data];
$ret = json_encode($new_data);
}else{
$ret = false;
if(isset($dataname) && isset($data) && isset($jsontext)) {
if(is_bool($data) === true){
$new_data = [$dataname=>$data];
$ret = json_encode(array_merge($other_settings,$new_data));
}elseif(is_int($data) === true){
$new_data = [$dataname=>(int)$data];
$ret = json_encode(array_merge($other_settings,$new_data));
}elseif(is_string($data)){
$new_data = [$dataname=>$data];
$ret = json_encode(array_merge($other_settings,$new_data));
}
}else{
$ret = false;
}
}
return $ret;
}
?>
+1 -1
View File
@@ -1,4 +1,4 @@
uwuzu
1.4.7
1.4.8
2024/11/14
daichimarukana,putonfps
+6
View File
@@ -1,6 +1,12 @@
## リリースノートだぜぇぇぇぇぇぇい!!!!!!!
ここにはuwuzuの更新情報を載せてくぜぇ~!(いやまてテンションおかしいだろ...)
## Version 1.4.8 (Funium)
2024/11/14
fix: アップデート時にフォルダの階層が更新されない問題を修正しました!!
fix: 設定画面で重大なエラーが発生する問題を修正しました!
fix: 設定の保存ができない問題を修正しました!
## Version 1.4.7 (Funium)
2024/11/14
fix: 未使用のライブラリのライセンス情報が表示されてしまう問題を修正しました。
+11 -2
View File
@@ -235,7 +235,12 @@ if( !empty($_POST['btn_submit']) ) {
$mailadds = safetext($_POST['mailadds']);
$new_isAIBlock = safetext($_POST['isAIBlock']);
if( !empty($_POST['isAIBlock']) ) {
$new_isAIBlock = safetext($_POST['isAIBlock']);
}else{
$new_isAIBlock = "false";
}
if($new_isAIBlock === "true"){
$save_isAIBlock = true;
}else{
@@ -243,7 +248,11 @@ if( !empty($_POST['btn_submit']) ) {
}
$other_settings_json = val_AddOtherSettings("isAIBlock", $save_isAIBlock, $userData["other_settings"]);
$new_isAIBMW = safetext($_POST['isAIBMW']);
if( !empty($_POST['isAIBMW']) ) {
$new_isAIBMW = safetext($_POST['isAIBMW']);
}else{
$new_isAIBMW = "false";
}
if($new_isAIBMW === "true"){
$save_isAIBMW = true;
}else{
+55 -47
View File
@@ -180,55 +180,63 @@ $notiData = $notiQuery->fetch(PDO::FETCH_ASSOC);
$notificationcount = $notiData['notification_count'];
if( !empty($_POST['update_submit']) ) {
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['extract_path'])) {
$extractPath = safetext($_POST['extract_path']);
// JSONファイルの再読み込み
$jsonFile = $extractPath . '/update.json';
if (file_exists($jsonFile)) {
$jsonData = json_decode(file_get_contents($jsonFile), true);
if (json_last_error() === JSON_ERROR_NONE) {
// 上書きファイルの処理
if(!(empty($jsonData['files']['overwrite']))){
foreach ($jsonData['files']['overwrite'] as $file) {
$sourceFile = $extractPath . '/' . $file;
$destinationFile = $_SERVER['DOCUMENT_ROOT'] . '/' . $file;
if (file_exists($sourceFile)) {
copy($sourceFile, $destinationFile);
}else{
$error_message[] = "アップデート元のzipファイルに本来予定されていたファイルがありませんでしたが、アップデート作業は完了しました。(UPDATE_FILE_NOT_FOUND)";
}
}
}
// 削除ファイルの処理
if(!(empty($jsonData['files']['delete']))){
foreach ($jsonData['files']['delete'] as $file) {
$deleteFile = $_SERVER['DOCUMENT_ROOT'] . '/' . $file;
if (file_exists($deleteFile)) {
unlink($deleteFile);
}else{
$error_message[] = "削除予定のファイルがありませんでしたが、アップデート作業は完了しました。(DELETE_FILE_NOT_FOUND)";
}
}
}
} else {
$error_message[] = "update.jsonがうまく読み込めませんでした。(LOADING_ERROR)";
}
} else {
$error_message[] = "update.jsonが見つかりませんでした。(LOADING_ERROR)";
}
if (!empty($_POST['update_submit'])) {
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['extract_path'])) {
$extractPath = safetext($_POST['extract_path']);
// JSONファイルの再読み込み
$jsonFile = $extractPath . '/update.json';
if (file_exists($jsonFile)) {
$jsonData = json_decode(file_get_contents($jsonFile), true);
if (json_last_error() === JSON_ERROR_NONE) {
// 上書きファイルの処理
if (!(empty($jsonData['files']['overwrite']))) {
foreach ($jsonData['files']['overwrite'] as $file) {
$sourceFile = $extractPath . '/' . $file;
$destinationFile = $_SERVER['DOCUMENT_ROOT'] . '/' . $file;
if (file_exists($extractPath)) {
if (is_dir($extractPath)) {
deleteDirectory($extractPath);
}
}
} else {
$error_message[] = "不正なリクエストです。(BAD_REQUEST)";
}
if (file_exists($sourceFile)) {
// ディレクトリが存在しない場合は作成
$destinationDir = dirname($destinationFile);
if (!file_exists($destinationDir)) {
mkdir($destinationDir, 0775, true);
}
copy($sourceFile, $destinationFile);
} else {
$error_message[] = "アップデート元のzipファイルに本来予定されていたファイルがありませんでしたが、アップデート作業は完了しました。(UPDATE_FILE_NOT_FOUND)";
}
}
}
// 削除ファイルの処理
if (!(empty($jsonData['files']['delete']))) {
foreach ($jsonData['files']['delete'] as $file) {
$deleteFile = $_SERVER['DOCUMENT_ROOT'] . '/' . $file;
if (file_exists($deleteFile)) {
unlink($deleteFile);
} else {
$error_message[] = "削除予定のファイルがありませんでしたが、アップデート作業は完了しました。(DELETE_FILE_NOT_FOUND)";
}
}
}
} else {
$error_message[] = "update.jsonがうまく読み込めませんでした。(LOADING_ERROR)";
}
} else {
$error_message[] = "update.jsonが見つかりませんでした。(LOADING_ERROR)";
}
if (file_exists($extractPath)) {
if (is_dir($extractPath)) {
deleteDirectory($extractPath);
}
}
} else {
$error_message[] = "不正なリクエストです。(BAD_REQUEST)";
}
}
require('../logout/logout.php');
?>
<!DOCTYPE html>
+5 -17
View File
@@ -1,26 +1,14 @@
{
"software": "uwuzu",
"version": "1.4.7",
"version": "1.4.8",
"release_date": "2024-11-14",
"release_notes": "このアップデートではAI学習対策を中心に様々な新機能の追加がされています!\nまた、いくつかのバグ修正が含まれています\nアップデートを推奨します!!",
"notices": "アップデートの前に、データベースの構造の更新をお忘れなく!\n合わせてデータのバックアップを行うことをおすすめします!",
"release_notes": "このアップデートでは設定画面で発生する重大なバグ修正れています\n早急なアップデートを推奨します",
"notices": "アップデートの前にデータのバックアップを行うことをおすすめします!",
"files": {
"overwrite": [
"/abi/addabi.php",
"/actor/index.php",
"/css/home.css",
"/function/function.php",
"/function/reuse.php",
"/home/index.php",
"/settings/index.php",
"/settings_admin/plugin_settings/aiblockwatermark_settings.php",
"/settings_admin/plugin_admin.php",
"/settings_admin/serveradmin.php",
"/ueuse/index.php",
"/user/followers/index.php",
"/user/following/index.php",
"/user/outbox/index.php",
"/user/index.php",
"/settings_admin/update_admin.php",
"/function/function.php",
"/server/uwuzuabout.txt",
"/server/uwuzuinfo.txt",
"/server/uwuzurelease.txt"