From f1e6550be28abf5d4e1c0db647f645db31071730 Mon Sep 17 00:00:00 2001 From: jamiesensei Date: Wed, 15 Nov 2006 07:26:48 +0000 Subject: [PATCH] needed to add the option to pass an element id rather than a name to index.php as the choose parameter. XHTML strict doesn't allow giving a form a name attribute so we use the id of the form element to select the element to return the filename to. We use getElementById to find the element in the document. --- files/index.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/files/index.php b/files/index.php index 35d4dc8345..0ba01bf723 100644 --- a/files/index.php +++ b/files/index.php @@ -23,7 +23,7 @@ $confirm = optional_param('confirm', 0, PARAM_BOOL); if ($choose) { - if (count(explode('.', $choose)) != 2) { + if (count(explode('.', $choose)) > 2) { error('Incorrect format for choose parameter'); } } @@ -78,7 +78,7 @@ print_header(); $chooseparts = explode('.', $choose); - + if (count($chooseparts)==2){ ?> + + + ', '»', "$course->shortname -> $fullnav"); echo ''; -- 2.39.5