From a95f344fd13383121fdcb654ebb53c102cf4bf3a Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 29 Mar 2016 17:58:51 +0200 Subject: variable rename --- itjs.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'itjs.php') 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"); } -- cgit v1.2.3