@@ -941,13 +941,13 @@ function export_build_backup() : void
941941 $ select ->add_option (new HTMLOption ("win " , "Windows (x64) " ));
942942 $ select ->add_option (new HTMLOption ("linux " , "Linux (x64) " ));
943943 $ select ->add_option (new HTMLOption ("mac " , "macOS (x64) " ));
944- $ select ->add_option (new HTMLOption ("linux_arm64 " , "Linux (arm64) " ));
945- $ select ->add_option (new HTMLOption ("mac_arm64 " , "macOS (arm64) " ));
944+ $ select ->add_option (new HTMLOption ("linux-arm64 " , "Linux (arm64) " ));
945+ $ select ->add_option (new HTMLOption ("mac-arm64 " , "macOS (arm64) " ));
946946 $ form ->add_select ($ select );
947947 $ form ->add_button (new HTMLButton ("backupRequest " , "submit " , "Backup Request " ));
948948 $ form ->print ();
949949
950- if (!isset ($ _POST ['os ' ]) || !is_string ($ _POST ['os ' ]) || !in_array ($ _POST ['os ' ], array ("win " , "linux " , "mac " , "linux_arm64 " , "mac_arm64 " )))
950+ if (!isset ($ _POST ['os ' ]) || !is_string ($ _POST ['os ' ]) || !in_array ($ _POST ['os ' ], array ("win " , "linux " , "mac " , "linux-arm64 " , "mac-arm64 " )))
951951 {
952952 return ;
953953 }
@@ -962,8 +962,10 @@ function export_build_backup() : void
962962 $ s_os = mysqli_real_escape_string ($ db , $ _POST ['os ' ]);
963963 $ s_url_prefix = mysqli_escape_string ($ db , "https://github.com/RPCS3/rpcs3-binaries- {$ _POST ['os ' ]}/releases/download/build- " );
964964
965- $ q_builds = mysqli_query ($ db , "SELECT CONCAT(' {$ s_url_prefix }', `commit`, '/', `filename_ {$ s_os }`) AS `url`
966- FROM `builds` WHERE `filename_ {$ s_os }` IS NOT NULL AND `filename_ {$ s_os }` <> ''
965+ $ s_rowname = mysqli_real_escape_string ($ db , "filename_ " .str_replace ('- ' , '_ ' , $ _POST ['os ' ]));
966+
967+ $ q_builds = mysqli_query ($ db , "SELECT CONCAT(' {$ s_url_prefix }', `commit`, '/', ` {$ s_rowname }`) AS `url`
968+ FROM `builds` WHERE ` {$ s_rowname }` IS NOT NULL AND ` {$ s_rowname }` <> ''
967969 ORDER BY `merge_datetime` DESC; " );
968970
969971 mysqli_close ($ db );
0 commit comments