From: hickert Date: Wed, 14 Dec 2005 07:41:32 +0000 (+0000) Subject: Fixed tidy X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8761d962ebeee32bd0ea20063a50447b59fe34e5;p=gosa.git Fixed tidy Fixed tidy git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2307 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/main.php b/html/main.php index f4ad508e8..8c9e1bd48 100644 --- a/html/main.php +++ b/html/main.php @@ -223,7 +223,7 @@ if (isset($plug)){ } if ($_SESSION['js']==FALSE){ $smarty->assign("javascript", "false"); - $smarty->assign("help_method", "href='helpviewer.php$plug' target='_new'"); + $smarty->assign("help_method", "href='helpviewer.php$plug' target='_blank'"); } else { $smarty->assign("javascript", "true"); $smarty->assign("help_method"," onclick=\"return popup('helpviewer.php$plug','GOsa help');\""); @@ -301,14 +301,11 @@ if ($error_collector != ""){ } $display= $header.$smarty->fetch(get_template_path('framework.tpl')); -/* For development, perform a W3C conformance check if specified in gosa.conf */ -if (isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->data['MAIN']['W3CTEST'])) { - - /* Use PHP tidy for debugging */ +/*if (isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->data['MAIN']['W3CTEST'])) { $tidy = new tidy(); $config = array('indent' => TRUE, - 'output-xhtml' => TRUE, - 'wrap' => 200); + 'output-xhtml' => TRUE, + 'wrap' => 200); $display = tidy_parse_string($display, $config, 'UTF8'); tidy_clean_repair($display); $cnt = (tidy_error_count($display))+(tidy_warning_count($display)); @@ -319,6 +316,19 @@ if (isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->da } tidy_clean_repair($display); } +*/ + +if ((isset($config->data['MAIN']['W3CTEST']) && preg_match('/true/i', $config->data['MAIN']['W3CTEST']))&&(!empty($display))) { + tidy_parse_string($display); + $err = nl2br(htmlentities(tidy_get_error_buffer())); + + if($err){ + echo "
\"W3C\" "._("Generating this page caused the W3C conformance checker to raise some errors!")."
"; + tidy_clean_repair($display); +} /* Show page... */ echo $display;