summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelcontents.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelcontents.cpp')
-rwxr-xr-xindra/newview/llpanelcontents.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 1a427338e5..89a9e0dc16 100755
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -59,6 +59,7 @@
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llworld.h"
+#include "llfloaterperms.h"
//
// Imported globals
@@ -156,12 +157,14 @@ void LLPanelContents::onClickNewScript(void *userdata)
{
LLPermissions perm;
perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
+
+ // Parameters are base, owner, everyone, group, next
perm.initMasks(
PERM_ALL,
PERM_ALL,
- PERM_NONE,
- PERM_NONE,
- PERM_MOVE | PERM_TRANSFER);
+ LLFloaterPerms::getEveryonePerms("Scripts"),
+ LLFloaterPerms::getGroupPerms("Scripts"),
+ PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts"));
std::string desc;
LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc);
LLPointer<LLViewerInventoryItem> new_item =
@@ -179,6 +182,8 @@ void LLPanelContents::onClickNewScript(void *userdata)
time_corrected());
object->saveScript(new_item, TRUE, true);
+ std::string name = new_item->getName();
+
// *NOTE: In order to resolve SL-22177, we needed to create
// the script first, and then you have to click it in
// inventory to edit it.