summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts
diff options
context:
space:
mode:
authorxue <>2008-01-04 22:58:49 +0000
committerxue <>2008-01-04 22:58:49 +0000
commit3493834ca750b13c7a2bfdaa7eb3bc76e1aa4374 (patch)
treec6f678f6a4cba1886ee0f1accbcb49b825301408 /framework/Web/Javascripts
parente1efeb5f9def8439f027d06c767ca2571d507e6f (diff)
fixed #736.
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r--framework/Web/Javascripts/clientscripts.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/framework/Web/Javascripts/clientscripts.php b/framework/Web/Javascripts/clientscripts.php
index f66ebb3d..158b3210 100644
--- a/framework/Web/Javascripts/clientscripts.php
+++ b/framework/Web/Javascripts/clientscripts.php
@@ -175,12 +175,12 @@ function save_javascript($content, $filename)
*/
function get_saved_javascript($filename)
{
+ $fn=$filename;
if(supports_gzip_encoding())
- $filename .= '.gz';
- if(is_file($filename))
- return file_get_contents($filename);
- else
- error_log('Prado client script: no such file '.$filename);
+ $fn .= '.gz';
+ if(!is_file($fn))
+ save_javascript(get_javascript_code(true), $filename);
+ return file_get_contents($fn);
}
/**
@@ -533,8 +533,6 @@ if(count(get_script_requests()) > 0)
{
if(($filename = compressed_js_filename()) !== null)
{
- if(!is_file($filename))
- save_javascript(get_javascript_code(true), $filename);
print_headers();
echo get_saved_javascript($filename);
}