Re: Modifying group in version 0.7.2
Joe Stewart <[email protected]> Tue, 3 Jun 2003 12:12:09 -0500
| Newsgroups | gmane.comp.cms.phpslash.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jun 02, 2003 at 10:35:55PM +0200, Peter Termaten wrote:
> Hi all,
>
> I'm implementing phpSlash and I noticed some strange behaviour when
> updating a group:
>
> When I'm adding a permission to an existing group, psl creates a new
> (empty) psl_group record and new records for psl_group_permission_lut for
> this newly created group.
>
> It does not update the group as requested.
>
> The result is an inconsistent set of records, causing weird behaviour of
> the application and mysql 1062 errors.
>
> Am I doing something wrong or is this a bug?
>
I believe this is corrected in cvs now. The recursive call to
clean() was overwriting the variable instead of saving to an array
element - or in other words a typo.
Either download an updated functions.inc or apply the patch below:
Download:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/phpslash/phpslash-ft/class/functions.inc?rev=1.148
visual change:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpslash/phpslash-ft/class/functions.inc.diff?r1=1.147&r2=1.148
diff:
Index: functions.inc
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v
retrieving revision 1.147
retrieving revision 1.148
diff -C2 -d -r1.147 -r1.148
*** functions.inc 7 May 2003 20:18:12 -0000 1.147
--- functions.inc 3 Jun 2003 16:45:47 -0000 1.148
***************
*** 679,683 ****
if(is_array($val)) {
// recursively call - if array value is itself an
array.
! $clean = clean($val, $allow_html);
} else {
if ($allow_html) {
--- 679,683 ----
if(is_array($val)) {
// recursively call - if array value is itself an
array.
! $clean[$key] = clean($val, $allow_html);
} else {
if ($allow_html) {
thanks for pointing this out,
Joe
> Regards,
> Peter
>
-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5