[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] bug in sql-query in class.socalendar_sql.i
From: |
Brian Johnson |
Subject: |
Re: [Phpgroupware-developers] bug in sql-query in class.socalendar_sql.inc.php in Version-0_9_1 6-branch |
Date: |
Fri, 14 May 2004 20:59:11 +0000 |
If you are into the guts of sql-builder and addressbook .. could you figure
out the code to filter out any contacts that are not marked active='Y' ?
Maybe then I'll find enough time to figure out the prefs system to make it a
user pref to show/not show them
Matthias Leonhardt (address@hidden) wrote:
>
> Hi developers,
>
> I found a bug in the sql-query-builder. Under some circumstances the
> sqlstring is not build correctly because a whitespace is needed before an
> AND statement. Better one whitespace too much than too few...
>
> Index: class.socalendar_sql.inc.php
> ===================================================================
> RCS file: /cvsroot/phpgroupware/calendar/inc/class.socalendar_sql.inc.php,v
> retrieving revision 1.28.2.4.2.8
> diff -u -r1.28.2.4.2.8 class.socalendar_sql.inc.php
> --- class.socalendar_sql.inc.php 12 Sep 2003 02:16:22 -0000
> 1.28.2.4.2.8
> +++ class.socalendar_sql.inc.php 14 May 2004 15:14:56 -0000
> @@ -827,7 +826,7 @@
> $lastmod = intval($lastmod);
> $repeats = (bool) $repeats;
>
> - $user_where = " AND phpgw_cal_user.cal_login = $this->user";
> + $user_where = " AND phpgw_cal_user.cal_login = $this->user
> ";
>
> $member_groups =
> $GLOBALS['phpgw']->accounts->membership($this->user);
> @reset($member_groups);
> @@ -846,9 +845,9 @@
>
> if($lastmod > 0)
> {
> - $wheremod = "AND mdatetime = $lastmod";
> + $wheremod = " AND mdatetime > $lastmod";
> }
> -
> +
> $order_by = ' ORDER BY phpgw_cal.cal_id ASC';
> if($this->debug)
> {
>
> Please check it in.
> Thanks & bye, Matthias
>
> Telefon 1 036 41 / 77 63 23
> Telefon 2 05 11 / 6 00 66 - 0
> E-Mail address@hidden
> Web http://www.probusiness.de
>
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>
>