Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #11 from mariano/i10

Allow placeholder to be replaced with toolbar contents. Fixes #10
  • Loading branch information...
commit f1cf7a4ec021e6891db4cfd11e90fbfcbe16735b 2 parents 9c1dd55 + bc1fd68
@tmaiaroto authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 config/bootstrap/dispatcher.php
View
10 config/bootstrap/dispatcher.php
@@ -124,11 +124,11 @@
'layout' => 'default'
));
- // Add the toolbar to the body of the current page. Don't just echo it out now.
- // There are sometimes issues with the headers already being sent otherwise.
- // TODO: IF proper HTML were to be desired, perhaps insert $toolbar into the body in the
- // proper spot within the HTML.
- $result->body[0] = $toolbar . $result->body[0];
+ if (preg_match('/<!--\s*LI3_PERF_TOOLBAR\s*-->/si', $result->body[0], $match)) {
+ $result->body[0] = str_replace($match[0], $toolbar, $result->body[0]);
+ } else {
+ $result->body[0] = $toolbar . $result->body[0];
+ }
}
return $result;
Please sign in to comment.
Something went wrong with that request. Please try again.