View Issue Details

IDProjectCategoryView StatusLast Update
0013346mantisbtplug-inspublic2014-09-23 18:05
Reporterdominik Assigned Todregad  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.2.8 
Target Version1.2.9Fixed in Version1.2.9 
Summary0013346: Enhanced function plugin_config_get() to allow usage of user_id and project_id
Description

This function works now similar to config_get() - it is now possible to fetch plugin config values for a specific user and/or project.

TagsNo tags attached.
Attached Files
pluginConfigGet-1.2.x.patch (1,356 bytes)   
From b7f1771faa07f249e69ccb3aa706513b84116b5d Mon Sep 17 00:00:00 2001
From: Dominik Blunk <dominik@blunk.ch>
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

pluginConfigGet-1.2.x.patch (1,356 bytes)   

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

dregad

dregad

2011-09-24 10:02

developer   ~0029858

I have committed your patch, thanks for your contribution !

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036304

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master ca4da39f

2011-09-23 01:02

dominik


Details Diff
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 0013346

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Affected Issues
0013346
mod - core/plugin_api.php Diff File

MantisBT: master-1.2.x 16ceae15

2011-09-23 01:02

dominik


Details Diff
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 0013346

Signed-off-by: Damien Regad <damien.regad@merckgroup.com>
Affected Issues
0013346
mod - core/plugin_api.php Diff File