Here's my diff to calendar.c based on some CVS version but applies to any.

Hope it's clear. 

Solt
----

*** calendar.c  Fri Sep 28 13:18:30 2001
--- calendar.c.orig     Mon Sep 17 20:03:40 2001
***************
*** 98,126 ****
        if(topics) {
            if (typev == -1)
                    php_midgard_select(&MidgardArticle, return_value,
                                                   ARTICLE_SELECT "," 
ARTICLE_CALENDAR, ARTICLE_FROM,
                                                   "article.topic IN $D AND 
author=person.id"
!                                                  " AND article.up=0 AND 
(Unix_Timestamp(calstart)>=$d"
!                                                  " OR 24*60*60-1+Unix_timestamp("
!                                                  "     Date_Add(calstart, INTERVAL 
caldays DAY))<=$d)"
                                                   " AND 24*60*60-1+Unix_timestamp("
!                                                  "     Date_Add(calstart, INTERVAL 
caldays DAY))>=$d"
!                                                  " AND Unix_timestamp(calstart)>0",
!                                                  sortv, topics, startv, stopv, 
startv);
            else
                    php_midgard_select(&MidgardArticle, return_value,
                                                   ARTICLE_SELECT "," 
ARTICLE_CALENDAR, ARTICLE_FROM,
                                                   "article.type=$d AND article.topic 
IN $D"
                                                   " AND author=person.id"
!                                                  " AND article.up=0 AND 
(Unix_Timestamp(calstart)>=$d"
!                                                  " OR 24*60*60-1+Unix_timestamp("
!                                                  "     Date_Add(calstart, INTERVAL 
caldays DAY))<=$d)"
                                                   " AND 24*60*60-1+Unix_timestamp("
!                                                  "     Date_Add(calstart, INTERVAL 
caldays DAY))>=$d"
!                                                  " AND Unix_timestamp(calstart)>0",
!                                                  sortv, typev, topics, startv, 
stopv, startv);
                free(topics);
        }
  }
  
  MGD_FUNCTION(ret_type, list_topic_calendar_all_fast, (type param))
--- 98,120 ----
        if(topics) {
            if (typev == -1)
                    php_midgard_select(&MidgardArticle, return_value,
                                                   ARTICLE_SELECT "," 
ARTICLE_CALENDAR, ARTICLE_FROM,
                                                   "article.topic IN $D AND 
author=person.id"
!                                                  " AND article.up=0 AND 
Unix_Timestamp(calstart)>=$d"
                                                   " AND 24*60*60-1+Unix_timestamp("
!                                                  "     Date_Add(calstart, INTERVAL 
caldays DAY))<=$d",
!                                                  sortv, topics, startv, stopv);
            else
                    php_midgard_select(&MidgardArticle, return_value,
                                                   ARTICLE_SELECT "," 
ARTICLE_CALENDAR, ARTICLE_FROM,
                                                   "article.type=$d AND article.topic 
IN $D"
                                                   " AND author=person.id"
!                                                  " AND article.up=0 AND 
Unix_Timestamp(calstart)>=$d"
                                                   " AND 24*60*60-1+Unix_timestamp("
!                                                  "     Date_Add(calstart, INTERVAL 
caldays DAY))<=$d",
!                                                  sortv, typev, topics, startv, 
stopv);
                free(topics);
        }
  }
  
  MGD_FUNCTION(ret_type, list_topic_calendar_all_fast, (type param))



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to