Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Allow placeholder to be replaced with toolbar contents. Fixes #10 #11

Merged
merged 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
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;
Something went wrong with that request. Please try again.