From 362f288bc6c08f5f345b0b676ca5e3e1fae53c07 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 20 Jan 2010 15:57:51 -0500 Subject: EXT-4544 : Take out favorites autopopulation code Removed autopopulation code. This has been in viewer2 for months but actually is buggy itself (i.e. didn't actually autopopulate new accounts most of the time) so it didn't manifest until recently. --- indra/newview/llstartup.cpp | 59 --------------------------------------------- 1 file changed, 59 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 88b4c34e2b..6b816f8786 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -307,59 +307,6 @@ void update_texture_fetch() gTextureList.updateImages(0.10f); } -//Copies landmarks from the "Library" to "My Favorites" -void populate_favorites_bar() -{ - //*TODO consider extending LLInventoryModel::findCategoryUUIDForType(...) to support both root's - LLInventoryModel::cat_array_t* lib_cats = NULL; - LLInventoryModel::item_array_t* lib_items = NULL; - gInventory.getDirectDescendentsOf(gInventory.getLibraryRootFolderID(), lib_cats, lib_items); - if (!lib_cats) return; - - LLUUID lib_landmarks(LLUUID::null); - S32 count = lib_cats->count(); - for(S32 i = 0; i < count; ++i) - { - if(lib_cats->get(i)->getPreferredType() == LLFolderType::FT_LANDMARK) - { - lib_landmarks = lib_cats->get(i)->getUUID(); - break; - } - } - if (lib_landmarks.isNull()) - { - llerror("Library inventory is missing Landmarks", 0); - return; - } - - LLInventoryModel::cat_array_t* lm_cats = NULL; - LLInventoryModel::item_array_t* lm_items = NULL; - gInventory.getDirectDescendentsOf(lib_landmarks, lm_cats, lm_items); - if (!lm_items) return; - - const LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); - if (favorites_id.isNull()) - { - llerror("My Inventory is missing My Favorites", 0); - return; - } - - S32 lm_count = lm_items->count(); - for (S32 i = 0; i < lm_count; ++i) - { - LLInventoryItem* item = lm_items->get(i); - if (item->getUUID().isNull()) continue; - - copy_inventory_item(gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - favorites_id, - std::string(), - LLPointer(NULL)); - } -} - - // Returns false to skip other idle processing. Should only return // true when all initialization done. bool idle_startup() @@ -1705,12 +1652,6 @@ bool idle_startup() llinfos << "Creating Inventory Views" << llendl; LLFloaterReg::getInstance("inventory"); - //default initial content for Favorites Bar - if (gAgent.isFirstLogin()) - { - populate_favorites_bar(); - } - LLStartUp::setStartupState( STATE_MISC ); return FALSE; } -- cgit v1.2.3 From 4ff75762d1965457ba5e4e2d952defe81f85d149 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 20 Jan 2010 14:46:15 -0800 Subject: FIX EXT-4052: Make sure bounceback url has a scheme Review #83 The function LLMediaEntry::checkCandidateURL() assumes the URL passed in at least has a scheme part (i.e. a ":"). This fixes the bounceBack code to assure that. --- indra/newview/llvovolume.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d5dd19e470..295c0c8010 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1852,12 +1852,22 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index) if (mep && impl) { std::string url = mep->getCurrentURL(); + // Look for a ":", if not there, assume "http://" + if (!url.empty() && std::string::npos == url.find(':')) + { + url = "http://" + url; + } // If the url we're trying to "bounce back" to is either empty or not // allowed by the whitelist, try the home url. If *that* doesn't work, // set the media as failed and unload it if (url.empty() || !mep->checkCandidateUrl(url)) { url = mep->getHomeURL(); + // Look for a ":", if not there, assume "http://" + if (!url.empty() && std::string::npos == url.find(':')) + { + url = "http://" + url; + } } if (url.empty() || !mep->checkCandidateUrl(url)) { -- cgit v1.2.3