From 9610a66e212522915b1970e6822ec64222fdc263 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 7 Sep 2004 07:38:44 +0000 Subject: [PATCH] Allow Validator from http://validator.w3.org/ and the Cynthia 508 checker. It only works when you are using the new standardxhtml theme. This is temporary while we do testing and validation. I highly advise using Mozilla/Firefox and the Web Developer extension http://www.chrispederick.com/work/firefox/webdeveloper/ --- lib/setup.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/setup.php b/lib/setup.php index 86678ddc86..f846ecbd69 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -264,4 +264,15 @@ } } + if ($CFG->theme == 'standardxhtml') { // Temporary measure to help with XHTML validation + if (empty($_SESSION['USER'])) { // Allow W3CValidator in as user called w3cvalidator (or guest) + if ((strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') !== false) or + (strpos($_SERVER['HTTP_USER_AGENT'], 'Cynthia') !== false ) { + if (!$USER = get_user_info_from_db("username", "w3cvalidator")) { + $USER = guest_user(); + } + } + } + } + ?> -- 2.39.5