mirror of
https://github.com/kcozens/OpenSimSearch.git
synced 2026-08-14 08:52:28 +00:00
webroot/parser.php:
- Capitalize keywords in SQL queries. webroot/sql/ossearch.sql: - Change default for mature column of parcelsales table to PG. webroot/sql/update-parcelsales.sql: - Added this file to update existing an parcelsales table. git-svn-id: http://forge.opensimulator.org/svn/ossearch/trunk@126 109abde3-1f22-4c10-b5d7-b6b0135cd00c
This commit is contained in:
+10
-11
@@ -137,22 +137,21 @@ function parse($hostname, $port)
|
||||
mysql_escape_string($regionuuid) . "'");
|
||||
mysql_query("DELETE FROM parcels WHERE regionuuid = '" .
|
||||
mysql_escape_string($regionuuid) . "'");
|
||||
mysql_query("DELETE FROM objects WHERE regionuuid = '" .
|
||||
mysql_escape_string($regionuuid) . "'");
|
||||
mysql_query("DELETE FROM allparcels WHERE regionUUID = '" .
|
||||
mysql_escape_string($regionuuid) . "'");
|
||||
mysql_query("DELETE FROM parcelsales WHERE regionUUID = '" .
|
||||
mysql_escape_string($regionuuid) . "'");
|
||||
mysql_query("DELETE FROM objects WHERE regionuuid = '" .
|
||||
mysql_escape_string($regionuuid) . "'");
|
||||
}
|
||||
|
||||
$data = $region->getElementsByTagName("data")->item(0);
|
||||
$estate = $data->getElementsByTagName("estate")->item(0);
|
||||
|
||||
$username = $estate->getElementsByTagName("name")->item(0)->nodeValue;
|
||||
$useruuid = $estate->getElementsByTagName("uuid")->item(0)->nodeValue;
|
||||
|
||||
$estateid = $estate->getElementsByTagName("id")->item(0)->nodeValue;
|
||||
$useruuid = $estate->getElementsByTagName("uuid")->item(0)->nodeValue;
|
||||
|
||||
$estateid = $estate->getElementsByTagName("id")->item(0)->nodeValue;
|
||||
|
||||
//
|
||||
// Second, add the new info to the database
|
||||
@@ -221,7 +220,7 @@ function parse($hostname, $port)
|
||||
//
|
||||
// Save
|
||||
//
|
||||
$sql = "insert into allparcels values('" .
|
||||
$sql = "INSERT INTO allparcels VALUES('" .
|
||||
mysql_escape_string($regionuuid) . "','" .
|
||||
mysql_escape_string($parcelname) . "','" .
|
||||
mysql_escape_string($owneruuid) . "','" .
|
||||
@@ -235,7 +234,7 @@ function parse($hostname, $port)
|
||||
|
||||
if ($parceldirectory == "true")
|
||||
{
|
||||
$sql = "insert into parcels values('" .
|
||||
$sql = "INSERT INTO parcels VALUES('" .
|
||||
mysql_escape_string($regionuuid) . "','" .
|
||||
mysql_escape_string($parcelname) . "','" .
|
||||
mysql_escape_string($parceluuid) . "','" .
|
||||
@@ -253,7 +252,7 @@ function parse($hostname, $port)
|
||||
|
||||
if ($parcelforsale == "true")
|
||||
{
|
||||
$sql = "insert into parcelsales values('" .
|
||||
$sql = "INSERT INTO parcelsales VALUES('" .
|
||||
mysql_escape_string($regionuuid) . "','" .
|
||||
mysql_escape_string($parcelname) . "','" .
|
||||
mysql_escape_string($parceluuid) . "','" .
|
||||
@@ -262,8 +261,8 @@ function parse($hostname, $port)
|
||||
mysql_escape_string($parcellanding) . "','" .
|
||||
mysql_escape_string($infouuid) . "', '" .
|
||||
mysql_escape_string($dwell) . "', '" .
|
||||
mysql_escape_string("$estateid") . "', '" .
|
||||
mysql_escape_string("$regioncategory") . "')";
|
||||
mysql_escape_string($estateid) . "', '" .
|
||||
mysql_escape_string($regioncategory) . "')";
|
||||
|
||||
mysql_query($sql);
|
||||
}
|
||||
@@ -290,7 +289,7 @@ function parse($hostname, $port)
|
||||
|
||||
$flags = $value->getElementsByTagName("flags")->item(0)->nodeValue;
|
||||
|
||||
mysql_query("insert into objects values('" .
|
||||
mysql_query("INSERT INTO objects VALUES('" .
|
||||
mysql_escape_string($uuid) . "','" .
|
||||
mysql_escape_string($parceluuid) . "','" .
|
||||
mysql_escape_string($location) . "','" .
|
||||
|
||||
@@ -150,7 +150,7 @@ CREATE TABLE `parcelsales` (
|
||||
`infoUUID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
|
||||
`dwell` int(11) NOT NULL,
|
||||
`parentestate` int(11) NOT NULL default '1',
|
||||
`mature` varchar(32) NOT NULL default 'false',
|
||||
`mature` varchar(32) NOT NULL default 'PG',
|
||||
PRIMARY KEY (`regionUUID`,`parcelUUID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE `parcelsales` CHANGE `mature` `mature` VARCHAR( 32 ) NOT NULL DEFAULT 'PG';
|
||||
Reference in New Issue
Block a user