summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2013-05-21 22:57:15 -0700
committerdolphin <dolphin@lindenlab.com>2013-05-21 22:57:15 -0700
commit37bd01152ac278e3401a96b12baf5505c5c1f789 (patch)
tree5b768150ed8211111e33e4b4abb12cb64411856f /indra
parent3d45290f8511e435f4a5bd03e485eb3b1758a332 (diff)
Update experience request to use the new post service.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llpreviewscript.cpp40
-rwxr-xr-xindra/newview/llpreviewscript.h1
2 files changed, 27 insertions, 14 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 7c1b83dfa9..bba0f1330c 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1290,6 +1290,10 @@ void LLScriptEdCore::addExperienceInfo( const LLSD& experience )
{
mExperiences->setEnabled(TRUE);
mExperiences->add(experience[LLExperienceCache::NAME], experience[LLExperienceCache::EXPERIENCE_ID].asUUID());
+ if(mAssociatedExperience == experience[LLExperienceCache::EXPERIENCE_ID].asUUID())
+ {
+ setAssociatedExperience(mAssociatedExperience);
+ }
}
void LLScriptEdCore::clearExperiences()
@@ -1306,7 +1310,7 @@ LLUUID LLScriptEdCore::getSelectedExperience()const
void LLScriptEdCore::setAssociatedExperience( const LLUUID& experience_id )
{
mAssociatedExperience = experience_id;
- if(experience_id.isNull())
+ if(experience_id.notNull())
{
if(!mExperiences->setSelectedByValue(mAssociatedExperience, TRUE))
{
@@ -2028,19 +2032,8 @@ void LLLiveLSLEditor::onLoadComplete(LLVFS *vfs, const LLUUID& asset_id,
if(instance )
{
- LLViewerRegion* region = gAgent.getRegion();
- if (region)
- {
- std::string lookup_url=region->getCapability("GetMetadata");
- //lookup_url = "http://127.0.0.1:12035/meta";
- if(!lookup_url.empty())
- {
- lookup_url += "/";
- lookup_url += asset_id.asString();
- lookup_url += "/experience";
- LLHTTPClient::get(lookup_url, new ExperienceAssociationResponder(*xored_id));
- }
- }
+ instance->fetchAssociatedExperience(asset_id);
+
if( LL_ERR_NOERR == status )
{
@@ -2488,6 +2481,25 @@ void LLLiveLSLEditor::onSaveBytecodeComplete(const LLUUID& asset_uuid, void* use
delete data;
}
+void LLLiveLSLEditor::fetchAssociatedExperience(const LLUUID& asset_id)
+{
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region)
+ {
+ std::string lookup_url=region->getCapability("GetMetadata");
+ if(!lookup_url.empty())
+ {
+ LLSD request;
+ request["asset-id"]=asset_id;
+ LLSD fields;
+ fields.append("experience");
+ request["fields"] = fields;
+ LLHTTPClient::post(lookup_url, request, new ExperienceAssociationResponder(getKey()));
+ }
+ }
+}
+
+
BOOL LLLiveLSLEditor::canClose()
{
return (mScriptEd->canClose());
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index b29d16c58d..28e71b111a 100755
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -238,6 +238,7 @@ public:
void setIsNew() { mIsNew = TRUE; }
void setAssociatedExperience( const LLUUID& experience_id );
+ void fetchAssociatedExperience(const LLUUID& asset_id);
private:
virtual BOOL canClose();