diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2005-12-26 12:28:00 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2005-12-26 12:28:00 +0000 |
| commit | 420209d46518b2ab5bc7064832c5a346f0d57907 (patch) | |
| tree | 8f71bd5c44fbe78684bb9dcd44fa813356626223 /modules | |
| parent | 3096c1e2f1f8f755e795c2766d15a339696e800d (diff) | |
| download | calendar-420209d46518b2ab5bc7064832c5a346f0d57907.tar.gz calendar-420209d46518b2ab5bc7064832c5a346f0d57907.tar.bz2 calendar-420209d46518b2ab5bc7064832c5a346f0d57907.zip | |
merge recent changes into HEAD
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/mod_calendar.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/modules/mod_calendar.php b/modules/mod_calendar.php index cc7840c..7b6b1e8 100644 --- a/modules/mod_calendar.php +++ b/modules/mod_calendar.php @@ -1,15 +1,28 @@ <?php +/** + * @version $Header: /cvsroot/bitweaver/_bit_calendar/modules/mod_calendar.php,v 1.9 2006/01/10 21:19:49 squareing Exp $ + * @package calendar + * @subpackage modules + */ + +/** + * Required setup + */ include_once( CALENDAR_PKG_PATH.'Calendar.php' ); $cal = new Calendar(); // set up the todate -if( !empty( $_REQUEST["todate"] ) ) { +if( !empty( $_REQUEST['todate'] ) ) { // clean up todate. who knows where this has come from - $_SESSION['calendar']['focus_date'] = $_REQUEST['todate'] = adodb_mktime( 0, 0, 0, adodb_date( 'm', $_REQUEST['todate'] ), adodb_date( 'd', $_REQUEST['todate'] ), adodb_date( 'Y', $_REQUEST['todate'] ) ); + if ( is_numeric( $_REQUEST['todate'] ) ) { + $_SESSION['calendar']['focus_date'] = $_REQUEST['todate'] = $cal->mDate->gmmktime( 0, 0, 0, $cal->mDate->date( 'm', $_REQUEST['todate'] ), $cal->mDate->date( 'd', $_REQUEST['todate'] ), $cal->mDate->date( 'Y', $_REQUEST['todate'] ) ); + } else { + $_SESSION['calendar']['focus_date'] = $_REQUEST['todate'] = $cal->mDate->gmmktime( 0, 0, 0, $cal->mDate->date2( 'm', $_REQUEST['todate'] ), $cal->mDate->date2( 'd', $_REQUEST['todate'] ), $cal->mDate->date2( 'Y', $_REQUEST['todate'] ) ); + } } elseif( !empty( $_SESSION['calendar']['focus_date'] ) ) { $_REQUEST["todate"] = $_SESSION['calendar']['focus_date']; } else { - $_SESSION['calendar']['focus_date'] = adodb_mktime( 0, 0, 0, adodb_date( 'm' ), adodb_date( 'd' ), adodb_date( 'Y' ) ); + $_SESSION['calendar']['focus_date'] = $cal->mDate->gmmktime( 0, 0, 0, $cal->mDate->date( 'm' ), $cal->mDate->date( 'd' ), $cal->mDate->date( 'Y' ) ); $_REQUEST["todate"] = $_SESSION['calendar']['focus_date']; } |
