From d38ea97fa4c6db8e6cf5fd182dbe27023d7319dd Mon Sep 17 00:00:00 2001 From: Ian Date: Sun, 20 Dec 2015 17:29:18 +0100 Subject: [PATCH] fix serendipity_plugin_api_core_event_hook conditions --- include/plugin_api.inc.php | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php index fd51fb7e..8bcb702c 100644 --- a/include/plugin_api.inc.php +++ b/include/plugin_api.inc.php @@ -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 ''; + case 'backend_save': + case 'backend_publish': + echo "\n".''."\n"; + break; - return true; - break; } }