added on local at 2026-07-01 22:09:32
| 1 | #!/usr/bin/perl | |
| 2 | #====================================================================== | |
| 3 | # ShopCart -- legacy redirect. | |
| 4 | # | |
| 5 | # The standalone edit form has been retired in favour of the full | |
| 6 | # upload_model.cgi flow, which now handles both NEW models (?model_id absent) | |
| 7 | # and EDIT of existing ones (?model_id=N). Any old bookmark / link | |
| 8 | # pointing here is bounced to /upload_model.cgi?model_id=N so the user lands | |
| 9 | # on the same canonical form regardless of entry point. | |
| 10 | #====================================================================== | |
| 11 | use strict; | |
| 12 | use warnings; | |
| 13 | use CGI; | |
| 14 | ||
| 15 | my $q = CGI->new; | |
| 16 | my $id = $q->param('id') || ''; | |
| 17 | $id =~ s/[^0-9]//g; | |
| 18 | ||
| 19 | my $dest = $id ? "/upload_model.cgi?model_id=$id" : '/models.cgi'; | |
| 20 | ||
| 21 | print "Status: 302 Found\nLocation: $dest\nCache-Control: no-store\n\n"; |