Remove all traces of categories from kronolith - they are being replaced
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 4 Feb 2009 19:16:41 +0000 (14:16 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 4 Feb 2009 19:16:41 +0000 (14:16 -0500)
by tags.  Migration script still to come. Also, still need to
use tags as the categories in iCalendar.

34 files changed:
kronolith/config/prefs.php.dist
kronolith/data.php
kronolith/feed/index.php
kronolith/lib/Block/monthlist.php
kronolith/lib/Block/prevmonthlist.php
kronolith/lib/Block/summary.php
kronolith/lib/Driver.php
kronolith/lib/Driver/kolab.php
kronolith/lib/Driver/sql.php
kronolith/lib/Kronolith.php
kronolith/lib/Maintenance/Task/purge_events.php
kronolith/lib/Views/Day.php
kronolith/lib/Views/EditEvent.php
kronolith/lib/Views/Event.php
kronolith/lib/Views/Month.php
kronolith/lib/Views/Week.php
kronolith/lib/Views/Year.php
kronolith/lib/base.php
kronolith/new.php
kronolith/scripts/sql/kronolith.mssql.sql
kronolith/scripts/sql/kronolith.mysql.sql
kronolith/scripts/sql/kronolith.oci8.sql
kronolith/scripts/sql/kronolith.pgsql.sql
kronolith/scripts/sql/kronolith.sql
kronolith/scripts/sql/kronolith.xml
kronolith/search.php
kronolith/templates/common-header.inc
kronolith/templates/edit/edit.inc
kronolith/templates/edit/javascript.inc
kronolith/templates/search/event_headers.inc
kronolith/templates/search/event_summaries.inc
kronolith/templates/search/search_advanced.inc
kronolith/templates/view/view.inc
kronolith/themes/screen.css

index 1b8644c..6f15323 100644 (file)
@@ -13,7 +13,7 @@ $prefGroups['view'] = array(
                        'time_between_days', 'week_start_monday',
                        'day_hour_start', 'day_hour_end', 'day_hour_force',
                        'slots_per_hour', 'show_icons', 'show_time', 'show_location',
-                       'show_legend', 'show_panel', 'show_fb_legend', 'show_shared_side_by_side', 'show_external_colors'),
+                       'show_panel', 'show_fb_legend', 'show_shared_side_by_side'),
 );
 
 $prefGroups['summary'] = array(
@@ -203,16 +203,6 @@ $_prefs['show_location'] = array(
     'desc' => _("Choose the views to show event locations in:"),
 );
 
-// show category legend?
-// a value of 0 = no, 1 = yes
-$_prefs['show_legend'] = array(
-    'value' => 1,
-    'locked' => false,
-    'shared' => false,
-    'type' => 'checkbox',
-    'desc' => _("Show category legend?"),
-);
-
 // show the calendar options panel?
 // a value of 0 = no, 1 = yes
 $_prefs['show_panel'] = array(
@@ -271,15 +261,6 @@ $_prefs['summary_alarms'] = array(
     'desc' => _("Show only events that have an alarm set?"),
 );
 
-// show external event colors?
-$_prefs['show_external_colors'] = array(
-    'value' => 1,
-    'locked' => false,
-    'shared' => false,
-    'type' => 'checkbox',
-    'desc' => _("Show external events using category colors?"),
-);
-
 // default calendar selection widget
 $_prefs['shareselect'] = array('type' => 'special');
 
@@ -458,21 +439,6 @@ $_prefs['fb_cals'] = array(
 // Free/Busy calendars selector.
 $_prefs['fb_cals_select'] = array('type' => 'special');
 
-// The following two preferences are no longer used and only necessary for the
-// upgrade script.
-$_prefs['event_categories'] = array(
-    'value' => '',
-    'locked' => false,
-    'shared' => false,
-    'type' => 'implicit'
-);
-$_prefs['event_colors'] = array(
-    'value' => '',
-    'locked' => false,
-    'shared' => false,
-    'type' => 'implicit'
-);
-
 $_prefs['purge_events'] = array(
     'value' => 0,
     'locked' => false,
index 9163c9f..556d25c 100644 (file)
@@ -59,7 +59,6 @@ $app_fields    = array('title' => _("Title"),
                        'alarm_date' => _("Alarm Date"),
                        'alarm_time' => _("Alarm Time"),
                        'description' => _("Description"),
-                       'category' => _("Category"),
                        'location' => _("Location"),
                        'recur_type' => _("Recurrence Type"),
                        'recur_end_date' => _("Recurrence End Date"),
@@ -121,10 +120,9 @@ case 'export':
                 if (is_a($event, 'PEAR_Error')) {
                     continue;
                 }
-
+//@TODO Tags
                 $row = array();
                 $row['title'] = $event->getTitle();
-                $row['category'] = $event->category;
                 $row['location'] = $event->location;
                 $row['description'] = $event->description;
                 $row['start_date'] = sprintf('%d-%02d-%02d', $event->start->year, $event->start->month, $event->start->mday);
@@ -222,11 +220,6 @@ if (!$error) {
 
 /* We have a final result set. */
 if (is_array($next_step)) {
-    /* Create a category manager. */
-    require_once 'Horde/Prefs/CategoryManager.php';
-    $cManager = new Prefs_CategoryManager();
-    $categories = $cManager->get();
-
     $events = array();
     $error = false;
     $max_events = Kronolith::hasPermission('max_events');
@@ -291,12 +284,6 @@ if (is_array($next_step)) {
             break;
         }
 
-        $category = $event->getCategory();
-        if (!empty($category) && !in_array($category, $categories)) {
-            $cManager->add($category);
-            $categories[] = $category;
-        }
-
         if ($max_events !== true) {
             $num_events++;
         }
index 0bab076..e3ed106 100644 (file)
@@ -148,7 +148,6 @@ foreach ($events as $day_events) {
         $entries[$id]['desc'] = @htmlspecialchars($desc, ENT_COMPAT, NLS::getCharset());
         $entries[$id]['url'] = htmlspecialchars(Horde::url($event->getViewUrl(), true, -1));
         $entries[$id]['modified'] = $modified->format(DATE_ATOM);
-        $entries[$id]['category'] = $event->getCategory();
     }
 }
 $template->set('entries', $entries, true);
index c07b820..b0af310 100644 (file)
@@ -86,14 +86,14 @@ class Horde_Block_Kronolith_monthlist extends Horde_Block {
             return '<em>' . $all_events->getMessage() . '</em>';
         }
 
-        $html = '<link href="' . Horde::applicationUrl('themes/categoryCSS.php', true) . '" rel="stylesheet" type="text/css" />';
-
         /* How many days do we need to check. */
         $days = Date_Calc::dateDiff($startDate->mday, $startDate->month, $startDate->year,
                                     $endDate->mday, $endDate->month, $endDate->year);
 
         /* Loop through the days. */
         $totalevents = 0;
+
+        $html = '';
         for ($i = 0; $i < $days; ++$i) {
             $day = new Kronolith_Day($startDate->month, $today + $i);
             $date_stamp = $day->dateString();
@@ -149,9 +149,6 @@ class Horde_Block_Kronolith_monthlist extends Horde_Block {
                     $html .= $event->getLocation();
                 }
 
-                $html .= '</td><td class="text">&nbsp;&nbsp;&nbsp;</td>' .
-                    '<td class="block-eventbox category' . hash('md5', $event->getCategory()) . '" valign="top">';
-
                 if ($event->start->compareDate($now) < 0 &&
                     $event->end->compareDate($now) > 0) {
                     $html .= '<strong>';
index 4d438c0..89d7792 100644 (file)
@@ -81,7 +81,7 @@ class Horde_Block_Kronolith_prevmonthlist extends Horde_Block {
             return '<em>' . $all_events->getMessage() . '</em>';
         }
 
-        $html = '<link href="' . Horde::applicationUrl('themes/categoryCSS.php', true) . '" rel="stylesheet" type="text/css" />';
+        $html = '';
 
         /* How many days do we need to check. */
         $days = Date_Calc::dateDiff($startDate->mday, $startDate->month, $startDate->year,
@@ -141,9 +141,6 @@ class Horde_Block_Kronolith_prevmonthlist extends Horde_Block {
                     $html .= $event->getLocation();
                 }
 
-                $html .= '</td><td class="text">&nbsp;&nbsp;&nbsp;</td>' .
-                    '<td class="block-eventbox category' . hash('md5', $event->getCategory()) . '" valign="top">';
-
                 if ($event->start->compareDate($startDate) < 0 &&
                     $event->end->compareDate($startDate) > 0) {
                     $html .= '<strong>';
index a3a1ac8..8492ca5 100644 (file)
@@ -60,7 +60,6 @@ class Horde_Block_Kronolith_summary extends Horde_Block {
         global $registry, $prefs;
         require_once dirname(__FILE__) . '/../base.php';
         require_once KRONOLITH_BASE . '/lib/Day.php';
-        require_once 'Horde/Prefs/CategoryManager.php';
 
         Horde::addScriptFile('tooltip.js', 'horde', true);
 
@@ -174,9 +173,6 @@ class Horde_Block_Kronolith_summary extends Horde_Block {
                     $html .= '</strong>';
                 }
 
-                $html .= '</td><td class="text">&nbsp;&nbsp;&nbsp;</td>' .
-                    '<td class="block-eventbox category' . hash('md5', $event->getCategory()) . '" valign="top">';
-
                 if ($event_active) {
                     $html .= '<strong>';
                 }
@@ -193,7 +189,7 @@ class Horde_Block_Kronolith_summary extends Horde_Block {
             return '<em>' . _("No events to display") . '</em>';
         }
 
-        return '<link href="' . Horde::applicationUrl('themes/categoryCSS.php', true) . '" rel="stylesheet" type="text/css" /><table cellspacing="0" width="100%">' . $html . '</table>';
+        return '<table cellspacing="0" width="100%">' . $html . '</table>';
     }
 
 }
index 5e05acf..27c5727 100644 (file)
@@ -144,9 +144,7 @@ class Kronolith_Driver {
                 (empty($query->description) ||
                  stristr($event->getDescription(), $query->description)) &&
                 (empty($query->creatorID) ||
-                 stristr($event->getCreatorID(), $query->creatorID)) &&
-                (!isset($query->category) ||
-                 $event->getCategory() == $query->category) &&
+                 stristr($event->getCreatorID(), $query->creatorID))  &&
                 (!isset($query->status) ||
                  $event->getStatus() == $query->status)) {
                 $results[] = $event;
@@ -325,13 +323,6 @@ class Kronolith_Event {
     var $title = '';
 
     /**
-     * The category of this event.
-     *
-     * @var string
-     */
-    var $category = '';
-
-    /**
      * The location this event occurs at.
      *
      * @var string
@@ -647,10 +638,11 @@ class Kronolith_Event {
             if (!empty($this->description)) {
                 $vEvent->setAttribute('DESCRIPTION', $v1 ? $this->description : String::convertCharset($this->description, NLS::getCharset(), 'utf-8'));
             }
-            $categories = $this->getCategory();
-            if (!empty($categories)) {
-                $vEvent->setAttribute('CATEGORIES', $v1 ? $categories : String::convertCharset($categories, NLS::getCharset(), 'utf-8'));
-            }
+//@TODO: Tags -> iCal
+//            $categories = $this->getCategory();
+//            if (!empty($categories)) {
+//                $vEvent->setAttribute('CATEGORIES', $v1 ? $categories : String::convertCharset($categories, NLS::getCharset(), 'utf-8'));
+//            }
             if (!empty($this->location)) {
                 $vEvent->setAttribute('LOCATION', $v1 ? $this->location : String::convertCharset($this->location, NLS::getCharset(), 'utf-8'));
             }
@@ -840,24 +832,25 @@ class Kronolith_Event {
             $this->_sequence = $seq;
         }
 
-        // Title, category and description.
+        // Title, tags and description.
         $title = $vEvent->getAttribute('SUMMARY');
         if (!is_array($title) && !is_a($title, 'PEAR_Error')) {
             $this->setTitle($title);
         }
 
-        $categories = $vEvent->getAttribute('CATEGORIES');
-        if (!is_array($categories) && !is_a($categories, 'PEAR_Error')) {
-            // The CATEGORY attribute is delimited by commas, so split
-            // it up.
-            $categories = explode(',', $categories);
-
-            // We only support one category per event right now, so
-            // arbitrarily take the last one.
-            foreach ($categories as $category) {
-                $this->setCategory($category);
-            }
-        }
+// @TODO iCal -> Tags
+//        $categories = $vEvent->getAttribute('CATEGORIES');
+//        if (!is_array($categories) && !is_a($categories, 'PEAR_Error')) {
+//            // The CATEGORY attribute is delimited by commas, so split
+//            // it up.
+//            $categories = explode(',', $categories);
+//
+//            // We only support one category per event right now, so
+//            // arbitrarily take the last one.
+//            foreach ($categories as $category) {
+//                $this->setCategory($category);
+//            }
+//        }
         $desc = $vEvent->getAttribute('DESCRIPTION');
         if (!is_array($desc) && !is_a($desc, 'PEAR_Error')) {
             $this->setDescription($desc);
@@ -1083,14 +1076,6 @@ class Kronolith_Event {
         if (!empty($hash['description'])) {
             $this->setDescription($hash['description']);
         }
-        if (!empty($hash['category'])) {
-            global $cManager;
-            $categories = $cManager->get();
-            if (!in_array($hash['category'], $categories)) {
-                $cManager->add($hash['category']);
-            }
-            $this->setCategory($hash['category']);
-        }
         if (!empty($hash['location'])) {
             $this->setLocation($hash['location']);
         }
@@ -1567,26 +1552,6 @@ class Kronolith_Event {
     }
 
     /**
-     * Returns the category of this event.
-     *
-     * @return string  The category of this event.
-     */
-    function getCategory()
-    {
-        return $this->category;
-    }
-
-    /**
-     * Sets the category of this event.
-     *
-     * @param string $category  The category of this event.
-     */
-    function setCategory($category)
-    {
-        $this->category = $category;
-    }
-
-    /**
      * Returns the location this event occurs at.
      *
      * @return string  The location of this event.
@@ -1780,15 +1745,6 @@ class Kronolith_Event {
         $this->setLocation(Util::getFormData('location', $this->location));
         $this->setPrivate(Util::getFormData('private'));
 
-        // Category.
-        if ($new_category = Util::getFormData('new_category')) {
-            $new_category = $cManager->add($new_category);
-            $category = $new_category ? $new_category : '';
-        } else {
-            $category = Util::getFormData('category', $this->category);
-        }
-        $this->setCategory($category);
-
         // Status.
         $this->setStatus(Util::getFormData('status', $this->status));
 
index d41d7be..3124cf9 100644 (file)
@@ -479,7 +479,6 @@ class Kronolith_Driver_kolab_wrapper_old extends Kronolith_Driver_kolab_wrapper
 
         $this->_kolab->setStr('summary', $event->getTitle());
         $this->_kolab->setStr('body', $event->getDescription());
-        $this->_kolab->setStr('categories', $event->getCategory());
         $this->_kolab->setStr('location', $event->getLocation());
         if ($event->isPrivate()) {
             $this->_kolab->setStr('sensitivity', 'private');
@@ -769,7 +768,6 @@ class Kronolith_Event_kolab_old extends Kronolith_Event {
         $this->title = $kolab->getStr('summary');
         $this->description = $kolab->getStr('body');
         $this->location = $kolab->getStr('location');
-        $this->category = $kolab->getStr('categories');
 
         $class = String::lower($kolab->getStr('sensitivity'));
         if ($class == 'private' || $class == 'confidential') {
@@ -1429,9 +1427,6 @@ class Kronolith_Event_kolab_new extends Kronolith_Event {
         if (isset($event['location'])) {
             $this->location = $event['location'];
         }
-        if (isset($event['categories'])) {
-            $this->category = $event['categories'];
-        }
 
         if (isset($event['sensitivity']) &&
             ($event['sensitivity'] == 'private' || $event['sensitivity'] == 'confidential')) {
@@ -1541,7 +1536,6 @@ class Kronolith_Event_kolab_new extends Kronolith_Event {
         $event['summary'] = $this->title;
         $event['body']  = $this->description;
         $event['location'] = $this->location;
-        $event['categories'] = $this->category;
 
         if ($this->isPrivate()) {
             $event['sensitivity'] = 'private';
index 56cd702..6b13ebd 100644 (file)
@@ -132,15 +132,6 @@ class Kronolith_Driver_sql extends Kronolith_Driver {
                 $cond .= $binds;
             }
         }
-        if (isset($query->category)) {
-            $binds = Horde_SQL::buildClause($this->_db, 'event_category', '=', $this->convertToDriver($query->category), true);
-            if (is_array($binds)) {
-                $cond .= $binds[0] . ' AND ';
-                $values = array_merge($values, $binds[1]);
-            } else {
-                $cond .= $binds;
-            }
-        }
         if (isset($query->status)) {
             $binds = Horde_SQL::buildClause($this->_db, 'event_status', '=', $query->status, true);
             if (is_array($binds)) {
@@ -278,7 +269,7 @@ class Kronolith_Driver_sql extends Kronolith_Driver {
     {
         $q = 'SELECT event_id, event_uid, event_description, event_location,' .
             ' event_private, event_status, event_attendees,' .
-            ' event_title, event_category, event_recurcount,' .
+            ' event_title, event_recurcount,' .
             ' event_recurtype, event_recurenddate, event_recurinterval,' .
             ' event_recurdays, event_start, event_end, event_allday,' .
             ' event_alarm, event_alarm_methods, event_modified,' .
@@ -375,7 +366,7 @@ class Kronolith_Driver_sql extends Kronolith_Driver {
 
         $query = 'SELECT event_id, event_uid, event_description,' .
             ' event_location, event_private, event_status, event_attendees,' .
-            ' event_title, event_category, event_recurcount,' .
+            ' event_title, event_recurcount,' .
             ' event_recurtype, event_recurenddate, event_recurinterval,' .
             ' event_recurdays, event_start, event_end, event_allday,' .
             ' event_alarm, event_alarm_methods, event_modified,' .
@@ -416,7 +407,7 @@ class Kronolith_Driver_sql extends Kronolith_Driver {
     {
         $query = 'SELECT event_id, event_uid, calendar_id, event_description,' .
             ' event_location, event_private, event_status, event_attendees,' .
-            ' event_title, event_category, event_recurcount,' .
+            ' event_title, event_recurcount,' .
             ' event_recurtype, event_recurenddate, event_recurinterval,' .
             ' event_recurdays, event_start, event_end, event_allday,' .
             ' event_alarm, event_alarm_methods, event_modified,' .
@@ -926,9 +917,6 @@ class Kronolith_Event_sql extends Kronolith_Event {
             }
         }
 
-        if (isset($SQLEvent['event_category'])) {
-            $this->category = $driver->convertFromDriver($SQLEvent['event_category']);
-        }
         if (isset($SQLEvent['event_location'])) {
             $this->location = $driver->convertFromDriver($SQLEvent['event_location']);
         }
@@ -962,7 +950,6 @@ class Kronolith_Event_sql extends Kronolith_Event {
         $this->_properties['event_creator_id'] = $driver->convertToDriver($this->getCreatorId());
         $this->_properties['event_title'] = $driver->convertToDriver($this->title);
         $this->_properties['event_description'] = $driver->convertToDriver($this->getDescription());
-        $this->_properties['event_category'] = $driver->convertToDriver((string)String::substr($this->getCategory(), 0, 80));
         $this->_properties['event_location'] = $driver->convertToDriver($this->getLocation());
         $this->_properties['event_private'] = (int)$this->isPrivate();
         $this->_properties['event_status'] = $this->getStatus();
index 7bd7614..2b196c0 100644 (file)
@@ -1077,7 +1077,6 @@ class Kronolith {
                                     'description' => $task['desc'],
                                     'start' => $task['due'],
                                     'end' => $task['due'],
-                                    'category' => $task['category'],
                                     'params' => array('task' => $task['task_id'],
                                                       'tasklist' => $task['tasklist_id']));
                             }
@@ -1104,12 +1103,6 @@ class Kronolith {
                         }
 
                         $event = &$kronolith_driver->getEvent();
-
-                        if ($GLOBALS['prefs']->getValue('show_external_colors') &&
-                            isset($eventsListItem['category'])) {
-                            $event->category = $eventsListItem['category'];
-                        }
-
                         $event->eventID = '_' . $api . $eventsListItem['id'];
                         $event->external = $api;
                         $event->external_params = $eventsListItem['params'];
index 0dfb877..2d9f7e6 100644 (file)
@@ -37,7 +37,6 @@ class Maintenance_Task_purge_events extends Maintenance_Task {
         $query = &$kronolith_driver->getEvent();
         $query->start = null;
         $query->end = $del_time;
-        $query->category = null;
         $query->status = null;
         $query->calendars = array_keys($calendars);
         $query->creatorID = Auth::getAuth();
index 1dccef9..1bba08c 100644 (file)
@@ -93,8 +93,6 @@ class Kronolith_View_Day extends Kronolith_Day {
         }
         echo '<tbody>';
 
-        $eventCategories = array();
-
         if ($addLinks) {
             $newEventUrl = Util::addParameter(
                 'new.php',
@@ -127,10 +125,6 @@ class Kronolith_View_Day extends Kronolith_Day {
                     // We have not printed every all day event yet. Put one
                     // into this row.
                     $event = $this->_all_day_events[$cid][$k];
-                    if ($event->hasPermission(PERMS_READ)) {
-                        $eventCategories[$event->getCategory()] = true;
-                    }
-
                     $row .= '<td class="day-eventbox"'
                         . $event->getCSSColors()
                         . 'width="' . round(90 / count($this->_currentCalendars))  . '%" '
@@ -235,9 +229,6 @@ class Kronolith_View_Day extends Kronolith_Day {
                         ($day_hour_force &&
                          $i == $day_hour_start &&
                          $event->start->compareDateTime($start) < 0)) {
-                        if ($event->hasPermission(PERMS_READ)) {
-                            $eventCategories[$event->getCategory()] = true;
-                        }
 
                         // Store the nodes that we're covering for
                         // this event in the coverage graph.
index 45abb45..3a6fb8d 100644 (file)
@@ -74,17 +74,17 @@ class Kronolith_View_EditEvent {
             (!empty($GLOBALS['conf']['hooks']['permsdenied']) ||
              Kronolith::hasPermission('max_events') === true ||
              Kronolith::hasPermission('max_events') > Kronolith::countEvents())) {
-            $buttons[] = '<input type="submit" class="button" name="saveAsNew" value="' . _("Save As New") . '" onclick="return checkCategory();" />';
+            $buttons[] = '<input type="submit" class="button" name="saveAsNew" value="' . _("Save As New") . '" />';
         } else {
             if (!$this->event->isRemote()) {
-                $buttons[] = '<input type="submit" class="button" name="save" value="' . _("Save Event") . '" onclick="return checkCategory();" />';
+                $buttons[] = '<input type="submit" class="button" name="save" value="' . _("Save Event") . '" />';
             }
             if ($this->event->isInitialized()) {
                 if (!$this->event->recurs() &&
                     (!empty($conf['hooks']['permsdenied']) ||
                      Kronolith::hasPermission('max_events') === true ||
                      Kronolith::hasPermission('max_events') > Kronolith::countEvents())) {
-                    $buttons[] = '<input type="submit" class="button" name="saveAsNew" value="' . _("Save As New") . '" onclick="return checkCategory();" />';
+                    $buttons[] = '<input type="submit" class="button" name="saveAsNew" value="' . _("Save As New") . '" />';
                 }
             }
         }
index 838c90c..4093887 100644 (file)
@@ -76,7 +76,6 @@ class Kronolith_View_Event {
         }
 
         $creatorId = $this->event->getCreatorId();
-        $category = $this->event->getCategory();
         $description = $this->event->getDescription();
         $location = $this->event->getLocation();
         $private = $this->event->isPrivate() && $creatorId != Auth::getAuth();
index c08d490..dd7cd3a 100644 (file)
@@ -136,8 +136,6 @@ class Kronolith_View_Month {
             require KRONOLITH_TEMPLATES . '/month/head.inc';
         }
 
-        $eventCategories = array();
-
         $html = '';
         if (!$sidebyside && count($this->_currentCalendars)) {
             $html .= '<tr>';
@@ -203,9 +201,6 @@ class Kronolith_View_Month {
                 if (!empty($this->_events[$date_stamp])) {
                     foreach ($this->_events[$date_stamp] as $event) {
                         if (!$sidebyside || $event->getCalendar() == $id) {
-                            if ($event->hasPermission(PERMS_READ)) {
-                                $eventCategories[$event->getCategory()] = true;
-                            }
                             $html .= '<div class="month-eventbox"' . $event->getCSSColors() . '>'
                                 . $event->getLink($date, true, $this->link(0, true));
                             if ($showTime) {
index 6fa4c58..2cd3d5c 100644 (file)
@@ -127,8 +127,6 @@ class Kronolith_View_Week {
             $newEventUrl = _("All day");
         }
 
-        $eventCategories = array();
-
         $row = '';
         for ($j = $this->startDay; $j <= $this->endDay; ++$j) {
             $row .= '<td class="hour rightAlign">' . ($more_timeslots ? _("All day") : '&nbsp;') . '</td>' .
@@ -141,10 +139,6 @@ class Kronolith_View_Week {
                             $row .= '<td rowspan="' . ($this->days[$j]->_all_day_maxrowspan - $k) . '" width="'. round(99 / count($this->days[$j]->_currentCalendars)) . '%">&nbsp;</td>';
                         } elseif (count($this->days[$j]->_all_day_events[$cid]) > $k) {
                             $event = $this->days[$j]->_all_day_events[$cid][$k];
-                            if ($event->hasPermission(PERMS_READ)) {
-                                $eventCategories[$event->getCategory()] = true;
-                            }
-
                             $row .= '<td class="week-eventbox"'
                                 . $event->getCSSColors()
                                 . 'width="' . round(99 / count($this->days[$j]->_currentCalendars)) . '%" '
@@ -259,11 +253,7 @@ class Kronolith_View_Week {
                                  $event->start->compareDateTime($slot_end) < 0 ||
                                  $start->compareDateTime($this->days[$j]) == 0) ||
                                 ($day_hour_force &&
-                                 $i == $day_hour_start &&
-                                 $event->start->compareDateTime($start) < 0)) {
-                                if ($event->hasPermission(PERMS_READ)) {
-                                    $eventCategories[$event->getCategory()] = true;
-                                }
+                                 $i == $day_hour_start)) {
 
                                 // Store the nodes that we're covering for
                                 // this event in the coverage graph.
index 7506b40..7714f30 100644 (file)
@@ -97,8 +97,6 @@ class Kronolith_View_Year {
             }
 
             $currentCalendars = array(true);
-            $eventCategories = array();
-
             foreach ($currentCalendars as $id => $cal) {
                 $cell = 0;
                 for ($day = $startOfView; $day < $startOfView + $daysInView; ++$day) {
index 976723a..3ec9b20 100644 (file)
@@ -69,11 +69,6 @@ $notification->attach('status');
 require_once KRONOLITH_BASE . '/lib/Kronolith.php';
 require_once KRONOLITH_BASE . '/lib/Driver.php';
 
-/* Categories. */
-require_once 'Horde/Prefs/CategoryManager.php';
-$GLOBALS['cManager'] = new Prefs_CategoryManager();
-$GLOBALS['cManager_fgColors'] = $GLOBALS['cManager']->fgColors();
-
 /* Start compression, if requested. */
 Horde::compressOutput();
 
index adefdc0..fa626c8 100644 (file)
@@ -61,7 +61,7 @@ $event->end->correct();
 $month = $event->start->month;
 $year = $event->start->year;
 
-$buttons = array('<input type="submit" class="button" name="save" value="' . _("Save Event") . '" onclick="return checkCategory();" />');
+$buttons = array('<input type="submit" class="button" name="save" value="' . _("Save Event") . '" />');
 if (isset($url)) {
     $cancelurl = $url;
 } else {
index 6f29291..a5abdcf 100644 (file)
@@ -9,7 +9,6 @@ CREATE TABLE kronolith_events (
     event_attendees VARCHAR(MAX),
     event_exceptions VARCHAR(MAX),
     event_title VARCHAR(255),
-    event_category VARCHAR(80),
     event_recurtype INT DEFAULT 0,
     event_recurinterval INT,
     event_recurdays INT,
index bd29d70..c5b7a19 100644 (file)
@@ -9,7 +9,6 @@ CREATE TABLE kronolith_events (
     event_attendees TEXT,
     event_exceptions TEXT,
     event_title VARCHAR(255),
-    event_category VARCHAR(80),
     event_recurtype SMALLINT DEFAULT 0,
     event_recurinterval SMALLINT,
     event_recurdays SMALLINT,
index 9453141..e5788ec 100644 (file)
@@ -9,7 +9,6 @@ CREATE TABLE kronolith_events (
     event_attendees VARCHAR2(4000),
     event_exceptions VARCHAR2(4000),
     event_title VARCHAR2(255),
-    event_category VARCHAR2(80),
     event_recurtype INT DEFAULT 0,
     event_recurinterval INT,
     event_recurdays INT,
index a96a1ef..d192469 100644 (file)
@@ -9,7 +9,6 @@ CREATE TABLE kronolith_events (
     event_attendees TEXT,
     event_exceptions TEXT,
     event_title VARCHAR(255),
-    event_category VARCHAR(80),
     event_recurtype SMALLINT DEFAULT 0,
     event_recurinterval SMALLINT,
     event_recurdays SMALLINT,
index a95fa0c..2174b36 100644 (file)
@@ -9,7 +9,6 @@ CREATE TABLE kronolith_events (
     event_attendees TEXT,
     event_exceptions TEXT,
     event_title VARCHAR(255),
-    event_category VARCHAR(80),
     event_recurtype INT DEFAULT 0,
     event_recurinterval INT,
     event_recurdays INT,
index 3dc02ec..8951c80 100644 (file)
    </field>
 
    <field>
-    <name>event_category</name>
-    <type>text</type>
-    <length>80</length>
-   </field>
-
-   <field>
     <name>event_recurtype</name>
     <type>integer</type>
     <default>0</default>
index 26e9076..d5353c2 100644 (file)
@@ -32,7 +32,7 @@ $search_mode = Util::getFormData('search_mode', 'basic');
 if ($search_mode != 'basic') {
     /* Make a new empty event object with default values. */
     $event = &$kronolith_driver->getEvent();
-    $event->title = $event->calendars = $event->category = $event->location =
+    $event->title = $event->calendars = $event->location =
     $event->status = $event->description = null;
 
     /* Set start on today, stop on tomorrow. */
@@ -50,9 +50,6 @@ if ($search_mode != 'basic') {
     if (isset($q_title)) {
         /* We're returning from a previous search. */
         $event->readForm();
-        if ($event->category == '__any') {
-            $event->category = null;
-        }
         if (Util::getFormData('status') == KRONOLITH_STATUS_NONE) {
             $event->status = null;
         }
@@ -66,7 +63,6 @@ if ($desc || $title) {
     $event = &$kronolith_driver->getEvent();
     $event->setDescription($desc);
     $event->setTitle($title);
-    $event->category = null;
     $event->status = null;
 
     $time1 = $_SERVER['REQUEST_TIME'];
index 3eee3ee..ddae416 100644 (file)
@@ -46,7 +46,6 @@ var kronolithPrintLink = '';
 <title><?php echo htmlspecialchars($page_title) ?></title>
 <link href="<?php echo $GLOBALS['registry']->getImageDir()?>/favicon.ico" rel="SHORTCUT ICON" />
 <?php echo Horde::stylesheetLink('kronolith', empty($print_view) ? '' : 'print') ?>
-<link href="<?php echo Horde::applicationUrl('themes/categoryCSS.php') ?>" rel="stylesheet" type="text/css" />
 <?php foreach ($GLOBALS['display_calendars'] as $calendar): ?>
 <link href="<?php echo Kronolith::feedUrl($calendar) ?>" rel="alternate" type="application/atom+xml" />
 <?php endforeach; ?>
index 9167eab..7f7236c 100644 (file)
@@ -5,7 +5,6 @@
 <input type="hidden" name="month" value="<?php if (isset($month)) echo htmlspecialchars($month) ?>" />
 <input type="hidden" name="mday" value="<?php if (isset($day)) echo htmlspecialchars($day) ?>" />
 <input type="hidden" name="date" value="<?php if (isset($date)) echo htmlspecialchars($date) ?>" />
-<input type="hidden" name="new_category" value="" />
 <?php if (isset($url)): ?>
 <input type="hidden" name="url" value="<?php echo htmlspecialchars($url) ?>" />
 <?php endif; ?>
 </tr>
 <?php endif; ?>
 
-<!-- category -->
-<tr>
- <td class="rightAlign">
-    <strong><?php echo Horde::label('category', _("Categor_y")) ?></strong>
- </td>
- <td colspan="4"><?php echo $GLOBALS['cManager']->getSelect('category', $event->getCategory()) ?></td>
-</tr>
-
 <!-- location -->
 <tr>
  <td class="rightAlign"><strong><?php echo Horde::label('location', _("Lo_cation")) ?></strong></td>
index 4fb0044..58d1209 100644 (file)
@@ -1,5 +1,3 @@
-<?php echo $GLOBALS['cManager']->getJavaScript('eventform', 'category') ?>
-
 <script type="text/javascript">
 
 <?php if (!Util::nonInputVar('issearch')): ?>
index 2d67c4d..cce8d7c 100644 (file)
@@ -1,7 +1,6 @@
 <table width="100%" cellspacing="1" class="item">
  <tr class="item">
   <th class="item" align="left"><?php echo _("Title") ?></th>
-  <th class="item" align="left"><?php echo _("Category") ?></th>
   <th class="item" align="left"><?php echo _("Location") ?></th>
   <th class="item" align="left"><?php echo _("Status") ?></th>
   <th class="item" align="left"><?php echo _("Start On") ?></th>
index 4a37373..5cf2a18 100644 (file)
@@ -1,8 +1,7 @@
 <tr class="text">
- <td nowrap="nowrap" class="category<?php echo hash('md5', $found->getCategory()) ?>">
+ <td nowrap="nowrap">
   <?php echo $found->getLink() ?>
  </td>
- <td class="nowrap"><?php echo htmlspecialchars($found->getCategory()) ?></td>
  <td class="nowrap"><?php echo htmlspecialchars($found->getLocation()) ?></td>
  <td class="nowrap"><?php echo Kronolith::statusToString($found->getStatus()) ?></td>
  <td class="nowrap"><?php echo $start->strftime($prefs->getValue('date_format')) . $start->strftime($prefs->getValue('twentyFour') ? ' %H:%M' : ' %I:%M %p') ?></td>
index b77ee46..04e35ef 100644 (file)
@@ -52,29 +52,6 @@ require KRONOLITH_TEMPLATES . '/edit/javascript.inc';
  </td>
 </tr>
 
-<!-- category -->
-<tr>
- <td class="rightAlign">
-  <strong><?php echo Horde::label('category', _("Categor_y")) ?></strong>
- </td>
- <td align="left" colspan="4">
-  <select id="category" name="category">
-  <?php
-  echo '<option value="__any"';
-  echo (!isset($event->category)) ? ' selected="selected"' : '';
-  echo '>' . _("Any") . '</option>';
-  $categories = $cManager->get();
-
-  foreach ($categories as $name) {
-      echo '<option value="' . htmlspecialchars($name) . '"' .
-          (($event->category == $name) ? ' selected="selected">' : '>') .
-          htmlspecialchars($name) . '</option>';
-   }
-  ?>
-  </select>
- </td>
-</tr>
-
 <!-- location -->
 <tr>
  <td class="rightAlign">
index 5a65c57..e96a7b4 100644 (file)
@@ -1,14 +1,6 @@
 <table cellspacing="0" width="100%" class="striped">
 
 <?php if (!$private): ?>
-<!-- category -->
-<tr>
- <td class="rightAlign"><strong><?php echo _("Category") ?>&nbsp;&nbsp;</strong></td>
- <td>
-  <?php echo @htmlspecialchars($category ? $category : _("Unfiled"), ENT_COMPAT, NLS::getCharset()) ?>
- </td>
-</tr>
-
 <!-- location -->
 <tr>
  <td class="rightAlign"><strong><?php echo _("Location") ?>&nbsp;&nbsp;</strong></td>
index e593fa5..7e67106 100644 (file)
@@ -189,11 +189,6 @@ table.monthgrid th, table.monthgrid td {
     -webkit-border-radius: 10px;
     padding: 3px;
 }
-.legend-eventbox {
-    -moz-border-radius: 5px;
-    -webkit-border-radius: 5px;
-    padding: 1px 5px 1px 5px;
-}
 
 .selected-control {
     background: #bbcbff;