on 2009 May 25 1:01 AM
Hi all,
I'm seeing some strange behaviour with two attributes in the workflow interface: MX_DISABLED and MX_LOCKED. Even though the attributes are set to 0 in the database, the web interface has them checked (ie: Value = 1).
I've taken a look at the array that is coming back in PHP and found:
If the display type is set to BOOLEAN I get from the database:
[MX_DISABLED] => 0
[MX_LOCKED] => 0
But when I get to the workflow interface the array is:
[MX_DISABLED] => 1
[MX_LOCKED] => 1
If I set the presentation type of MX_DISABLED to SINGLESELECT I get the following array at the web interace:
[MX_DISABLED] => 0
[MX_LOCKED] => 1
Therefore it seems to be that the display type is causing the incorrect setting the values of these two attributes. I've tried it on a different attribute (one created for testing) and it appears to work fine. It also correctly sets them to 0 if the user has no values (ie: Not Set).
I'm using IDM7.0SP5.
Does anyone have an idea of where these are manipulated in PHP so I can track things down? Has anyone seen this before?
Thanks
Peter Wass
OK - I've traced it to the following function:
In
File: FUNCTIONS.PHP
Function: defaultentries
foreach (array_keys($isMandatory) as $attrnamekey)
{
if(isset($attrPresType[$attrnamekey]) && $attrPresType[$attrnamekey] == 5 && *$aEntry->getAttribute($attrnamekey)!=""*){
$outputArray[$attrnamekey] = 1;
If the entry exists, it is ALWAYS set to 1. For most booleans this is not a problem - they are removed when the value is set to 0. However, MX_LOCKED and MX_DISABLED are present even if the value is 0.
Therefore these will always be set to 1.
This can be fixed by modifying the PHP to be:
if(isset($attrPresType[$attrnamekey]) && $attrPresType[$attrnamekey] == 5 && *($aEntry->getAttribute($attrnamekey)!="" && $aEntry->getAttribute($attrnamekey)!="0")* ){
Peter Wass
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.