summaryrefslogtreecommitdiff
path: root/itjs.php
diff options
context:
space:
mode:
Diffstat (limited to 'itjs.php')
-rw-r--r--itjs.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/itjs.php b/itjs.php
index 155c9e2..a037681 100644
--- a/itjs.php
+++ b/itjs.php
@@ -31,13 +31,13 @@ itjs::far_future_headers(); # may exit
$files = itjs::filenames($_GET['files'] ?: it::match('/itjs/([-a-z0-9_,.]*)', $_SERVER['PHP_SELF']));
$data = itjs::filecontents($files);
-$file = end($files);
+$lastfile = end($files);
-if (it::match('\.gif$', $file))
+if (it::match('\.gif$', $lastfile))
{
header("Content-Type: image/gif");
}
-else if (it::match('\.css', $file))
+else if (it::match('\.css', $lastfile))
{
header("Content-Type: text/css");
$data .= "\n#it_boot_dom { display:none }\n"; # Append magic style for it_boot
@@ -67,14 +67,14 @@ else if (it::match('\.css', $file))
$data
);
}
-else if (it::match('\.htc$', $file))
+else if (it::match('\.htc$', $lastfile))
{
header("Content-Type: text/x-component");
}
-else if (!it::match('\.html$', $file))
+else if (!it::match('\.html$', $lastfile))
{
$data = "window.trace+='i';\n$data\nwindow.trace+='I';\n";
- $data .= "\nwindow.it_gotjs = (window.it_gotjs ? window.it_gotjs : '') + '." . it::match('\w+', basename($file)) . "';\n";
+ $data .= "\nwindow.it_gotjs = (window.it_gotjs ? window.it_gotjs : '') + '." . it::match('\w+', basename($lastfile)) . "';\n";
$charset = ini_get('default_charset') ?: 'iso-8859-1';
header("Content-Type: application/x-javascript; charset=$charset");
}