summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-01-10 21:19:50 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-01-10 21:19:50 +0000
commitfab31669d9141369324162cdf6c649b482162e4c (patch)
tree3bfd00348cb997423ba88b00530c384592899a30 /index.php
parent420209d46518b2ab5bc7064832c5a346f0d57907 (diff)
downloadcalendar-fab31669d9141369324162cdf6c649b482162e4c.tar.gz
calendar-fab31669d9141369324162cdf6c649b482162e4c.tar.bz2
calendar-fab31669d9141369324162cdf6c649b482162e4c.zip
merge recent changes into HEAD
Diffstat (limited to 'index.php')
-rw-r--r--index.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/index.php b/index.php
index 27451a0..3546239 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.36 2005/12/06 00:10:10 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_calendar/index.php,v 1.37 2006/01/10 21:19:49 squareing 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.
@@ -16,10 +16,15 @@ $gBitSystem->verifyPermission( 'bit_p_view_calendar' );
// set up $_SESSION and $_REQUEST to make the usable later on
// setup list of bit items displayed
if( !empty( $_REQUEST["content_type_guid"] ) ) {
+ if( $gBitUser->isRegistered() ) {
+ $gBitUser->storePreference( 'calendar_default_guids', serialize( $_REQUEST['content_type_guid'] ) );
+ }
$_SESSION['calendar']['content_type_guid'] = $_REQUEST["content_type_guid"];
+} elseif( !isset( $_SESSION['calendar']['content_type_guid'] ) && $gBitUser->getPreference( 'calendar_default_guids' ) && $gBitUser->isRegistered() ) {
+ $_SESSION['calendar']['content_type_guid'] = unserialize( $gBitUser->getPreference( 'calendar_default_guids' ) );
} elseif( !isset( $_SESSION['calendar']['content_type_guid'] ) ) {
$_SESSION['calendar']['content_type_guid'] = array();
-} elseif( isset( $_REQUEST["refresh"] )and !isset( $_REQUEST["content_type_guid"] ) ) {
+} elseif( isset( $_REQUEST["refresh"] ) && !isset( $_REQUEST["content_type_guid"] ) ) {
$_SESSION['calendar']['content_type_guid'] = array();
}