summaryrefslogtreecommitdiff
path: root/Calendar.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-12-26 12:28:00 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-12-26 12:28:00 +0000
commit420209d46518b2ab5bc7064832c5a346f0d57907 (patch)
tree8f71bd5c44fbe78684bb9dcd44fa813356626223 /Calendar.php
parent3096c1e2f1f8f755e795c2766d15a339696e800d (diff)
downloadcalendar-420209d46518b2ab5bc7064832c5a346f0d57907.tar.gz
calendar-420209d46518b2ab5bc7064832c5a346f0d57907.tar.bz2
calendar-420209d46518b2ab5bc7064832c5a346f0d57907.zip
merge recent changes into HEAD
Diffstat (limited to 'Calendar.php')
-rw-r--r--Calendar.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/Calendar.php b/Calendar.php
index 520ffbf..aad59ec 100644
--- a/Calendar.php
+++ b/Calendar.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.28 2005/12/18 22:34:09 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.30 2006/01/10 21:19:49 squareing Exp $
* @package calendar
*/
@@ -14,7 +14,7 @@ include_once( KERNEL_PKG_PATH . 'BitDate.php' );
*/
// set week offset - start with a day other than monday
-define( 'WEEK_OFFSET', !empty( $gBitUser->mUserPrefs['week_offset'] ) ? $gBitUser->mUserPrefs['week_offset'] : $gBitSystem->getPreference( 'week_offset', 0 ) );
+define( 'WEEK_OFFSET', !empty( $gBitUser->mUserPrefs['calendar_week_offset'] ) ? $gBitUser->mUserPrefs['calendar_week_offset'] : $gBitSystem->getPreference( 'calendar_week_offset', 0 ) );
class Calendar extends LibertyContent {
@@ -133,14 +133,14 @@ class Calendar extends LibertyContent {
$ret = array();
if( $pDateHash['view_mode'] == 'day' ) {
// calculare what the visible day view range is
- $day_start = isset( $gBitUser->mUserPrefs['day_start'] ) ? $gBitUser->mUserPrefs['day_start'] : $gBitSystem->getPreference( 'day_start', 0 );
- $day_end = isset( $gBitUser->mUserPrefs['day_end'] ) ? $gBitUser->mUserPrefs['day_end'] : $gBitSystem->getPreference( 'day_end', 24 );
+ $day_start = isset( $gBitUser->mUserPrefs['calendar_day_start'] ) ? $gBitUser->mUserPrefs['calendar_day_start'] : $gBitSystem->getPreference( 'calendar_day_start', 0 );
+ $day_end = isset( $gBitUser->mUserPrefs['calendar_day_end'] ) ? $gBitUser->mUserPrefs['calendar_day_end'] : $gBitSystem->getPreference( 'calendar_day_end', 24 );
$start_time = $this->mDate->gmmktime( 0, 0, 0, $focus['mon'], $focus['mday'], $focus['year'] ) + ( 60 * 60 * $day_start );
$stop_time = $this->mDate->gmmktime( 0, 0, 0, $focus['mon'], $focus['mday'] + 1, $focus['year'] ) - ( 60 * 60 * ( 24 - $day_end ) );
$hours_count = ( $stop_time - $start_time ) / ( 60 * 60 );
// allow for custom time intervals
- $hour_fraction = !empty( $gBitUser->mUserPrefs['hour_fraction'] ) ? $gBitUser->mUserPrefs['hour_fraction'] : $gBitSystem->getPreference( 'hour_fraction', 1 );
+ $hour_fraction = !empty( $gBitUser->mUserPrefs['calendar_hour_fraction'] ) ? $gBitUser->mUserPrefs['calendar_hour_fraction'] : $gBitSystem->getPreference( 'calendar_hour_fraction', 1 );
$row_count = $hours_count * $hour_fraction;
$start_time_info = $this->mDate->getdate( $start_time );
$hour = $start_time_info['hours'] - 1;