From 005f72921d0688202eef597f6bed4f64133ed7c1 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 5 Nov 2023 14:04:26 -0500 Subject: [PATCH] file_section no --- wrenchboard/src/shared_tool/media.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/wrenchboard/src/shared_tool/media.cc b/wrenchboard/src/shared_tool/media.cc index 6f0967a1..23860825 100644 --- a/wrenchboard/src/shared_tool/media.cc +++ b/wrenchboard/src/shared_tool/media.cc @@ -105,20 +105,18 @@ long WrenchSaveStoredMedia(CVars in, CVars &out) { try { // REQ_STRING(in, "file_section", 5, 40, "(.*)"); - long file_section_no = REQ_LONG( in, "file_section_no", 1, -1 ); + long file_section_no = REQ_LONG( in, "file_section", 1, -1 ); REQ_STRING(in, "sessionid", 3, 150, "(.*)"); //snprintf(file_section, sizeof (file_section), "%s", in["file_section"].c_str()); switch(file_section_no){ case WRENCH_FILE_PROFILE: - - REQ_STRING(in, "uid", 3, 150, "(.*)"); - REQ_STRING(in, "profile", 5, 40, "(.*)"); - pgsql_exec("UPDATE members SET profile_pic='%s' " + REQ_STRING(in, "uid", 3, 150, "(.*)"); + REQ_STRING(in, "profile", 5, 40, "(.*)"); + pgsql_exec("UPDATE members SET profile_pic='%s' " " WHERE uid='%s'",in["profile"].c_str(), in["file_uid"].c_str()); - - snprintf(vname, sizeof (vname), "SELECT * FROM members WHERE uid ='%s'", in["file_uid"].c_str()); + snprintf(vname, sizeof (vname), "SELECT * FROM members WHERE uid ='%s'", in["file_uid"].c_str()); break; case WRENCH_FILE_MYFILE: