Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Update & Add Traditional Chinese Translation #81

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 35 additions & 7 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@
"del" => "Изтриване",
"log_out" => "Изход"
);

//Catalan
$_TRANSLATIONS["ca"] = array(
"file_name" => "Nom d'arxiu",
Expand Down Expand Up @@ -1049,6 +1050,38 @@
"del" => "删除"
);

// 正體中文(Traditional Chinese)
$_TRANSLATIONS["zh_TW"] = array(
"file_name" => "檔案名稱",
"size" => "檔案大小",
"last_changed" => "最後更改",
"total_used_space" => "總共大小",
"free_space" => "剩餘空間",
"password" => "密碼",
"upload" => "上傳檔案",
"failed_upload" => "上傳失敗",
"failed_move" => "移動失敗",
"wrong_password" => "密碼錯誤",
"make_directory" => "建立新資料夾",
"new_dir_failed" => "資料夾新增失敗",
"chmod_dir_failed" => "無法更改資料夾權限",
"unable_to_read_dir" => "無法讀取資料夾",
"location" => "位置",
"root" => "根目錄",
"log_file_permission_error" => "本程式沒有權限寫入記錄檔",
"upload_not_allowed" => "不允許在這個資料夾上傳檔案",
"upload_dir_not_writable" => "這個資料夾沒有寫入權限",
"mobile_version" => "手機模式",
"standard_version" => "標準模式",
"page_load_time" => "執行使用%.2f毫秒",
"wrong_pass" => "帳號或密碼錯誤",
"username" => "帳號",
"log_in" => "登入",
"upload_type_not_allowed" => "不允許上傳這種類型的檔案",
"del" => "刪除",
"log_out" => "登出",
);

/***************************************************************************/
/* CSS FOR TWEAKING THE DESIGN */
/***************************************************************************/
Expand Down Expand Up @@ -2017,12 +2050,9 @@ public static function isUser($userName, $userPass)
{
foreach(EncodeExplorer::getConfig("users") as $user)
{
if($user[1] == $userPass)
if($userName == $user[0] && $user[1] == $userPass)
{
if(strlen($userName) == 0 || $userName == $user[0])
{
return true;
}
return true;
}
}
return false;
Expand Down Expand Up @@ -2163,8 +2193,6 @@ function uploadFile($location, $userfile)
{
global $encodeExplorer;
$name = basename($userfile['name']);
if(get_magic_quotes_gpc())
$name = stripslashes($name);

$upload_dir = $location->getFullPath();
$upload_file = $upload_dir . $name;
Expand Down