mirror of
https://github.com/kcozens/OpenSimProfile.git
synced 2026-08-14 09:02:00 +00:00
Cleaning up the OpenProfile.cs code and webservices
git-svn-id: http://forge.opensimulator.org/svn/osprofile/trunk@22 19860011-0018-435d-96ae-4a7b0aaa3128
This commit is contained in:
@@ -99,6 +99,14 @@ namespace OpenSimProfile.Modules.OpenProfile
|
||||
client.AddGenericPacketHandler("avatarnotesrequest", HandleAvatarNotesRequest);
|
||||
// Handle the Classifieds / Picks reading part
|
||||
client.AddGenericPacketHandler("pickinforequest", HandlePickInfoRequest);
|
||||
// Handle the Classifieds Update and Delete
|
||||
client.OnClassifiedInfoUpdate += ClassifiedInfoUpdate;
|
||||
client.OnClassifiedDelete += ClassifiedDelete;
|
||||
//Handle the Notes Update
|
||||
// client.OnAvatarNotesUpdate += AvatarNotesUpdate;
|
||||
// Handle the Picks Update and Delete
|
||||
// client.OnPickInfoUpdate += PickInfoUpdate;
|
||||
// client.OnPickDelete += PickDelete;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -323,5 +331,26 @@ namespace OpenSimProfile.Modules.OpenProfile
|
||||
// d["sortorder"].ToString(),
|
||||
// d["enabled"].ToString());
|
||||
}
|
||||
|
||||
public void ClassifiedInfoUpdate ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void ClassifiedDelete (UUID queryClassifiedID, IClientAPI remoteClient)
|
||||
{
|
||||
Hashtable ReqHash = new Hashtable();
|
||||
ReqHash["classifiedID"] = queryClassifiedID.ToString();
|
||||
|
||||
Hashtable result = GenericXMLRPCRequest(ReqHash,
|
||||
"classified_delete");
|
||||
|
||||
if (!Convert.ToBoolean(result["success"]))
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
result["errorMessage"].ToString(), false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,6 +153,30 @@ function pickinforequest($method_name, $params, $app_data)
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
xmlrpc_server_register_method($xmlrpc_server, "classified_delete",
|
||||
"classified_delete");
|
||||
|
||||
function classified_delete($method_name, $params, $app_data)
|
||||
{
|
||||
$req = $params[0];
|
||||
|
||||
$owneruuid = $req['owneruuid'];
|
||||
$classifieduuid = $req['classifieduuid'];
|
||||
|
||||
$result = mysql_query("delete from ossearch.classifieds where ".
|
||||
"creatoruuid = '". mysql_escape_string($owneruuid) ."' AND ".
|
||||
"classifieduuid = '".mysql_escape_string($classifieduuid) ."'");
|
||||
|
||||
$response_xml = xmlrpc_encode(array(
|
||||
'success' => True,
|
||||
'errorMessage' => "",
|
||||
'data' => $data
|
||||
));
|
||||
|
||||
print $response_xml;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Process the request
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user