You are here

function advagg_form_print_r in Advanced CSS/JS Aggregation 7

Same name and namespace in other branches
  1. 6 advagg.admin.inc \advagg_form_print_r()

@todo Please document this function.

See also

http://drupal.org/node/1354

2 calls to advagg_form_print_r()
advagg_bundler_admin_settings_form in advagg_bundler/advagg_bundler.admin.inc
Form builder; Configure advagg settings.
_advagg_admin_settings_information in includes/admin.inc

File

includes/admin.inc, line 751
Admin page callbacks for the advanced CSS/JS aggregation module.

Code

function advagg_form_print_r($data) {
  $data = print_r($data, TRUE);
  $data = explode("\n", $data);
  $new_data = '';
  foreach ($data as $text) {
    $new_text = str_replace('    ', '', $text);
    if ($new_text == "(") {
      $new_data .= ' ' . $new_text;
    }
    else {
      $new_data .= "\n" . $text;
    }
  }
  $new_data = explode("\n", $new_data);
  $new_data = array_filter($new_data);
  $rows = count($new_data);
  $new_data = implode("\n", $new_data);
  return array(
    $new_data,
    $rows,
  );
}