From 9ee7375660cd2080785e91a1db0164f4cddf5615 Mon Sep 17 00:00:00 2001 From: kcozens Date: Sun, 11 May 2014 17:52:37 +0000 Subject: [PATCH] Use '/' between the parts of event landing point coordinates. Updated README. Allow 0 or -1 to be considered as the "Any" category for event listings. Event markers are seen on the map again but still can't search for events. git-svn-id: http://forge.opensimulator.org/svn/ossearch/trunk@212 109abde3-1f22-4c10-b5d7-b6b0135cd00c --- OpenSimSearch/Modules/SearchModule/OpenSearch.cs | 4 +--- README | 2 +- webroot/query.php | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/OpenSimSearch/Modules/SearchModule/OpenSearch.cs b/OpenSimSearch/Modules/SearchModule/OpenSearch.cs index 2da4a25..534da25 100644 --- a/OpenSimSearch/Modules/SearchModule/OpenSearch.cs +++ b/OpenSimSearch/Modules/SearchModule/OpenSearch.cs @@ -686,9 +686,7 @@ namespace OpenSimSearch.Modules.OpenSearch mapItemReply mapitem = new mapItemReply(); - //Events use a comma separator in the landing point - landingpoint = d["landing_point"].ToString().Split(','); - + landingpoint = d["landing_point"].ToString().Split('/'); mapitem.x = Convert.ToUInt32(landingpoint[0]); mapitem.y = Convert.ToUInt32(landingpoint[1]); diff --git a/README b/README index 4c7ec8a..24f36e2 100644 --- a/README +++ b/README @@ -277,7 +277,7 @@ field. (It seems silly to require the boolean but this has been left in to avoid any compatability issues.) The globalPos field is the location of the event as a global grid coordinate. -The format is "x,y,z". where x and y are the grid X and Y positions (times +The format is "x/y/z". where x and y are the grid X and Y positions (times 256) plus the x and y offset within the region named by the simname field. The eventflags field is 0 for a PG event, 1 for Mature, and 2 for Adult. diff --git a/webroot/query.php b/webroot/query.php index 48c3cc0..ce919ac 100644 --- a/webroot/query.php +++ b/webroot/query.php @@ -346,7 +346,7 @@ function dir_events_query($method_name, $params, $app_data) $terms[] = "(dateUTC >= $now AND dateUTC < $then)"; } - if ($category != 0) + if ($category > 0) $terms[] = "category = ".$category.""; $type = array(); @@ -448,7 +448,7 @@ function dir_classified_query ($method_name, $params, $app_data) $terms[] = join_terms(" OR ", $f, True); //Only restrict results based on category if it is not 0 (Any Category) - if ($category != 0) + if ($category > 0) $terms[] = "category = " . $category; if ($text != "")