From 302b267e93928d3777681a81e2b47d463cfed49a Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Sun, 18 Dec 2005 17:28:34 +0000 Subject: prepend calendar preferences with calendar_ Ideally this would be handled via the packages column in tiki_preferences in future versions --- Calendar.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Calendar.php') diff --git a/Calendar.php b/Calendar.php index cbfee77..7300790 100644 --- a/Calendar.php +++ b/Calendar.php @@ -1,6 +1,6 @@ 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; -- cgit v1.3