diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-10-22 01:34:45 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-10-22 01:34:45 +0000 |
commit | 1c1a18ccba113c50a7ef4f52e455a104e0d28905 (patch) | |
tree | c4e5976d96776acbc72d174e53d1896712b1989b /include | |
parent | 8d9d904c67d23c007ec33b3758b5931fe0b12bdf (diff) |
- some german language changes
- added option for smarty $conf['template_compile_check'] - default true; if false smarty doesn't check if templates need recompilation resulting in less disk accesses (good when the disk is not local)
- load_language doesnt check first for en_uk.utf-8 directory ...
git-svn-id: http://piwigo.org/svn/branches/2.0@2789 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/config_default.inc.php | 20 | ||||
-rw-r--r-- | include/functions.inc.php | 17 | ||||
-rw-r--r-- | include/template.class.php | 3 |
3 files changed, 24 insertions, 16 deletions
diff --git a/include/config_default.inc.php b/include/config_default.inc.php index 7a145709e..033f9cec8 100644 --- a/include/config_default.inc.php +++ b/include/config_default.inc.php @@ -411,7 +411,7 @@ $conf['remember_me_length'] = 5184000; $conf['session_length'] = 3600; // +-----------------------------------------------------------------------+ -// | debug | +// | debug/performance | // +-----------------------------------------------------------------------+ // show_queries : for debug purpose, show queries and execution times @@ -430,6 +430,17 @@ $conf['debug_template'] = false; // die_on_sql_error: if an SQL query fails, should everything stop? $conf['die_on_sql_error'] = true; +// if true, some language strings are replaced during template compilation +// (insted of template output). this results in better performance. however +// any change in the language file will not be propagated until you purge +// the compiled templates from the admin / maintenance menu +$conf['compiled_template_cache_language'] = false; + +// This tells Smarty whether to check for recompiling or not. Recompiling +// does not need to happen unless a template is changed. false results in +// better performance. +$conf['template_compile_check'] = true; + // +-----------------------------------------------------------------------+ // | authentication | // +-----------------------------------------------------------------------+ @@ -695,11 +706,4 @@ $conf['light_slideshow'] = true; // the local data directory is used to store data such as compiled templates // or other plugin variables etc $conf['local_data_dir'] = dirname(dirname(__FILE__)).'/_data'; - -// if true, some language strings are replaced during template compilation -// (insted of template output). this results in better performance. however -// any change in the language file will not be propagated until you purge -// the compiled templates from the admin / maintenance menu -$conf['compiled_template_cache_language'] = false; - ?>
\ No newline at end of file diff --git a/include/functions.inc.php b/include/functions.inc.php index a75df8c4f..efdc79780 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -1027,7 +1027,7 @@ function l10n($key) if ($conf['debug_l10n'] and !isset($lang[$key]) and !empty($key)) { - trigger_error('[l10n] language key "'.$key.'" is not defined', E_USER_NOTICE); + trigger_error('[l10n] language key "'.$key.'" is not defined', E_USER_WARNING); } return isset($lang[$key]) ? $lang[$key] : $key; @@ -1346,7 +1346,7 @@ function get_filter_page_value($value_name) */ function get_pwg_charset() { - defined('PWG_CHARSET') or fatal_error('load_language PWG_CHARSET undefined'); + defined('PWG_CHARSET') or fatal_error('PWG_CHARSET undefined'); return PWG_CHARSET; } @@ -1417,12 +1417,15 @@ function load_language($filename, $dirname = '', { $dir = $dirname.$language; - // exact charset match - no conversion required - $f = $dir.'.'.$target_charset.'/'.$filename; - if (file_exists($f)) + if ($target_charset!='utf-8') { - $source_file = $f; - break; + // exact charset match - no conversion required + $f = $dir.'.'.$target_charset.'/'.$filename; + if (file_exists($f)) + { + $source_file = $f; + break; + } } // UTF-8 ? diff --git a/include/template.class.php b/include/template.class.php index fafbf7670..e641d3cb8 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -55,6 +55,7 @@ class Template { $this->smarty = new Smarty; $this->smarty->debugging = $conf['debug_template']; + $this->smarty->compile_check=$conf['template_compile_check']; $compile_dir = $conf['local_data_dir'].'/templates_c'; mkgetdir( $compile_dir ); @@ -205,7 +206,7 @@ class Template { } return true; } - + /** return template extension if exists */ function get_extent($filename='', $handle='') { |