From 2a18da523c651a13077b41f878da3f68e8b8c828 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 18 Jun 2012 01:23:31 +0100 Subject: [PATCH] the define wibbling for hiphop seems to work now --- core/util.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/util.inc.php b/core/util.inc.php index 813783e1..870224e8 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -843,8 +843,8 @@ function manual_include($fname) { $text = preg_replace('/@include_once "(.*)";/e', "manual_include('$1')", $text); // wibble the defines for HipHop's sake - #$text = str_replace('function _d(', '// function _messed_d(', $text); - #$text = preg_replace('/_d\(([^,]*), (.*)\);/', 'if(!defined(\1)) define(\1, \2);', $text); + $text = str_replace('function _d(', '// function _messed_d(', $text); + $text = preg_replace('/_d\("(.*)", (.*)\);/', 'if(!defined("$1")) define("$1", $2);', $text); return $text; }