You are here

function _authcache_esi_debug_split_table in Authenticated User Page Caching (Authcache) 7.2

Utility function: Strip enclosing table markup from table rows.

2 calls to _authcache_esi_debug_split_table()
authcache_esi_debug_status_fragment in modules/authcache_esi/authcache_esi_debug.module
Page callback: List test results of manual ESI test.
authcache_esi_debug_status_table in modules/authcache_esi/authcache_esi_debug.module
Ajax callback: List test results of manual ESI test.

File

modules/authcache_esi/authcache_esi_debug.module, line 173
Debug module for Authcache ESI markup generator.

Code

function _authcache_esi_debug_split_table($markup) {
  if (preg_match('|^(<table[^>]*>)(.*)(</table>)$|i', $markup, $matches)) {
    return array(
      $matches[1],
      $matches[2],
      $matches[3],
    );
  }
  else {
    return array(
      '',
      $markup,
      '',
    );
  }
}