some more verbose doc notes in 2aab3f

This commit is contained in:
Ian 2013-05-29 12:52:44 +02:00
parent 2aab3f9ca4
commit b0af9f201a

View File

@ -140,7 +140,7 @@ if (!function_exists('errorToExceptionHandler')) {
if (headers_sent()) {
serendipity_die($str); // case HTTP headers: needs to halt with die() here, else it will path through and gets written underneath blog content, which hardly isn't seen by many users
} else {
// react on non eye-displayed errors with following small javascript, while being in tags like <select> to push on top of page, else return $str just there
// this also reacts on non eye-displayed errors with following small javascript, while being in tags like <select> to push on top of page, else return non javascript use $str just there
echo '<noscript>' . $str . '</noscript>' . "\n<script>" . '
function create(htmlStr) {
var frag = document.createDocumentFragment(),
@ -155,6 +155,7 @@ var fragment = create("Error redirect: '.addslashes($str).'");
// You can use native DOM methods to insert the fragment:
document.body.insertBefore(fragment, document.body.childNodes[0]);
' . "\n</script>\n";
// sadly we can't use HEREDOC notation here as this does not execute the javascript after finished writing
}
}
}