the define wibbling for hiphop seems to work now

This commit is contained in:
Shish 2012-06-18 01:23:31 +01:00
parent fd5b4c5910
commit 2a18da523c

View file

@ -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;
}