From 3493834ca750b13c7a2bfdaa7eb3bc76e1aa4374 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 4 Jan 2008 22:58:49 +0000 Subject: fixed #736. --- HISTORY | 1 + framework/Web/Javascripts/clientscripts.php | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/HISTORY b/HISTORY index ce348afe..563b84b9 100644 --- a/HISTORY +++ b/HISTORY @@ -2,6 +2,7 @@ Version 3.1.2 To be released ============================ BUG: Ticket#707 - TPropertyAccess sets property twice on object when using setters (Qiang) BUG: Ticket#719 - TAutoCompleter should not trigger Validation if CausesValidation=False (Christophe) +BUG: Ticket#736 - Files never created in clientscript.php (Qiang) BUG: Ticket#744 - Callback error handling is improved (Qiang) BUG: Ticket#750 - The "expire" parameter is used inconsistently in cache modules (Qiang) BUG: Ticket#753 - Themes not allways being set (Qiang) 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); } -- cgit v1.2.3