From b7f1771faa07f249e69ccb3aa706513b84116b5d Mon Sep 17 00:00:00 2001 From: Dominik Blunk Date: Fri, 23 Sep 2011 14:02:10 +0200 Subject: [PATCH] Enhanced function plugin_config_get() to allow the usage of user_id and project_id. This function now works similar to config_get(). --- core/plugin_api.php | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/plugin_api.php b/core/plugin_api.php index 0769992..c29174e 100644 --- a/core/plugin_api.php +++ b/core/plugin_api.php @@ -165,15 +165,18 @@ function plugin_table( $p_name, $p_basename = null ) { * Get a plugin configuration option. * @param string Configuration option name * @param multi Default option value + * @param boolean Global value + * @param int User ID + * @param int Project ID */ -function plugin_config_get( $p_option, $p_default = null, $p_global = false ) { +function plugin_config_get( $p_option, $p_default = null, $p_global = false, $p_user = null, $p_project = null ) { $t_basename = plugin_get_current(); $t_full_option = 'plugin_' . $t_basename . '_' . $p_option; if( $p_global ) { return config_get_global( $t_full_option, $p_default ); } else { - return config_get( $t_full_option, $p_default ); + return config_get( $t_full_option, $p_default, $p_user, $p_project ); } } -- 1.7.4.msysgit.0