diff options
| author | Lester Caine <lester@lsces.co.uk> | 2005-07-21 09:39:31 +0000 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2005-07-21 09:39:31 +0000 |
| commit | 9c383b35b1bbe5b0d55b9f2f6807737ef87f1cda (patch) | |
| tree | 33d9662d9cf46045eac7faa6680b18411e669951 /admin | |
| parent | 67a019e565c8e3bbfb8980358ead12dc8cfc8bc4 (diff) | |
| download | calendar-9c383b35b1bbe5b0d55b9f2f6807737ef87f1cda.tar.gz calendar-9c383b35b1bbe5b0d55b9f2f6807737ef87f1cda.tar.bz2 calendar-9c383b35b1bbe5b0d55b9f2f6807737ef87f1cda.zip | |
Stripped legacy event code from calendar
It now provides a calendar view of liberty content
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/admin_calendar_inc.php | 20 | ||||
| -rw-r--r-- | admin/schema_inc.php | 73 |
2 files changed, 1 insertions, 92 deletions
diff --git a/admin/admin_calendar_inc.php b/admin/admin_calendar_inc.php index f1ba944..54c2cbd 100644 --- a/admin/admin_calendar_inc.php +++ b/admin/admin_calendar_inc.php @@ -1,17 +1,11 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_calendar/admin/admin_calendar_inc.php,v 1.2 2005/07/15 16:04:07 lsces Exp $ +// $Header: /cvsroot/bitweaver/_bit_calendar/admin/admin_calendar_inc.php,v 1.3 2005/07/21 09:39:31 lsces 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. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. -if (isset($_REQUEST["calendarset"]) && isset($_REQUEST["homeCalendar"])) { - - $gBitSystem->storePreference("home_calendar", $_REQUEST["homeCalendar"]); - $smarty->assign('home_calendar', $_REQUEST["homeCalendar"]); -} - include_once( CALENDAR_PKG_PATH.'CalendarLib.php' ); $formCalendarFeatures = array( @@ -38,18 +32,6 @@ if (isset($_REQUEST["calendarfeatures"])) { foreach( $formCalendarFeatures as $item => $data ) { simple_set_toggle( $item ); } - - if ($gBitSystem->isPackageActive( 'categories' )) { - if (isset($_REQUEST["cal_categ"]) && $_REQUEST["cal_categ"] == "on") { - $gBitSystem->storePreference("cal_categ", 'y'); - $smarty->assign("cal_categ", 'y'); - } else { - $gBitSystem->storePreference("blog_categ", 'n'); - $smarty->assign("blog_categ", 'n'); - } - $gBitSystem->storePreference("cal_parent_categ", $_REQUEST["cal_parent_categ"]); - $smarty->assign('cal_parent_categ', $_REQUEST['cal_parent_categ']); - } } ?> diff --git a/admin/schema_inc.php b/admin/schema_inc.php index adad1e4..f1acc9e 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -1,77 +1,8 @@ <?php - -$tables = array( - -'tiki_calendar_categories' => " - cal_cat_id I4 AUTO PRIMARY, - calendar_id I4 NOTNULL, - name C(160) NOTNULL -", - -'tiki_calendar_items' => " - calitem_id I4 AUTO PRIMARY, - calendar_id I4 NOTNULL, - start_time I8 NOTNULL, - end_time I8 NOTNULL, - location_id I4, - category_id I4, - priority C(1) NOTNULL DEFAULT '1', - status C(1) NOTNULL DEFAULT '0', - url C(255), - lang C(2) NOTNULL default 'en', - name C(255) NOTNULL, - description B, - user_id I4, - created I8 NOTNULL, - lastmodif I8 NOTNULL -", - -'tiki_calendar_locations' => " - calloc_id I4 AUTO PRIMARY, - calendar_id I4 NOTNULL, - name C(160) NOTNULL, - description X -", - -'tiki_calendar_roles' => " - calitem_id I4 NOTNULL PRIMARY, - user_id I4 NOTNULL PRIMARY, - role C(1) NOTNULL DEFAULT '0' -", - -'tiki_calendars' => " - calendar_id I4 AUTO PRIMARY, - name C(80) NOTNULL, - description C(255), - user_id I4 NOTNULL, - customlocations C(1) NOTNULL DEFAULT 'n', - customcategories C(1) NOTNULL DEFAULT 'n', - customlanguages C(1) NOTNULL DEFAULT 'n', - custompriorities C(1) NOTNULL DEFAULT 'n', - customparticipants C(1) NOTNULL DEFAULT 'n', - created I8 NOTNULL, - lastmodif I8 NOTNULL -" - -); - global $gBitInstaller; $gBitInstaller->makePackageHomeable('calendar'); -foreach( array_keys( $tables ) AS $tableName ) { - $gBitInstaller->registerSchemaTable( CALENDAR_PKG_NAME, $tableName, $tables[$tableName] ); -} - -// ### Indexes -$indices = array ( - 'tiki_calendar_categories_idx' => array( 'table' => 'tiki_calendar_categories', 'cols' => 'calendar_id,name', 'opts' => NULL ), - 'tiki_calendar_items_idx' => array( 'table' => 'tiki_calendar_items', 'cols' => 'calendar_id', 'opts' => NULL ), - 'tiki_calendar_locations_idx' => array( 'table' => 'tiki_calendar_locations', 'cols' => 'name', 'opts' => NULL ) -); - -$gBitInstaller->registerSchemaIndexes( CALENDAR_PKG_NAME, $indices ); - $gBitInstaller->registerPackageInfo( CALENDAR_PKG_NAME, array( 'description' => "Calendar package to display bitweaver entries by date, and set events", 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>', @@ -82,14 +13,10 @@ $gBitInstaller->registerPackageInfo( CALENDAR_PKG_NAME, array( // ### Default User Permissions $gBitInstaller->registerUserPermissions( CALENDAR_PKG_NAME, array( array('bit_p_view_calendar', 'Can browse the calendar', 'basic', CALENDAR_PKG_NAME), - array('bit_p_change_events', 'Can change events in the calendar', 'registered', CALENDAR_PKG_NAME), - array('bit_p_add_events', 'Can add events in the calendar', 'registered', CALENDAR_PKG_NAME), - array('bit_p_admin_calendar', 'Can create/admin calendars', 'admin', CALENDAR_PKG_NAME) ) ); // ### Default Preferences $gBitInstaller->registerPreferences( CALENDAR_PKG_NAME, array( -// array ('kernel', 'feature_jscalendar', 'n'), array (CALENDAR_PKG_NAME, 'calendar_blogs', 'y'), array (CALENDAR_PKG_NAME, 'calendar_users', 'y'), array (CALENDAR_PKG_NAME, 'calendar_wiki', 'y') |
