[kronolith] patches to sql driver

Cliff Green green@UMDNJ.EDU
Sat, 22 Sep 2001 00:39:40 -0400 (EDT)


On Sat, 22 Sep 2001, Cliff Green wrote:

CG> I seem to be the only one having (or reporting) the following problems
CG> after switching to the sql driver for kronolith:

[problems munched]

CG> The attached patch fixes these problems for me.

Sorry -

Here's the patch that didn't get attached...

<---patch begins--->
--- sql.php.orig	Fri Sep 21 22:43:02 2001
+++ sql.php	Fri Sep 21 23:40:36 2001
@@ -325,7 +325,7 @@
         if (isset($SQLEvent['event_category'])) {
             $this->category = $SQLEvent['event_category'];
         }
-        if (isset($SQLEvent->event_location)) {
+        if (isset($SQLEvent['event_location'])) {
             $this->location = $SQLEvent['event_location'];
         }
         if (isset($SQLEvent['event_keywords'])) {
@@ -384,19 +384,19 @@

         // basic fields
         if (isset($eventData['title'])) {
-            $this->properties['event_title'] = $eventData['title'];
+            $this->properties['event_title'] = Horde::dispelMagicQuotes($eventData['title']);
         }
         if (isset($eventData['description'])) {
-            $this->properties['event_description'] = $eventData['description'];
+            $this->properties['event_description'] = Horde::dispelMagicQuotes($eventData['description']);
         }
         if (isset($eventData['category'])) {
-            $this->properties['event_category'] = $eventData['category'];
+            $this->properties['event_category'] = Horde::dispelMagicQuotes($eventData['category']);
         }
         if (isset($eventData['location'])) {
-            $this->properties['event_location'] = $eventData['location'];
+            $this->properties['event_location'] = Horde::dispelMagicQuotes($eventData['location']);
         }
         if (isset($eventData['keywords'])) {
-            $this->properties['event_keywords'] = $eventData['keywords'];
+            $this->properties['event_keywords'] = implode(',', $eventData['keywords']);
         }

         // event start
<----patch ends---->


c
-- 
Clifford Green               Internet -  green@umdnj.edu
Academic Computing Services     voice -     732-235-5250
UMDNJ-IST                         fax -     732-235-5252
Signature under NDA.