+# backwards compatibility stuff
+debug( "SCRIPT_URL=$ENV{SCRIPT_URL} SCRIPT_URI=$ENV{SCRIPT_URI}" ) if DEBUG;
+
+if ($ENV{SCRIPT_URL} =~ m|^/cgi-bin/search_|) {
+ error( "You reached this site over an old URL. ".
+ "Depending on the exact parameters your search might work or not." );
+ # contents search changed a lot
+ if ($ENV{SCRIPT_URL} =~ m|^/cgi-bin/search_contents|) {
+ $input->param('keywords',$input->param('word')) if $input->param('word');
+ $input->param('searchon','contents');
+ for ($input->param('searchmode')) {
+ /^searchfiles/ && do {
+ $input->param('mode','filename');
+ last;
+ };
+ /^filelist/ && do {
+ $ENV{PATH_INFO} = '/'.join('/',($input->param('version')||'stable',
+ $input->param('keywords'),
+ $input->param('arch')||'i386',
+ 'filelist' ));
+ $input->delete('searchon','version','keywords','arch');
+ last;
+ };
+ }
+ }
+}
+if ($ENV{is_reportbug}) {
+ $input->param('exact', 1);
+ debug( "reportbug detected, set paramater exact to '1'" ) if DEBUG;
+}
+