mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-07-22 05:34:49 +01:00
[MIRROR] Encode changes (#11301)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5e6a4639d0
commit
4e2361f8df
@@ -30,7 +30,7 @@
|
||||
if("PRG_newtextfile")
|
||||
if(!HDD)
|
||||
return
|
||||
var/newname = sanitize(tgui_input_text(ui.user, "Enter file name or leave blank to cancel:", "File rename"))
|
||||
var/newname = tgui_input_text(ui.user, "Enter file name or leave blank to cancel:", "File rename", "", MAX_MESSAGE_LEN)
|
||||
if(!newname)
|
||||
return
|
||||
if(HDD.find_file_by_name(newname))
|
||||
@@ -66,7 +66,7 @@
|
||||
var/oldtext = html_decode(F.stored_data)
|
||||
oldtext = replacetext(oldtext, "\[br\]", "\n")
|
||||
|
||||
var/newtext = sanitize(replacetext(tgui_input_text(ui.user, "Editing file [F.filename].[F.filetype]. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH)
|
||||
var/newtext = replacetext(tgui_input_text(ui.user, "Editing file [F.filename].[F.filetype]. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]")
|
||||
if(!newtext)
|
||||
return
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
if(downloading || !loaded_article)
|
||||
return
|
||||
|
||||
var/savename = sanitize(tgui_input_text(ui.user, "Enter file name or leave blank to cancel:", "Save article", loaded_article.filename))
|
||||
var/savename = tgui_input_text(ui.user, "Enter file name or leave blank to cancel:", "Save article", loaded_article.filename, "", MAX_MESSAGE_LEN)
|
||||
if(!savename)
|
||||
return TRUE
|
||||
var/obj/item/computer_hardware/hard_drive/HDD = computer.hard_drive
|
||||
|
||||
@@ -134,7 +134,7 @@ var/global/nttransfer_uid = 0
|
||||
if(!remote || !remote.provided_file)
|
||||
return
|
||||
if(remote.server_password)
|
||||
var/pass = sanitize(tgui_input_text(ui.user, "Code 401 Unauthorized. Please enter password:", "Password required"))
|
||||
var/pass = tgui_input_text(ui.user, "Code 401 Unauthorized. Please enter password:", "Password required", "", MAX_MESSAGE_LEN)
|
||||
if(pass != remote.server_password)
|
||||
error = "Incorrect Password"
|
||||
return
|
||||
@@ -152,7 +152,7 @@ var/global/nttransfer_uid = 0
|
||||
provided_file = null
|
||||
return TRUE
|
||||
if("PRG_setpassword")
|
||||
var/pass = sanitize(tgui_input_text(ui.user, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none"))
|
||||
var/pass = tgui_input_text(ui.user, "Enter new server password. Leave blank to cancel, input 'none' to disable password.", "Server security", "none", MAX_MESSAGE_LEN)
|
||||
if(!pass)
|
||||
return
|
||||
if(pass == "none")
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
if(tgui_alert(ui.user, "Would you like to save your changes first?","Save Changes",list("Yes","No")) == "Yes")
|
||||
save_file(open_file)
|
||||
|
||||
var/newname = sanitize(tgui_input_text(ui.user, "Enter file name:", "New File"))
|
||||
var/newname = tgui_input_text(ui.user, "Enter file name:", "New File", "", MAX_MESSAGE_LEN)
|
||||
if(!newname)
|
||||
return TRUE
|
||||
var/datum/computer_file/data/F = create_file(newname)
|
||||
@@ -146,7 +146,7 @@
|
||||
return TRUE
|
||||
|
||||
if("PRG_saveasfile")
|
||||
var/newname = sanitize(tgui_input_text(ui.user, "Enter file name:", "Save As"))
|
||||
var/newname = tgui_input_text(ui.user, "Enter file name:", "Save As", "", MAX_MESSAGE_LEN)
|
||||
if(!newname)
|
||||
return TRUE
|
||||
var/datum/computer_file/data/F = create_file(newname, loaded_data)
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
if("PRG_savefile")
|
||||
if(!open_file)
|
||||
open_file = sanitize(tgui_input_text(ui.user, "Enter file name:", "Save As"))
|
||||
open_file = tgui_input_text(ui.user, "Enter file name:", "Save As", "", MAX_MESSAGE_LEN)
|
||||
if(!open_file)
|
||||
return 0
|
||||
if(!save_file(open_file))
|
||||
@@ -169,7 +169,7 @@
|
||||
var/oldtext = html_decode(loaded_data)
|
||||
oldtext = replacetext(oldtext, "\[br\]", "\n")
|
||||
|
||||
var/newtext = sanitize(replacetext(tgui_input_text(ui.user, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]"), MAX_TEXTFILE_LENGTH)
|
||||
var/newtext = replacetext(tgui_input_text(ui.user, "Editing file '[open_file]'. You may use most tags used in paper formatting:", "Text Editor", oldtext, MAX_TEXTFILE_LENGTH, TRUE, prevent_enter = TRUE), "\n", "\[br\]")
|
||||
if(!newtext)
|
||||
return
|
||||
loaded_data = newtext
|
||||
|
||||
Reference in New Issue
Block a user