aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/include/functions.php21
-rw-r--r--include/functions_user.inc.php1
-rw-r--r--include/template.class.php40
3 files changed, 2 insertions, 60 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 08df604e3..cd03a662e 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -1782,27 +1782,6 @@ SELECT id
}
}
-/**
- * Is the category accessible to the (Admin) user ?
- *
- * Note : if the user is not authorized to see this category, category jump
- * will be replaced by admin cat_modify page
- *
- * @param int category id to verify
- * @return bool
- */
-function cat_admin_access($category_id)
-{
- global $user;
-
- // $filter['visible_categories'] and $filter['visible_images']
- // are not used because it's not necessary (filter <> restriction)
- if (in_array($category_id, explode(',', $user['forbidden_categories'])))
- {
- return false;
- }
- return true;
-}
/**
* Retrieve data from external URL
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 4b44a8233..3e7c818d3 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -1312,6 +1312,7 @@ function check_status($access_type, $user_status = '')
*/
function is_adviser()
{
+ trigger_error('call to obsolete function is_adviser', E_USER_WARNING);
return false;
}
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.