Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#760 cannot really herit kernel class

XOOPS_2.0.x
closed
Laurent JEN
5
2012-09-25
2007-08-15
Garrath
No

is always the same problem like here :
http://sourceforge.net/tracker/index.php?func=detail&aid=1735318&group_id=41586&atid=430840

i take 2.0.17 kernel, and i just correct this bug

exemple in insert method of the handler of privmessage you have actually this code :
if (strtolower(get_class($pm)) != 'xoopsprivmessage') {
return false;
}

Then if you create a new class X which herit of this handler you cannot use the insert method of the handler.

This code
if (strtolower(get_class($pm)) != 'xoopsprivmessage') {
return false;
}
must be this :
if (!is_a($pm, 'xoopsprivmessage')) {
return false;
}
And now it's ok to use the insert metho of parent class...

There is patch for all kernel class with this pb without any other optimisation

Discussion

  • Garrath
    Garrath
    2007-08-15

     
    Attachments
  • Laurent JEN
    Laurent JEN
    2007-10-20

    Logged In: YES
    user_id=1528770
    Originator: NO

    Fixed on xoops 2.0.18 (rev 1102)