private static function init() { mb_internal_encoding('UTF-8'); @ini_set("magic_quotes_runtime", 0); if (version_compare('5.4', PHP_VERSION, '>') && function_exists('set_magic_quotes_runtime') && get_magic_quotes_runtime()) { @set_magic_quotes_runtime(false); } @ini_set('register_globals', 'off'); if (!isset(self::$root_path)) { self::$root_path = preg_replace('@([/\\\\]+)@', '/', dirname(__FILE__) . '/'); //XXX fix root path definition self::$root_path = preg_replace('@(/)wa-installer/lib/classes/?$@', '$1', self::$root_path); } }