2006-03-07 07:18:04 GMT
First. Tarjei, great thanks for discovering this issue!
We have serious sitegroup issue, and again it's somehow caused by midgard
logic ( legacy core ) shared between midgard-core and midgard-php.
What happens when you want to update object's sitegroup and you set sitegroup
property with some value and call update method? Internal UPDATE_REPLIGARD
macro is used then, after object's record was successfully updated.
But the problem is that this macro is not sitegroup aware!
command = mgd_format(mgd, mgd->tmp,
"UPDATE $s SET locked=1,author=$d,$s WHERE id=$d AND realm=$q",
"repligard", mgd->current_user->id, fields, id, table);
It's easy to notice that after calling update method , object's record has sitegroup value updated
while repligard entry has still old value , so in practice this object doesn't exist.
Interesting thing is that old setsitegroup method updates sitegroup value.
mgd_update_repligard(mgd_handle(), (*zv_table)->value.str.val, (*zv_id)->value.lval,
I will review all sitegroup's related code in HEAD and in 1-7 branch tomorrow.