summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2008-01-04 22:58:49 +0000
committerxue <>2008-01-04 22:58:49 +0000
commit3493834ca750b13c7a2bfdaa7eb3bc76e1aa4374 (patch)
treec6f678f6a4cba1886ee0f1accbcb49b825301408
parente1efeb5f9def8439f027d06c767ca2571d507e6f (diff)
fixed #736.
-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);
}