1
Today I found some bugs in the permissions(visibility) of the new profile module.
One interesting bug was that I could not erase a field view permission. I fixed that and then I cross with another.
I could not set more that one permission for each field.
I think it makes sense that I could make the 'name' field available for:
registered users when viewing registered users profiles
group3 users when viewing admin users profiles
etc...
In fact, looking into the database, I could see that many permissions were set but were not displaying.
I fixed the bug and voila! Many permissions were showing for each field.
Now comes the problem,
The profile_visibility table does not have an autoincrement field, meaning that I have several rows with the same 'field_id' and diferent 'user_group' and 'profile_group'
When I want to delete one of this fields, I cannot use XOOPS API because it will delete all the rows containg that 'field_id' and same goes with updates.
Would it not be nice that XOOPS Api could let us update/delete rows matching a criteria? Yes it would!
And would not be nice if XOOPS Api had something like getObject instead of getObjects so I could retrieve a object (or false) based on a criteria that returns always a single row?
So I would not have to do this:
$myobjects = $object_handler->getObjects($criteria);//here comes un ugly array
$theobjectireallywant=$myobjects[0];//and some other checks to see if it is set or not, blablabla
Now, back to the issue. I think we should add an autoincrement field in the table I mentioned above so we could make the profile module work as expected(and using the current api)
Who is developing this module btw?