Date: 09/08/99
- Next message: ajulrich <email protected>: "[PHP-DEV] Bug #2267: Cannot compile apache 1.3.9 with php3 support"
- Previous message: nitro <email protected>: "[PHP-DEV] Bug #2266: I can't compile the apache module"
- Next in thread: Mark Musone: "[PHP-DEV] cvs: /php3/functions php3_mcal.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
musone Wed Sep 8 17:17:29 1999 EDT
Modified files:
/php3/functions php3_mcal.c
Log:
added recurrence onbjects and constants
Index: php3/functions/php3_mcal.c
diff -u php3/functions/php3_mcal.c:1.23 php3/functions/php3_mcal.c:1.24
--- php3/functions/php3_mcal.c:1.23 Wed Sep 8 15:30:58 1999
+++ php3/functions/php3_mcal.c Wed Sep 8 17:17:27 1999
@@ -181,8 +181,29 @@
REGISTER_MAIN_LONG_CONSTANT("MCAL_SEPTEMBER",SEPTEMBER, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("MCAL_OCTOBER",OCTOBER, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("MCAL_NOVEMBER",NOVEMBER, CONST_PERSISTENT | CONST_CS);
- REGISTER_MAIN_LONG_CONSTANT("MCAL_DECEMBER",DECEMBER, CONST_PERSISTENT | CONST_CS);
+
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_RECUR_NONE",RECUR_NONE, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_RECUR_DAILY",RECUR_DAILY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_RECUR_WEEKLY",RECUR_WEEKLY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_RECUR_MONTHLY_MDAY",RECUR_MONTHLY_MDAY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_RECUR_MONTHLY_WDAY",RECUR_MONTHLY_WDAY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_RECUR_YEARLY",RECUR_YEARLY, CONST_PERSISTENT | CONST_CS);
+
+
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_SUNDAY",M_SUNDAY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_MONDAY",M_MONDAY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_TUESDAY",M_TUESDAY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_WEDNESDAY",M_WEDNESDAY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_THURSDAY",M_THURSDAY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_FRIDAY",M_FRIDAY, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_SATURDAY",M_SATURDAY, CONST_PERSISTENT | CONST_CS);
+
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_WEEKDAYS",M_WEEKDAYS, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_WEEKEND",M_WEEKEND, CONST_PERSISTENT | CONST_CS);
+ REGISTER_MAIN_LONG_CONSTANT("MCAL_M_ALLDAYS",M_ALLDAYS, CONST_PERSISTENT | CONST_CS);
+
+
return SUCCESS;
}
@@ -415,7 +436,7 @@
void make_event_object(pval *mypvalue,CALEVENT *event)
{
- pval start,end;
+ pval start,end,recurend;
object_init(mypvalue);
add_property_long(mypvalue,"id",event->id);
add_property_long(mypvalue,"public",event->public);
@@ -457,6 +478,23 @@
add_property_string(mypvalue,"title",event->title,1);
add_property_string(mypvalue,"description",event->description,1);
add_property_long(mypvalue,"alarm",event->alarm);
+ add_property_long(mypvalue,"recur_type",event->recur_type);
+ add_property_long(mypvalue,"recur_interval",event->recur_interval);
+ object_init(&recurend);
+ if(event->recur_enddate.has_date)
+ {
+ add_property_long(&recurend,"year",event->recur_enddate.year);
+ add_property_long(&recurend,"month",event->recur_enddate.mon);
+ add_property_long(&recurend,"mday",event->recur_enddate.mday);
+ }
+ if(event->recur_enddate.has_time)
+ {
+ add_property_long(&recurend,"hour",event->recur_enddate.hour);
+ add_property_long(&recurend,"min",event->recur_enddate.min);
+ add_property_long(&recurend,"sec",event->recur_enddate.sec);
+ }
+ add_assoc_object(mypvalue, "recur_enddate",recurend);
+ add_property_long(mypvalue,"recur_data",event->recur_data.weekly_wday);
}
@@ -1140,7 +1178,7 @@
if(myargc > 4) myhour=hour->value.lval;
if(myargc > 5) mymin=min->value.lval;
if(myargc > 6) mysec=sec->value.lval;
- if(myargc >4) dt_settime(&(mcal_le_struct->event->end),year->value.lval,month->value.lval,date->value.lval);
+ if(myargc >4) dt_settime(&(mcal_le_struct->event->end),myhour,mymin,mysec);
}
/* }}} */
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: ajulrich <email protected>: "[PHP-DEV] Bug #2267: Cannot compile apache 1.3.9 with php3 support"
- Previous message: nitro <email protected>: "[PHP-DEV] Bug #2266: I can't compile the apache module"
- Next in thread: Mark Musone: "[PHP-DEV] cvs: /php3/functions php3_mcal.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

