diff --git a/api/etemplate.php b/api/etemplate.php index 813f14b7aa..6648ade760 100644 --- a/api/etemplate.php +++ b/api/etemplate.php @@ -13,8 +13,7 @@ use EGroupware\Api; // add et2- prefix to following widgets/tags -/* disabling v/hbox replacement for now as it fails with nextmatch headers -const ADD_ET2_PREFIX_REGEXP = '#<((/?)([vh]?box|textbox|button))(/?|\s[^>]*)>#m';*/ +const ADD_ET2_PREFIX_REGEXP = '#<((/?)([vh]?box|textbox|button))(/?|\s[^>]*)>#m'; const ADD_ET2_PREFIX_REGEXP = '#<((/?)(box|textbox|button))(/?|\s[^>]*)>#m'; // switch evtl. set output-compression off, as we cant calculate a Content-Length header with transparent compression @@ -22,11 +21,11 @@ ini_set('zlib.output_compression', 0); $GLOBALS['egw_info'] = array( 'flags' => array( - 'currentapp' => 'api', - 'noheader' => true, + 'currentapp' => 'api', + 'noheader' => true, // miss-use session creation callback to send the template, in case we have no session 'autocreate_session_callback' => 'send_template', - 'nocachecontrol' => true, + 'nocachecontrol' => true, ) ); @@ -47,8 +46,8 @@ function send_template() //$path = EGW_SERVER_ROOT.$_SERVER['PATH_INFO']; // check for customized template in VFS list(, $app, , $template, $name) = explode('/', $_SERVER['PATH_INFO']); - $path = Api\Etemplate::rel2path(Api\Etemplate::relPath($app.'.'.basename($name, '.xet'), $template)); - if (empty($path) || !file_exists($path) || !is_readable($path)) + $path = Api\Etemplate::rel2path(Api\Etemplate::relPath($app . '.' . basename($name, '.xet'), $template)); + if(empty($path) || !file_exists($path) || !is_readable($path)) { http_response_code(404); exit; @@ -60,27 +59,28 @@ function send_template() { $cache_read = microtime(true); } - else*/if (($str = file_get_contents($path)) !== false) + else*/ + if(($str = file_get_contents($path)) !== false) { // fix -->