upport missing 7cf4c12 and e5b28180a5

This commit is contained in:
Ian 2014-03-05 12:41:03 +01:00
parent 703d9f2ce0
commit 9fecaf1372

View File

@ -32,6 +32,24 @@ function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData,
?>
<script src="<?php echo $serendipity['serendipityHTTPPath']; ?>templates/jquery.js"></script>
<script>jQuery.noConflict();</script>
<?php
}
// add a global available (index.tpl; admin/index.tpl; preview_iframe.tpl) redirect error string function used by errorToExceptionHandler()
// hardened by admin only - better have that here, to be reachable everywhere
if ($serendipity['production'] === true) {
if( $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN ) {
?>
<script type="text/javascript">
function create(htmlStr) {
var frag = document.createDocumentFragment(),
temp = document.createElement("div");
temp.innerHTML = htmlStr;
while (temp.firstChild) {
frag.appendChild(temp.firstChild);
}
return frag;
}
</script>
<?php
}
}