From 312c886d62fb3ee60e92a40270701aab1ea6d605 Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 20 Nov 2012 15:33:36 +0100 Subject: [PATCH] last commits switch to functions_plugins_admin.inc too --- include/functions_plugins_admin.inc.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/functions_plugins_admin.inc.php b/include/functions_plugins_admin.inc.php index 27e58c23..e78c155a 100644 --- a/include/functions_plugins_admin.inc.php +++ b/include/functions_plugins_admin.inc.php @@ -212,7 +212,8 @@ function show_plugins($event_only = false, $sidebars = null) $data['total'] = $total; $serendipity['smarty']->assign($data); - $tfile = dirname(__FILE__) . "/admin/tpl/show_plugins.fnc.tpl"; + $tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl'; + $tfile = dirname(__FILE__) . "/admin/$tpldir/show_plugins.fnc.tpl"; $serendipity['smarty']->display('file:'. $tfile); } @@ -243,7 +244,8 @@ function ownership($authorid, $name, $is_plugin_owner = false) { $data['show_ownership'] = true; $serendipity['smarty']->assign($data); - $tfile = dirname(__FILE__) . "/admin/tpl/show_ownership.fnc.tpl"; + $tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl'; + $tfile = dirname(__FILE__) . "/admin/$tpldir/show_ownership.fnc.tpl"; $serendipity['smarty']->display('file:'. $tfile); } @@ -318,7 +320,8 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam if (!is_object($serendipity['smarty'])) { serendipity_smarty_init(); } - $tfile = dirname(__FILE__) . "/admin/tpl/out_stack_loop.tpl"; + $tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl'; + $tfile = dirname(__FILE__) . "/admin/$tpldir/out_stack_loop.tpl"; $data = array(); @@ -750,7 +753,8 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam } $serendipity['smarty']->assign($data); - $tfile = dirname(__FILE__) . "/admin/tpl/serendipity_plugin_config.fnc.tpl"; + $tpldir = ( !defined('SWITCH_TEMPLATE_VERSION') ) ? 'tplold' : 'tpl'; + $tfile = dirname(__FILE__) . "/admin/$tpldir/serendipity_plugin_config.fnc.tpl"; $content = $serendipity['smarty']->fetch('file:'. $tfile); echo $content;