If we already know it's a *new* event with no geolocation data,
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 18 Dec 2009 05:11:12 +0000 (00:11 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 18 Dec 2009 05:11:12 +0000 (00:11 -0500)
don't make the geoDriver have to check it.

kronolith/lib/Driver/Sql.php

index 0623ebb..c50988c 100644 (file)
@@ -648,7 +648,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
             $tagger->tag($event->uid, $event->tags, 'event');
 
             /* Update Geolocation */
-            if ($gDriver = Kronolith::getGeoDriver()) {
+            if ($event->geoLocation && $gDriver = Kronolith::getGeoDriver()) {
                 try {
                     $gDriver->setLocation($event->id, $event->geoLocation);
                 } catch (Horde_Exception $e) {