[geeklog-cvs] geeklog: calendar bug fixed

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Tue Jan 26 15:53:43 EST 2010


changeset 7634:aeb3f3f8c703
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/aeb3f3f8c703
user: stan <yankees26an at gmail.com>
date: Wed Jul 15 14:51:55 2009 -0400
description:
calendar bug fixed

diffstat:

 public_html/calendar/index.php |  26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diffs (46 lines):

diff -r d363b888855e -r aeb3f3f8c703 public_html/calendar/index.php
--- a/public_html/calendar/index.php	Wed Jul 15 13:49:22 2009 -0400
+++ b/public_html/calendar/index.php	Wed Jul 15 14:51:55 2009 -0400
@@ -547,17 +547,17 @@
     if ($mode == 'personal') {
         $calsql = "SELECT eid,title,datestart,dateend,timestart,timeend,allday,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['personal_events']} "
                 . "WHERE (uid = {$_USER['uid']}) "
-                . "AND ((allday=1 AND datestart = \"$year-$month-$day\") "
-                . "OR (datestart >= \"$year-$month-$day 00:00:00\" AND datestart <= \"$year-$month-$day 23:59:59\") "
-                . "OR (dateend >= \"$year-$month-$day 00:00:00\" AND dateend <= \"$year-$month-$day 23:59:59\") "
-                . "OR (\"$year-$month-$day\" BETWEEN datestart AND dateend)) "
+                . "AND ((allday=1 AND datestart = '$year-$month-$day') "
+                . "OR (datestart >= '$year-$month-$day 00:00:00' AND datestart <= '$year-$month-$day 23:59:59') "
+                . "OR (dateend >= '$year-$month-$day 00:00:00' AND dateend <= '$year-$month-$day 23:59:59') "
+                . "OR ('$year-$month-$day' BETWEEN datestart AND dateend)) "
                 . "ORDER BY datestart,timestart";
     } else {
         $calsql = "SELECT eid,title,datestart,dateend,timestart,timeend,allday,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['events']} WHERE ((allday=1 "
-                . "AND datestart = \"$year-$month-$day\") "
-                . "OR (datestart >= \"$year-$month-$day 00:00:00\" AND datestart <= \"$year-$month-$day 23:59:59\") "
-                . "OR (dateend >= \"$year-$month-$day 00:00:00\" AND dateend <= \"$year-$month-$day 23:59:59\") "
-                . "OR (\"$year-$month-$day\" BETWEEN datestart AND dateend))" . COM_getPermSql ('AND')
+                . "AND datestart = '$year-$month-$day') "
+                . "OR (datestart >= '$year-$month-$day 00:00:00' AND datestart <= '$year-$month-$day 23:59:59') "
+                . "OR (dateend >= '$year-$month-$day 00:00:00' AND dateend <= '$year-$month-$day 23:59:59') "
+                . "OR ('$year-$month-$day' BETWEEN datestart AND dateend))" . COM_getPermSql ('AND')
                 . " ORDER BY datestart,timestart";
     }
     $result = DB_query($calsql);
@@ -965,11 +965,11 @@
             }
 
             $calsql = "SELECT eid,title,datestart,dateend,timestart,timeend,allday,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM $calsql_tbl WHERE "
-                    . "((datestart >= \"$year-$month-$curday->daynumber 00:00:00\" "
-                    . "AND datestart <= \"$year-$month-$curday->daynumber 23:59:59\") "
-                    . "OR (dateend >= \"$year-$month-$curday->daynumber 00:00:00\" "
-                    . "AND dateend <= \"$year-$month-$curday->daynumber 23:59:59\") "
-                    . "OR (\"$year-$month-$curday->daynumber\" BETWEEN datestart AND dateend))"
+                    . "((datestart >= '$year-$month-$curday->daynumber 00:00:00' "
+                    . "AND datestart <= '$year-$month-$curday->daynumber 23:59:59') "
+                    . "OR (dateend >= '$year-$month-$curday->daynumber 00:00:00' "
+                    . "AND dateend <= '$year-$month-$curday->daynumber 23:59:59') "
+                    . "OR ('$year-$month-$curday->daynumber' BETWEEN datestart AND dateend))"
                     . $calsql_filt . " ORDER BY datestart,timestart";
 
             $query2 = DB_query($calsql);



More information about the geeklog-cvs mailing list