diff options
| author | Christian Fowler <spider@viovio.com> | 2006-03-01 20:16:04 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2006-03-01 20:16:04 +0000 |
| commit | 53e46ade8c180f1dd0802426bcea7a79ffe103b3 (patch) | |
| tree | 08295b874dae7118acb9d4f22503ad4dd4f5b1b4 | |
| parent | 325708e3a980575488fc2a4035896d198e2906f3 (diff) | |
| download | calendar-53e46ade8c180f1dd0802426bcea7a79ffe103b3.tar.gz calendar-53e46ade8c180f1dd0802426bcea7a79ffe103b3.tar.bz2 calendar-53e46ade8c180f1dd0802426bcea7a79ffe103b3.zip | |
move BitSystem:: preferences methods to get/set/load/storeConfig to avoid conflict with new content preferences
| -rw-r--r-- | Calendar.php | 10 | ||||
| -rw-r--r-- | index.php | 4 | ||||
| -rw-r--r-- | templates/admin_calendar.tpl | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Calendar.php b/Calendar.php index 7bf8a88..fd7724d 100644 --- a/Calendar.php +++ b/Calendar.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.32 2006/02/02 14:39:46 hash9 Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_calendar/Calendar.php,v 1.33 2006/03/01 20:16:03 spiderr Exp $ * @package calendar */ @@ -9,7 +9,7 @@ */ include_once( KERNEL_PKG_PATH . 'BitDate.php' ); // set week offset - start with a day other than monday -define( 'WEEK_OFFSET', !empty( $gBitUser->mUserPrefs['calendar_week_offset'] ) ? $gBitUser->mUserPrefs['calendar_week_offset'] : $gBitSystem->getPreference( 'calendar_week_offset', 0 ) ); +define( 'WEEK_OFFSET', !empty( $gBitUser->mUserPrefs['calendar_week_offset'] ) ? $gBitUser->mUserPrefs['calendar_week_offset'] : $gBitSystem->getConfig( 'calendar_week_offset', 0 ) ); /** * @package calendar @@ -132,14 +132,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['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 ); + $day_start = isset( $gBitUser->mUserPrefs['calendar_day_start'] ) ? $gBitUser->mUserPrefs['calendar_day_start'] : $gBitSystem->getConfig( 'calendar_day_start', 0 ); + $day_end = isset( $gBitUser->mUserPrefs['calendar_day_end'] ) ? $gBitUser->mUserPrefs['calendar_day_end'] : $gBitSystem->getConfig( '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['calendar_hour_fraction'] ) ? $gBitUser->mUserPrefs['calendar_hour_fraction'] : $gBitSystem->getPreference( 'calendar_hour_fraction', 1 ); + $hour_fraction = !empty( $gBitUser->mUserPrefs['calendar_hour_fraction'] ) ? $gBitUser->mUserPrefs['calendar_hour_fraction'] : $gBitSystem->getConfig( 'calendar_hour_fraction', 1 ); $row_count = $hours_count * $hour_fraction; $start_time_info = $this->mDate->getdate( $start_time ); $hour = $start_time_info['hours'] - 1; @@ -1,6 +1,6 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.40 2006/02/08 22:01:04 squareing Exp $ +// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.41 2006/03/01 20:16:03 spiderr Exp $ // Copyright( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. @@ -124,7 +124,7 @@ for( $i = 0; $i < WEEK_OFFSET; $i++ ) { $gBitSmarty->assign( 'dayNames', $dayNames ); // TODO: make this a pref -$gBitSmarty->assign( 'trunc', $gBitSystem->getPreference( 'title_truncate', 12 ) ); +$gBitSmarty->assign( 'trunc', $gBitSystem->getConfig( 'title_truncate', 12 ) ); $gBitSystem->display( 'bitpackage:calendar/calendar.tpl', tra( 'Calendar' ) ); ?> diff --git a/templates/admin_calendar.tpl b/templates/admin_calendar.tpl index e67068c..472840d 100644 --- a/templates/admin_calendar.tpl +++ b/templates/admin_calendar.tpl @@ -1,6 +1,6 @@ {strip} {if !$settings} - {assign var=settings value=$gBitSystemPrefs} + {assign var=settings value=$gBitSystem->getConfig('') {/if} {form legend="Calendar Settings"} |
