Archived
1
0

fix serendipity_plugin_api_core_event_hook conditions

This commit is contained in:
Ian
2015-12-20 17:29:18 +01:00
parent 8897bf5e4d
commit d38ea97fa4
+8 -12
View File
@@ -83,23 +83,19 @@ function errorHandlerCreateDOM(htmlStr) {
break;
case 'external_plugin':
switch ($eventData) {
case 'admin/serendipity_editor.js':
header('Content-Type: application/javascript');
global $serendipity;
if ($eventData == 'admin/serendipity_editor.js') {
header('Content-Type: application/javascript');
global $serendipity;
echo serendipity_smarty_show('admin/serendipity_editor.js.tpl', null, 'JS', 'include/plugin_api.inc.php:external_plugin');
break;
echo serendipity_smarty_show('admin/serendipity_editor.js.tpl', null, 'JS', 'include/plugin_api.inc.php:external_plugin');
}
break;
case 'backend_save':
case 'backend_publish':
// this is preview_iframe.tpl updertHooks
echo '<script>document.addEventListener("DOMContentLoaded", function() { if (window.parent.Modernizr.indexedDB) { window.parent.serendipity.eraseEntryEditorCache(); } });</script>';
case 'backend_save':
case 'backend_publish':
echo "\n".'<script>document.addEventListener("DOMContentLoaded", function() { if (window.parent.Modernizr.indexedDB) { window.parent.serendipity.eraseEntryEditorCache(); } });</script>'."\n";
break;
return true;
break;
}
}