From a54b231e4576c9d8f8abb97bcd9eccc87db3c307 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Sat, 12 Oct 2013 15:22:43 +0800 Subject: [PATCH 1/2] added class variable bRegisterSass so you can turn off sass if need --- includes/haml/HamlParser.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/haml/HamlParser.class.php b/includes/haml/HamlParser.class.php index ad30c27..d022772 100644 --- a/includes/haml/HamlParser.class.php +++ b/includes/haml/HamlParser.class.php @@ -183,6 +183,13 @@ public function __construct($sPath = false, $bCompile = true, $oParent = null, $ */ protected static $otc = false; + /** + * Register Sass or not + * + * @var boolean + */ + protected static $bRegisterSass = true; + /** * One time constructor. Register Textile block * if exists Textile class and Markdown block if @@ -205,7 +212,7 @@ protected static function __otc() */ protected static function tryRegisterSass() { - if (file_exists($f = dirname(__FILE__) . '/../sass/SassParser.class.php')) + if (self::$bRegisterSass && file_exists($f = dirname(__FILE__) . '/../sass/SassParser.class.php')) require_once $f; else return false; From c56ea83cd7b3daeb46baa03db308ec0a864a0272 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Sat, 12 Oct 2013 15:29:04 +0800 Subject: [PATCH 2/2] changed bRegisterSass to public --- includes/haml/HamlParser.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/haml/HamlParser.class.php b/includes/haml/HamlParser.class.php index d022772..2cdd873 100644 --- a/includes/haml/HamlParser.class.php +++ b/includes/haml/HamlParser.class.php @@ -188,7 +188,7 @@ public function __construct($sPath = false, $bCompile = true, $oParent = null, $ * * @var boolean */ - protected static $bRegisterSass = true; + public static $bRegisterSass = true; /** * One time constructor. Register Textile block