summaryrefslogtreecommitdiff
path: root/Calendar.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2005-12-18 17:28:34 +0000
committerLester Caine <lester@lsces.co.uk>2005-12-18 17:28:34 +0000
commit302b267e93928d3777681a81e2b47d463cfed49a (patch)
treed747a5c27316b6b5a00f4e724a15a376bbdddc99 /Calendar.php
parent6af09347a965915b7649411b0ee65e4aa9de0d61 (diff)
downloadcalendar-302b267e93928d3777681a81e2b47d463cfed49a.tar.gz
calendar-302b267e93928d3777681a81e2b47d463cfed49a.tar.bz2
calendar-302b267e93928d3777681a81e2b47d463cfed49a.zip
prepend calendar preferences with calendar_
Ideally this would be handled via the packages column in tiki_preferences in future versions
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 cbfee77..7300790 100644
--- a/Calendar.php
+++ b/Calendar.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.26 2005/12/06 00:10:10 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.27 2005/12/18 17:28:33 lsces 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;