summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Web/Javascripts/clientscripts.php12
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);
}