From 17c9ed60aa534abddb1f66dbf2f8d733f3bf702f Mon Sep 17 00:00:00 2001
From: xiaomlove <353856593@qq.com>
Date: Wed, 17 Mar 2021 19:38:33 +0800
Subject: [PATCH] add technical info i18n
---
lang/chs/lang_functions.php | 1 +
lang/chs/lang_settings.php | 8 ++++----
lang/chs/lang_upload.php | 2 --
lang/cht/lang_functions.php | 2 ++
lang/cht/lang_settings.php | 6 ++++--
lang/en/lang_functions.php | 2 ++
lang/en/lang_settings.php | 8 +++++---
nexus/Field/Field.php | 2 +-
public/upload.php | 2 +-
9 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/lang/chs/lang_functions.php b/lang/chs/lang_functions.php
index c77efa27..ffd2a2a6 100644
--- a/lang/chs/lang_functions.php
+++ b/lang/chs/lang_functions.php
@@ -315,6 +315,7 @@ $lang_functions = array
'text_required' => '不能为空',
'text_invalid' => '非法',
'text_technical_info' => '技术信息',
+ 'text_technical_info_help_text' => '文件技术信息来自软件 MediaInfo,用该软件打开文件,点击菜单视图(View)->文件(Text),在框中右键->全选,再右键->复制,粘贴到这里来。'
);
?>
diff --git a/lang/chs/lang_settings.php b/lang/chs/lang_settings.php
index 69d693d0..1be60fc8 100644
--- a/lang/chs/lang_settings.php
+++ b/lang/chs/lang_settings.php
@@ -394,9 +394,9 @@ $lang_settings = array
'row_enable_imdb_system' => "开启IMDb系统",
'text_imdb_system_note' => "默认'是'。全局IMDb系统设定。",
'row_enable_pt_gen_system' => '开启 PT-Gen 系统',
- 'text_enable_pt_gen_system_note' => "默认'是'。全局 PT-Gen 系统设定。",
+ 'text_enable_pt_gen_system_note' => "默认'否'。全局 PT-Gen 系统设定。",
'row_pt_gen_api_point' => "PT-Gen 接口地址",
- 'text_pt_gen_api_point_note' => "默认 'https://ptgen.rhilip.info',不可用时参考文档自行搭建。",
+ 'text_pt_gen_api_point_note' => "默认 '',需要时参考文档自行搭建。",
'row_enable_school_system' => "开启学校系统",
'text_school_system_note' => "默认'否'。如果对这项功能不清楚,不要开启它。",
'row_restrict_email_domain' => "限制邮箱域",
@@ -455,7 +455,7 @@ $lang_settings = array
'text_priority_four' => "优先级4:",
'text_priority_four_note' => "删除未通过验证的账号,过期的登录尝试记录,过期的邀请码和图片验证码;清理用户账号(删除不活跃账号,账号升级、降级、禁用);发送上传的图片;更新用户总做种和下载时间。默认'43200',即24小时。",
'text_priority_five' => "优先级5:",
- 'text_priority_five_note' => "删除种子文件不存在的种子;锁定论坛的古老主题;删除古老的举报信息。默认'648000',即15天。",
+ 'text_priority_five_note' => "删除种子文件不存在的种子;锁定论坛的古老主题;删除古老的举报信息。默认'1296000',即15天。",
'text_cleanup_interval_note_two' => "注意:不要改变时间递增的排序。",
'row_signup_timeout' => "注册超时",
'text_signup_timeout_note' => "单位为秒。如用户在提交注册信息XXX秒后未通过验证,其账号将被删除。默认'259200',即3天。",
@@ -703,7 +703,7 @@ $lang_settings = array
'row_login_secret_lifetime' => '登录密钥有效期',
'text_login_secret_lifetime_deadline' => '当前密钥有效期至',
'row_enable_technical_info' => '启用技术信息',
- 'text_enable_technical_info' => "默认'是'。文件技术信息来自软件 MediaInfo Text 视图的结果",
+ 'text_enable_technical_info' => "默认'否'。文件技术信息来自软件 MediaInfo Text 视图的结果",
);
?>
diff --git a/lang/chs/lang_upload.php b/lang/chs/lang_upload.php
index 6f6cc2ed..e45c71e9 100644
--- a/lang/chs/lang_upload.php
+++ b/lang/chs/lang_upload.php
@@ -40,8 +40,6 @@ $lang_upload = array
'text_chinese_title' => "中文名:",
'text_english_title' => "英文名:",
'text_titles_note' => "(如果英文名不存在,使用拼音或不填写)",
- 'row_technical_info' => '技术信息',
- 'row_technical_info_help_text' => '文件技术信息来自软件 MediaInfo,用该软件打开文件,点击菜单视图(View)->文件(Text),在框中右键->全选,再右键->复制,粘贴到这里来。'
);
?>
diff --git a/lang/cht/lang_functions.php b/lang/cht/lang_functions.php
index 514f67d0..64606661 100644
--- a/lang/cht/lang_functions.php
+++ b/lang/cht/lang_functions.php
@@ -315,6 +315,8 @@ $lang_functions = array
'text_tag_mother_language_subtitle' => '中字',
'text_required' => '不能為空',
'text_invalid' => '非法',
+ 'text_technical_info' => '技術信息',
+ 'text_technical_info_help_text' => '文件技術信息來自軟件 MediaInfo,用該軟件打開文件,點擊菜單視圖(View)->文件(Text),在框中右鍵->全選,再右鍵->復制,粘貼到這裏來。'
);
?>
diff --git a/lang/cht/lang_settings.php b/lang/cht/lang_settings.php
index cf2c62a7..fa13ed1b 100644
--- a/lang/cht/lang_settings.php
+++ b/lang/cht/lang_settings.php
@@ -397,7 +397,7 @@ $lang_settings = array
'row_enable_pt_gen_system' => '開啟 PT-Gen 系統',
'text_enable_pt_gen_note' => "默認'是'。全局 PT-Gen 系統設定。",
'row_pt_gen_api_point' => "PT-Gen 接口地址",
- 'text_pt_gen_api_point_note' => "默認 'https://ptgen.rhilip.info',不可用時參考文檔自行搭建。",
+ 'text_pt_gen_api_point_note' => "默認 '',需要時參考文檔自行搭建。",
'row_enable_school_system' => "開啟學校系統",
'text_school_system_note' => "預設'否'。如果對這項功能不清楚,不要開啟它。",
'row_restrict_email_domain' => "限制郵箱域",
@@ -456,7 +456,7 @@ $lang_settings = array
'text_priority_four' => "優先級4:",
'text_priority_four_note' => "移除未通過驗證的賬號,過期的登入嘗試記錄,過期的邀請碼和圖片驗證碼;清理用戶賬號(移除不活躍賬號,賬號升級、降級、禁用);傳送上傳的圖片;更新用戶總做種和下載時間。預設'43200',即24小時。",
'text_priority_five' => "優先級5:",
- 'text_priority_five_note' => "移除種子檔案不存在的種子;鎖定論壇的古老主題;移除古老的舉報資訊。預設'648000',即15天。",
+ 'text_priority_five_note' => "移除種子檔案不存在的種子;鎖定論壇的古老主題;移除古老的舉報資訊。預設'1296000',即15天。",
'text_cleanup_interval_note_two' => "注意:不要改變時間遞增的排序。",
'row_signup_timeout' => "註冊逾時",
'text_signup_timeout_note' => "單位為秒。如用戶在提交註冊資訊XXX秒后未通過驗證,其賬號將被移除。預設'259200',即3天。",
@@ -702,6 +702,8 @@ $lang_settings = array
'text_login_secret_lifetime_unit' => '分鐘',
'row_login_secret_lifetime' => '登錄密鑰有效期',
'text_login_secret_lifetime_deadline' => '當前密鑰有效期至',
+ 'row_enable_technical_info' => '啟用技術信息',
+ 'text_enable_technical_info' => "默認'否'。文件技術信息來自軟件 MediaInfo Text 視圖的結果",
);
?>
diff --git a/lang/en/lang_functions.php b/lang/en/lang_functions.php
index e1b0c398..67c875c9 100644
--- a/lang/en/lang_functions.php
+++ b/lang/en/lang_functions.php
@@ -316,6 +316,8 @@ $lang_functions = array
'text_tag_mother_language_subtitle' => 'Mother language subtitle',
'text_required' => 'Required',
'text_invalid' => 'Invalid',
+ 'text_technical_info' => 'Technical Information',
+ 'text_technical_info_help_text' => 'Technical Information comes from software MediaInfo,open file, click the view menu > text > right click in the box > select all > copy > past into this box.'
);
?>
diff --git a/lang/en/lang_settings.php b/lang/en/lang_settings.php
index d05af6f9..0b42b7fb 100644
--- a/lang/en/lang_settings.php
+++ b/lang/en/lang_settings.php
@@ -394,9 +394,9 @@ $lang_settings = array
'row_enable_imdb_system' => "Enable IMDb system",
'text_imdb_system_note' => "Default 'yes'. System-wide IMDb info setting.",
'row_enable_pt_gen_system' => 'Enable PT-Gen system',
- 'text_enable_pt_gen_system_note' => "Default 'yes'. System-wide PT-Gen info setting.",
+ 'text_enable_pt_gen_system_note' => "Default 'no'. System-wide PT-Gen info setting.",
'row_pt_gen_api_point' => "PT-Gen api point",
- 'text_pt_gen_api_point_note' => "Default 'https://ptgen.rhilip.info', when broken, reference to Documatation to build yourself",
+ 'text_pt_gen_api_point_note' => "Default '', when required, reference to Documatation to build yourself",
'row_enable_school_system' => "Enable school system",
'text_school_system_note' => "Default 'no'. DO NOT enable this unless you know what you are doing!",
'row_restrict_email_domain' => "Restrict Email Domain",
@@ -455,7 +455,7 @@ $lang_settings = array
'text_priority_four' => "Priority 4: ",
'text_priority_four_note' => "Delete unconfirmed accounts, old login attempts, invite codes and regimage codes; Clean up user accounts (delete inactive ones, do account promotion and demotion, banning, etc.); Post uploaded image; Update total seeding and leeching time of users. Default '43200', i.e. 24 hours.",
'text_priority_five' => "Priority 5: ",
- 'text_priority_five_note' => "Delete torrents that doesn't exist any more; Lock very old forum topics; Delete very old report items. Default '648000', i.e. 15 days.",
+ 'text_priority_five_note' => "Delete torrents that doesn't exist any more; Lock very old forum topics; Delete very old report items. Default '1296000', i.e. 15 days.",
'text_cleanup_interval_note_two' => "NOTE: Do NOT change the ascendant order of the times!",
'row_signup_timeout' => "Signup Timeout",
'text_signup_timeout_note' => "In seconds. Delete unconfirmed users after XXX seconds. Default '259200', i.e. 3 days.",
@@ -702,6 +702,8 @@ $lang_settings = array
'text_login_secret_lifetime_unit' => 'minute',
'row_login_secret_lifetime' => 'Login secret lifetime',
'text_login_secret_lifetime_deadline' => 'Current login secret deadline',
+ 'row_enable_technical_info' => 'Enable Technical Information',
+ 'text_enable_technical_info' => "Default 'No'. Technical Information comes from software MediaInfo Text view",
);
?>
diff --git a/nexus/Field/Field.php b/nexus/Field/Field.php
index 81584fc2..466bb2bf 100644
--- a/nexus/Field/Field.php
+++ b/nexus/Field/Field.php
@@ -268,7 +268,7 @@ HEAD;
throw new \RuntimeException("Invalid search box: $browsecatmode");
}
$customValues = $this->listTorrentCustomField($torrentId);
- $sql = sprintf('select * from torrents_custom_fields where id in (%s)', $searchBox['custom_fields']);
+ $sql = sprintf('select * from torrents_custom_fields where id in (%s)', $searchBox['custom_fields'] ?: 0);
$res = sql_query($sql);
$html = '';
while ($row = mysql_fetch_assoc($res)) {
diff --git a/public/upload.php b/public/upload.php
index 498c54f5..84a0e0de 100644
--- a/public/upload.php
+++ b/public/upload.php
@@ -74,7 +74,7 @@ stdhead($lang_upload['head_upload']);
print("\n");
if ($settingMain['enable_technical_info'] == 'yes') {
- tr($lang_upload['row_technical_info'], '
' . $lang_upload['row_technical_info_help_text'], 1);
+ tr($lang_functions['text_technical_info'], '
' . $lang_functions['text_technical_info_help_text'], 1);
}
if ($allowtorrents){