Issue 99: Middleware needs to replace certain occurrences
This commit is contained in:
parent
8555a1b7f7
commit
ce09cf446e
@ -60,8 +60,8 @@ class IDF_Middleware_GoogleAds
|
|||||||
}
|
}
|
||||||
$replacead1 = $this->makead(Pluf::f("google_ads")["AD1"]);
|
$replacead1 = $this->makead(Pluf::f("google_ads")["AD1"]);
|
||||||
$replacead2 = $this->makead(Pluf::f("google_ads")["AD2"]);
|
$replacead2 = $this->makead(Pluf::f("google_ads")["AD2"]);
|
||||||
$response->content = str_replace('<!--AD1-->', $replacead1, $response->content);
|
$response->content = substr_replace($response->content, $replacead1, strrpos($response->content,'<!--AD1-->'), strlen('<!--AD1-->'));
|
||||||
$response->content = str_replace('<!--AD2-->', $replacead2, $response->content);
|
$response->content = substr_replace($response->content, $replacead2, strrpos($response->content,'<!--AD2-->'), strlen('<!--AD2-->'));
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class Pluf_Middleware_Stats
|
|||||||
$text = "Page rendered in " . sprintf('%.5f', (microtime(true) - $GLOBALS['_PX_starttime'])) . "s using " . count($GLOBALS['_PX_debug_data']['sql_queries']) . " queries.";
|
$text = "Page rendered in " . sprintf('%.5f', (microtime(true) - $GLOBALS['_PX_starttime'])) . "s using " . count($GLOBALS['_PX_debug_data']['sql_queries']) . " queries.";
|
||||||
else
|
else
|
||||||
$text = "Page rendered in " . sprintf('%.5f', (microtime(true) - $GLOBALS['_PX_starttime'])) . "s.";
|
$text = "Page rendered in " . sprintf('%.5f', (microtime(true) - $GLOBALS['_PX_starttime'])) . "s.";
|
||||||
$response->content = str_replace('</body>', $text.'</body>', $response->content);
|
$response->content = substr_replace($response->content, $text.'</body>', strrpos($response->content,'</body>'), strlen('</body>'));
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user