From 253721371afcd4010ca6bc95fad20380ba0a2dd9 Mon Sep 17 00:00:00 2001 From: Jeff Soo Date: Mon, 13 Mar 2017 06:10:48 -0400 Subject: [PATCH] class Textile not loading; use \Netcarver\Textile\Parser instead --- zem_tpl.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/zem_tpl.php b/zem_tpl.php index 86dea65..5eceefb 100644 --- a/zem_tpl.php +++ b/zem_tpl.php @@ -53,21 +53,26 @@ function compile_plugin($file='') { // This is for bc; and for help that needs to use it. @include('classTextile.php'); - - if (defined('txpath')) { + if (class_exists('Textile')) { + $textile = new Textile(); + $plugin['help'] = $textile->TextileThis($plugin['help']); + } elseif (defined('txpath')) { global $trace; - + + include txpath.'/lib/txplib_misc.php'; include txpath.'/lib/class.trace.php'; include txpath.'/vendors/Textpattern/Loader.php'; $trace = new Trace(); + $loader = new \Textpattern\Loader(txpath.'/vendors'); + $loader->register(); $loader = new \Textpattern\Loader(txpath.'/lib'); $loader->register(); - } - - if (class_exists('Textile')) { - $textile = new Textile(); - $plugin['help'] = $textile->TextileThis($plugin['help']); + + if (class_exists('Netcarver\\Textile\\Parser')) { + $textile = new \Netcarver\Textile\Parser(); + $plugin['help'] = $textile->textileThis($plugin['help']); + } } $plugin['md5'] = md5( $plugin['code'] );