View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011565 | mantisbt | bugtracker | public | 2010-02-26 08:08 | 2010-04-23 14:30 |
Reporter | otilia.borreta | Assigned To | dhx | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.0 | ||||
Target Version | 1.2.1 | Fixed in Version | 1.2.1 | ||
Summary | 0011565: $g_enable_profiles not respected on bug report page | ||||
Description | On the bug report page, profile fields are shown even with $g_enable_profiles = OFF | ||||
Tags | No tags attached. | ||||
Thanks Otila for reporting this problem. I've fixed it ready for the next release. |
|
@dhx: sorry, I'm not sure, but I think your fix is not 100%. Shouldn't the line 181 instead of: $tpl_show_profiles = config_get( 'enable_profiles' ); be $tpl_show_profiles = config_get( 'enable_profiles' ) == ON; ??? |
|
Nah it's OK without the "== ON" check because $g_enable_profiles=ON|OFF (where ON=1 and OFF=0). It's like saying if( boolean_variable == true ) instead of just if( boolean_variable). |
|
Just a comment but not beeing a PHP developer: |
|
I agree once again with Atrol, sorry dhx ;) |
|
Can I ask why anyone would ever decide to do something as silly as:
The convention is (even as low down as within CPUs) that 0 evaluates to false and anything not 0 evaluates to true. The only use I see for those constants is when you are working with tri-state logic and you want to write things like:
Instead of using magic numbers for ON and AUTO. |
|
maybe a better example which does not look so silly at first moment: It's just confusing for me to see at one place: $value = ON; If I want to understand your code, I have always to keep in mind that ON is somewhere at another place defined as 1 |
|
MantisBT: master-1.2.x 19b969e9 2010-02-26 08:18 Details Diff |
Fix 0011565: $g_enable_profiles not respected on bug report page On the bug report page, profile fields are shown even with $g_enable_profiles = OFF |
Affected Issues 0011565 |
|
mod - bug_report_page.php | Diff File | ||
MantisBT: master ecb7cc08 2010-02-26 08:18 Details Diff |
Fix 0011565: $g_enable_profiles not respected on bug report page On the bug report page, profile fields are shown even with $g_enable_profiles = OFF |
Affected Issues 0011565 |
|
mod - bug_report_page.php | Diff File |