phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] A bug in Calendar app


From: Mark A Peters
Subject: Re: [Phpgroupware-developers] A bug in Calendar app
Date: Wed, 9 Jan 2002 06:38:10 -0600 (CST)

It could be that you are not a member of a group at the moment.

Check to see if this is true.  If so, please assign yourself to a group
and try again.  The general rule is that each member should be a member of
at least one group.

Thanks,
Mark A Peter (Skeeter)

On Wed, 9 Jan 2002, Eugene Sandulenko wrote:

> Hi all,
> 
> another bug appeared in Calendar app. I tried to investigate it by
> myself but with no success. The code is still obscure to me.
> 
> It happens when I try to switch to another user's calendar.
> 
> It dies with error as follows (sorry for a long line):
> 
> Database error: Invalid SQL: SELECT DISTINCT 
> phpgw_cal.cal_id,phpgw_cal.datetime,phpgw_cal.edatetime,phpgw_cal.priority 
> FROM phpgw_cal, phpgw_cal_user, phpgw_cal_repeats WHERE 
> (phpgw_cal_user.cal_id = phpgw_cal.cal_id) AND (phpgw_cal_repeats.cal_id = 
> phpgw_cal.cal_id) AND (phpgw_cal.cal_type='M') AND (phpgw_cal_user.cal_login 
> in () AND ((phpgw_cal_repeats.recur_enddate >= 1007157600) OR 
> (phpgw_cal_repeats.recur_enddate=0))) ORDER BY phpgw_cal.datetime ASC, 
> phpgw_cal.edatetime ASC, phpgw_cal.priority ASC
> PostgreSQL Error: 1 (ERROR: parser: parse error at or near ")" )
> 
> File: 
> /usr/local/www/data/phpgroupware/calendar/inc/class.socalendar_sql.inc.php
> Line: 396
> 
> The problem particularly lies in this statement:
> 
>  ...AND (phpgw_cal_user.cal_login in () AND...
> 
> The code to produce it is located at class.socalendar_sql.inc.php lines 
> 87-104:
> 
> code:  87>  $sql = "AND (phpgw_cal.cal_type='M') "
> code:  88>        . 'AND (phpgw_cal_user.cal_login in (';
> code:  90>  if($owner_id)
> code:  91>  {
> [skipped...]
> code: 100>    }
> code: 101>    else
> code: 102>    {
> code: 103>    $sql .= 
> (!$this->is_group?$this->owner:implode(',',$this->g_owner));
> code: 104>    }
> 
> For some reason $this->is_group is set but array $this->g_owner is
> empty. This produces '()' which upsets DBMS.
> 
> The execution stage for this code is call to
> $this->bo->store_to_cache() in mini_calendar().
> 
> Eugene
> 
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]