diff options
Diffstat (limited to 'indra/newview/llfloatereditdaycycle.cpp')
-rw-r--r-- | indra/newview/llfloatereditdaycycle.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp index 28ff353369..f6bd4ad6b9 100644 --- a/indra/newview/llfloatereditdaycycle.cpp +++ b/indra/newview/llfloatereditdaycycle.cpp @@ -660,7 +660,7 @@ void LLFloaterEditDayCycle::onRegionInfoUpdate() if (getSelectedDayCycle().scope == LLEnvKey::SCOPE_REGION) { // check whether we have the access - can_edit = canEditRegionSettings(); + can_edit = LLEnvManagerNew::canEditRegionSettings(); } enableEditing(can_edit); @@ -697,7 +697,7 @@ void LLFloaterEditDayCycle::onDayCycleSelected() return; } - can_edit = canEditRegionSettings(); + can_edit = LLEnvManagerNew::canEditRegionSettings(); } // We may need to add or remove region skies from the list. @@ -799,14 +799,3 @@ std::string LLFloaterEditDayCycle::getRegionName() { return gAgent.getRegion() ? gAgent.getRegion()->getName() : LLTrans::getString("Unknown"); } - -// static -bool LLFloaterEditDayCycle::canEditRegionSettings() -{ - LLViewerRegion* region = gAgent.getRegion(); - BOOL owner_or_god = gAgent.isGodlike() || (region && region->getOwner() == gAgent.getID()); - BOOL owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager()); - - LL_DEBUGS("Windlight") << "Can edit region settings: " << owner_or_god_or_manager << LL_ENDL; - return owner_or_god_or_manager; -} |