summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e66ab7)
raw | patch | inline | side by side (parent: 0e66ab7)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 14 Dec 2005 07:41:32 +0000 (07:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 14 Dec 2005 07:41:32 +0000 (07:41 +0000) |
Fixed tidy
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2307 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2307 594d385d-05f5-0310-b6e9-bd551577e9d8
html/main.php | patch | blob | history |
diff --git a/html/main.php b/html/main.php
index f4ad508e8049e153cfb2ab410cd5ce4894547c2c..8c9e1bd48b5b54eeecbb4ec4ebc5968947c2e296 100644 (file)
--- a/html/main.php
+++ b/html/main.php
}
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');\"");
}
$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 "<table summary=\"\" width=\"100%\" style='background-color:#E0E0E0;border-bottom:1px solid black'><tr><td><img alt=\"W3C\" align=\"middle\" src='images/warning.png'> <font style='font-size:14px;font-weight:bold'>"._("Generating this page caused the W3C conformance checker to raise some errors!")."</font></td><td align=right><button onClick='toggle(\"w3cbox\")'>"._("Toggle information")."</ button></td></tr></table><div id='w3cbox' style='width:100%; position:absolute; z-index:0; visibility: hidden; background-color:white; border- bottom:1px solid black;'>";
+ }
+
+ echo $err."</div>";
+ tidy_clean_repair($display);
+}
/* Show page... */
echo $display;