diff options
author | rvelices <rv-github@modusoptimus.com> | 2011-07-15 18:56:20 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2011-07-15 18:56:20 +0000 |
commit | 5869dada4c169f167205a2d23f274e976d5e323e (patch) | |
tree | f15d99e9378c6d8cd754fa5ea0fa1cf0d822896b /include/template.class.php | |
parent | 62ce6788e52dc97ea7379e41ce353c8c7281d520 (diff) |
- removed admin never used function cat_admin_access
- removed obsolete known_script template block
- added a warning on usage of is_adviser function
git-svn-id: http://piwigo.org/svn/trunk@11753 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/template.class.php')
-rw-r--r-- | include/template.class.php | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/include/template.class.php b/include/template.class.php index 4eef7dab0..37c2d59e3 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -115,7 +115,6 @@ class Template { $this->smarty->register_function('combine_css', array(&$this, 'func_combine_css') ); $this->smarty->register_compiler_function('get_combined_css', array(&$this, 'func_get_combined_css') ); $this->smarty->register_block('footer_script', array(&$this, 'block_footer_script') ); - $this->smarty->register_function('known_script', array(&$this, 'func_known_script') ); $this->smarty->register_prefilter( array('Template', 'prefilter_white_space') ); if ( $conf['compiled_template_cache_language'] ) { @@ -531,44 +530,7 @@ class Template { } } - /** - * This smarty "known_script" functions allows to insert well known java scripts - * such as prototype, jquery, etc... only once. Examples: - * {known_script id="jquery" src="{$ROOT_URL}template-common/lib/jquery.packed.js"} - */ - function func_known_script($params, &$smarty ) - { - if (!isset($params['id'])) - { - $smarty->trigger_error("known_script: missing 'id' parameter"); - return; - } - $id = $params['id']; - trigger_error("known_script is deprecated $id ".@$params['src'], E_USER_WARNING); - if ('jquery'==$id) - { - $this->scriptLoader->add($id, 0, array(), null); - return; - } - if (! isset( $this->known_scripts[$id] ) ) - { - if (!isset($params['src'])) - { - $smarty->trigger_error("known_script: missing 'src' parameter"); - return; - } - $this->known_scripts[$id] = $params['src']; - $content = '<script type="text/javascript" src="'.$params['src'].'"></script>'; - if (isset($params['now']) and $params['now'] and empty($this->output) ) - { - return $content; - } - $repeat = false; - $this->block_html_head(null, $content, $smarty, $repeat); - } - } - - /** + /** * combine_script smarty function allows inclusion of a javascript file in the current page. * The engine will combine several js files into a single one in order to reduce the number of * required http requests. |