1
trabis
XoopsObject and Xoops 2.3 Profile
  • 2008/9/10 1:24

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 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?

2
Marco
Re: XoopsObject and Xoops 2.3 Profile
  • 2008/9/10 3:53

  • Marco

  • Home away from home

  • Posts: 1256

  • Since: 2004/3/15


Quote:

One interesting bug was that I could not erase a field view permission

confirmed, added to SF bugtracker, thx a lot
Do synergy or die.

3
trabis
Re: XoopsObject and Xoops 2.3 Profile
  • 2008/9/10 18:27

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hi Marco, I took the liberty of applying some fixes to the profile module, including changing database, renaming fields, adding images, removing smartobject references, fixing permissions select box, etc.

You can download it in this temporary link:
http://www.xuups.com/profile_with_fixes.zip

Please check if it is ok for you.

4
phppp
Re: XoopsObject and Xoops 2.3 Profile
  • 2008/9/11 7:59

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


I am not sure if it is the same issue covered by rev #2056 & #2060

http://xoops.svn.sourceforge.net/viewvc/xoops?view=rev&revision=2056
http://xoops.svn.sourceforge.net/viewvc/xoops?view=rev&revision=2060


I will check the patch from trabis

5
phppp
Re: XoopsObject and Xoops 2.3 Profile
  • 2008/9/11 8:06

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Just double checked trabis' solution, it is also a good one.

"Who is developing this module btw?"
-- The module is adopted solely for feature compat, it won't be 'developed' actively but only be maintained till the profile module for XOOPS 3.0 is out.

6
trabis
Re: XoopsObject and Xoops 2.3 Profile
  • 2008/9/11 8:43

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

phppp wrote:
I am not sure if it is the same issue covered by rev #2056 & #2060

http://xoops.svn.sourceforge.net/viewvc/xoops?view=rev&revision=2056
http://xoops.svn.sourceforge.net/viewvc/xoops?view=rev&revision=2060


I will check the patch from trabis


Yes, that is the issue, but you did it the best way, with clean and less code. Gotta love your work!

Login

Who's Online

417 user(s) are online (284 user(s) are browsing Support Forums)


Members: 0


Guests: 417


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits