Removing wrong css called that generates error_logs

skala
Julio Montoya 14 years ago
parent 4a74743fa2
commit f3de1cf58b
  1. 46
      main/inc/lib/display.lib.php
  2. 10
      main/inc/lib/main_api.lib.php

@ -314,19 +314,7 @@ class Display {
// Filter message
$message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding());
}
if (!headers_sent()) {
echo '
<style type="text/css" media="screen, projection">
/*<![CDATA[*/
@import "'.api_get_path(WEB_CODE_PATH).'css/default.css";
/*]]>*/
</style>'; // TODO: There is no "default.css" file in this location.
}
echo '<div class="normal-message">';
//Display :: display_icon('message_normal.gif', get_lang('InfoMessage'), array ('style' => 'float:left; margin-right:10px;'));
/*
get_lang('InfoMessage', array ('style' => 'float:left; margin-right:10px;'));
*/
echo '<div class="normal-message">';
echo $message.'</div>';
}
@ -344,19 +332,7 @@ class Display {
// Filter message
$message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding());
}
if (!headers_sent()) {
echo '
<style type="text/css" media="screen, projection">
/*<![CDATA[*/
@import "'.api_get_path(WEB_CODE_PATH).'css/default.css";
/*]]>*/
</style>'; // TODO: There is no "default.css" file in this location.
}
echo '<div class="warning-message">';
//Display :: display_icon('message_warning.png', get_lang('WarningMessage'), array ('style' => 'float:left; margin-right:10px;'));
/*
get_lang('WarningMessage', array ('style' => 'float:left; margin-right:10px;'));
*/
echo $message.'</div>';
}
@ -373,19 +349,7 @@ class Display {
// Filter message
$message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding());
}
if (!headers_sent()) {
echo '
<style type="text/css" media="screen, projection">
/*<![CDATA[*/
@import "'.api_get_path(WEB_CODE_PATH).'css/default.css";
/*]]>*/
</style>'; // TODO: There is no "default.css" file in this location.
}
echo '<div class="confirmation-message">';
//Display :: display_icon('message_confirmation.gif', get_lang('ConfirmationMessage'), array ('style' => 'float:left; margin-right:10px;margin-left:5px;'));
/*
get_lang('ConfirmationMessage', array ('style' => 'float:left; margin-right:10px;margin-left:5px;'));
*/
echo $message.'</div>';
}
@ -405,14 +369,6 @@ class Display {
// Filter message
$message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding());
}
if (!headers_sent()) {
echo '
<style type="text/css" media="screen, projection">
/*<![CDATA[*/
@import "'.api_get_path(WEB_CODE_PATH).'css/default.css";
/*]]>*/
</style>'; // TODO: There is no "default.css" file in this location.
}
echo '<div class="error-message">'.$message.'</div>';
}

@ -2287,11 +2287,9 @@ function api_not_allowed($print_headers = false) {
global $this_section;
$origin = isset($_GET['origin']) ? $_GET['origin'] : '';
if ($origin == 'learnpath') {
echo '
<style type="text/css" media="screen, projection">
/*<![CDATA[*/
echo '<style type="text/css" media="screen, projection">
/*<![CDATA[*/
@import "'.api_get_path(WEB_CODE_PATH).'css/'.api_get_setting('stylesheets').'/default.css";
/*]]>*/
</style>';
@ -2356,12 +2354,12 @@ function api_not_allowed($print_headers = false) {
echo '</div>';
if ($print_headers && $origin != 'learnpath') {Display::display_footer();}
die();
}
}
//if no course ID was included in the requested URL, redirect to homepage
if ($print_headers && $origin != 'learnpath') { Display::display_header(''); }
echo '<div align="center">';
Display::display_error_message(get_lang('NotAllowed').'<br /><br /><a href="'.$home_url.'">'.get_lang('PleaseLoginAgainFromHomepage').'</a><br />', false);
echo '</div>';
echo '</div>';
if ($print_headers && $origin != 'learnpath') { Display::display_footer(); }
die();
}

Loading…
Cancel
Save