From b2aca587fceadcf4c690ba0d48506c02289cd67b Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 7 Dec 2016 16:12:30 -0800 Subject: [PATCH] Backward compatibility fix. Javascripts may have failed to load in the admin area for some v1.x plugins. --- e107_admin/header.php | 18 ++++++++++++++---- .../comment_menu/comment_menu_template.php | 2 +- e107_plugins/online/online_menu.php | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/e107_admin/header.php b/e107_admin/header.php index 601603e27..873da70bf 100644 --- a/e107_admin/header.php +++ b/e107_admin/header.php @@ -336,12 +336,22 @@ $jslib->renderHeader('admin', false); e107::getJs()->renderJs('header', 2); e107::getJs()->renderJs('header_inline', 2); -//DEPRECATED - use e107::getJs()->headerFile('{e_PLUGIN}myplug/js/my.js', $zone = 2) -if (isset($eplug_js) && $eplug_js) +/* @deprecated -use e107::js('myplug','js/my.js') instead; */ +if (!empty($eplug_js)) { - e107::getMessage()->addDebug('Deprecated $eplug_js method detected. Use e107::js() function inside an e_header.php file instead.'.print_a($eplug_js,true)); + e107::getMessage()->addDebug('Deprecated $eplug_js method detected. Use e107::js() function inside an e_header.php file instead.'.print_a($eplug_js,true)); echo "\n\n"; - echo "\n"; + + if(!is_array($eplug_js)) + { + $eplug_js = array($eplug_js); + } + + foreach($eplug_js as $vjss) + { + echo "\n"; + } + } //FIXME - theme.js/user.js should be registered/rendered through e_jsmanager diff --git a/e107_plugins/comment_menu/comment_menu_template.php b/e107_plugins/comment_menu/comment_menu_template.php index 0bc25a435..6ee1d84a9 100644 --- a/e107_plugins/comment_menu/comment_menu_template.php +++ b/e107_plugins/comment_menu/comment_menu_template.php @@ -35,7 +35,7 @@ if (!isset($COMMENT_MENU_TEMPLATE)) $COMMENT_MENU_TEMPLATE['item'] = "
  • {CM_URL_PRE}{CM_TYPE} {CM_HEADING}{CM_URL_POST}
    {CM_COMMENT}
    - {CM_AUTHOR} {CM_DATESTAMP} + {CM_AUTHOR} {CM_DATESTAMP}
  • "; $COMMENT_MENU_TEMPLATE['end'] = ""; diff --git a/e107_plugins/online/online_menu.php b/e107_plugins/online/online_menu.php index 894b1b251..6db7cee54 100644 --- a/e107_plugins/online/online_menu.php +++ b/e107_plugins/online/online_menu.php @@ -83,7 +83,7 @@ else {ONLINE_MEMBER_NEWEST}
  • {ONLINE_MOST} - + {ONLINE_MOST_GUESTS} {ONLINE_MOST_MEMBERS} {ONLINE_MOST_DATESTAMP}