public function layoutAction()
{
// proxy for resources
$path = $this->getRequest()->getPathInfo();
$path = str_replace("/admin/external_linfo/", "", $path);
if (preg_match("@\\.(css|js|ico|png|jpg|gif)\$@", $path)) {
if ($path == "layout/styles.css") {
// aliasing
$path = "layout/theme_default.css";
}
$path = $this->linfoHome . $path;
if (preg_match("@.css\$@", $path)) {
// it seems that css files need the right content-type (Chrome)
header("Content-Type: text/css");
} elseif (preg_match("@.js\$@", $path)) {
header("Content-Type: text/javascript");
}
if (file_exists($path)) {
echo file_get_contents($path);
}
}
exit;
}