View Issue Details

IDProjectCategoryView StatusLast Update
0006848mantisbtadministrationpublic2009-04-20 09:49
Reporterjiangxin Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version1.2.0rc1Fixed in Version1.1.7 
Summary0006848: Bugs in manageconfig*_set.php
Description

in manageconfig* page, there are "Who can alter this value" fields in the forms. I found it cannot change alone. I mean if you change "Who can alter this value" field without change other fields in the same line, changes can not saved to database.

The bug is in manageconfig*_set.php.
Path is below.

Additional Information

diff --exclude=CVS -u -r mantis-sf-mirror/manage_config_email_set.php mantis/manage_config_email_set.php
--- mantis-sf-mirror/manage_config_email_set.php 2006-03-15 16:44:39.296875000 +0800
+++ mantis/manage_config_email_set.php 2006-03-15 16:41:43.468750000 +0800
@@ -100,7 +100,7 @@
$t_default_flags['threshold_max'] = $t_default_max;

    $t_existing_default_flags = config_get( 'default_notify_flags' );
  • if ( $t_existing_default_flags != $t_default_flags ) { # only set the flags if they are different

  • if ( $t_existing_default_flags != $t_default_flags || $f_actions_access != config_get_access( 'default_notify_flags' ) ) { # only set the flags if they are different
    config_set( 'default_notify_flags', $t_default_flags, NO_USER, $t_project, $f_actions_access );
    }
    } else {
    @@ -128,7 +128,7 @@
    }
    if ( isset( $t_notify_flags ) ) {
    $t_existing_flags = config_get( 'notify_flags' );

  • if ( $t_existing_flags != $t_notify_flags ) { # only set the flags if they are different

  • if ( $t_existing_flags != $t_notify_flags || $f_actions_access != config_get_access( 'notify_flags' ) ) { # only set the flags if they are different
    config_set( 'notify_flags', $t_notify_flags, NO_USER, $t_project, $f_actions_access );
    }
    }
    diff --exclude=CVS -u -r mantis-sf-mirror/manage_config_work_threshold_set.php mantis/manage_config_work_threshold_set.php
    --- mantis-sf-mirror/manage_config_work_threshold_set.php 2006-03-15 16:44:39.312500000 +0800
    +++ mantis/manage_config_work_threshold_set.php 2006-03-15 16:41:43.484375000 +0800
    @@ -52,12 +52,13 @@

    @@debug @@ var_dump($$t_access_level, $t_lower_threshold, $t_array_threshold); echo '
    ';

         }
         $t_existing_threshold = config_get( $p_threshold );
  • $t_existing_access = config_get_access( $p_threshold );
    if ( -1 == $t_lower_threshold ) {

  • if ( $t_existing_threshold != $t_array_threshold ) {

  • if ( $t_existing_threshold != $t_array_threshold || $t_existing_access != $f_access ) {
    config_set( $p_threshold, $t_array_threshold, NO_USER, $t_project, $f_access );
    }
    } else {

  • if ( $t_existing_threshold != $t_lower_threshold ) {

  • if ( $t_existing_threshold != $t_lower_threshold || $t_existing_access != $f_access ) {
    config_set( $p_threshold, $t_lower_threshold, NO_USER, $t_project, $f_access );
    }
    }
    @@ -74,7 +75,7 @@
    $f_flag = ( OFF == $f_flag ) ? OFF : ON;

    @@debug @@ echo "
    for $p_threshold "; var_dump($f_flag, $f_access); echo '
    ';

  • if ( $f_flag != config_get( $p_threshold ) ) {

  • if ( $f_flag != config_get( $p_threshold ) || $f_access != config_get_access( $p_threshold ) ) {
    config_set( $p_threshold, $f_flag, NO_USER, $t_project, $f_access );
    }
    }
    @@ -89,7 +90,7 @@
    $f_access = gpc_getint( 'access' . $p_threshold );

    @@debug @@ echo "
    for $p_threshold "; var_dump($f_flag, $f_access); echo '
    ';

  • if ( $f_flag != config_get( $p_threshold ) ) {

  • if ( $f_flag != config_get( $p_threshold ) || $f_access != config_get_access( $p_threshold ) ) {
    config_set( $p_threshold, $f_flag, NO_USER, $t_project, $f_access );
    }
    }
    diff --exclude=CVS -u -r mantis-sf-mirror/manage_config_workflow_set.php mantis/manage_config_workflow_set.php
    --- mantis-sf-mirror/manage_config_workflow_set.php 2006-03-15 16:44:39.359375000 +0800
    +++ mantis/manage_config_workflow_set.php 2006-03-15 16:41:43.531250000 +0800
    @@ -32,7 +32,7 @@
    if( config_get_access( $t_threshold ) <= $t_access ) {
    $f_value = gpcget( 'threshold' . $t_threshold );
    $f_access = gpcget( 'access' . $t_threshold );

  • if ( $f_value != config_get( $t_threshold ) ) {

  • if ( $f_value != config_get( $t_threshold ) || $f_access != config_get_access( $t_threshold ) ) {
    config_set( $t_threshold, $f_value, NO_USER, $t_project, $f_access );
    }
    }
    @@ -74,7 +74,7 @@
    $t_workflow[$t_state] = $t_workflow_row;
    }
    }

  • if ( $t_workflow != config_get( 'status_enum_workflow' ) ) {

  • if ( $t_workflow != config_get( 'status_enum_workflow' ) || $f_access != config_get_access( 'status_enum_workflow' ) ) {
    config_set( 'status_enum_workflow', $t_workflow, NO_USER, $t_project, $f_access );
    }
    }

Tagspatch

Activities

xbromy

xbromy

2006-11-23 06:14

reporter   ~0013749

Last edited: 2006-11-23 06:15

is this fixed in any version?

vboctor

vboctor

2006-12-12 02:36

manager   ~0013807

This is not fixed yet. Once it is fixed, the issue will be marked as resolved and the fixed in version will be set. At the moment, it is planned for Mantis 1.1.

thraxisp

thraxisp

2009-03-16 09:30

reporter   ~0021057

Fixes for 1.1.x and 1.2.x pushed to git repository

Related Changesets

MantisBT: master 82f6a4d3

2009-03-15 22:38

thraxisp


Details Diff
fixed bug 0006848: Bugs in manage_config_*_set.php
based on patch by jiangxin
Affected Issues
0006848
mod - manage_config_workflow_set.php Diff File
mod - manage_config_email_set.php Diff File
mod - manage_config_work_threshold_set.php Diff File

MantisBT: master-1.1.x 2af0fcf2

2009-03-15 22:38

thraxisp


Details Diff
fixed bug 0006848: Bugs in manage_config_*_set.php
based on patch by jiangxin
Affected Issues
0006848
mod - manage_config_work_threshold_set.php Diff File
mod - manage_config_workflow_set.php Diff File
mod - manage_config_email_set.php Diff File