Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 16ceae1

Browse files
dominikdregad
authored andcommittedSep 24, 2011
Enhanced plugin_config_get() function
The function now works similar to config_get(), and allows the usage of user_id and project_id parameters. With this change it is now possible to fetch plugins config values for a specific user and/or project. Fixes #13346 Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
1 parent f8a11be commit 16ceae1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎core/plugin_api.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,18 @@ function plugin_table( $p_name, $p_basename = null ) {
165165
* Get a plugin configuration option.
166166
* @param string Configuration option name
167167
* @param multi Default option value
168+
* @param boolean Global value
169+
* @param int User ID
170+
* @param int Project ID
168171
*/
169-
function plugin_config_get( $p_option, $p_default = null, $p_global = false ) {
172+
function plugin_config_get( $p_option, $p_default = null, $p_global = false, $p_user = null, $p_project = null ) {
170173
$t_basename = plugin_get_current();
171174
$t_full_option = 'plugin_' . $t_basename . '_' . $p_option;
172175

173176
if( $p_global ) {
174177
return config_get_global( $t_full_option, $p_default );
175178
} else {
176-
return config_get( $t_full_option, $p_default );
179+
return config_get( $t_full_option, $p_default, $p_user, $p_project );
177180
}
178181
}
179182

0 commit comments

Comments
 (0)
Please sign in to comment.