From 1235da40f858cebed5d999dc35196ab62d3de77e Mon Sep 17 00:00:00 2001 From: thickbrick Date: Fri, 1 Apr 2011 16:29:49 +0300 Subject: Fix #838: disable hiding of stream urls NoObscuredURL Patch from Henri Beauchamp, applied by hand because of changes between Imprudence and Snowglobe. --- linden/indra/llinventory/llparcel.cpp | 13 +------ linden/indra/llinventory/llparcel.h | 6 --- linden/indra/newview/llmediaremotectrl.cpp | 2 +- linden/indra/newview/llpanellandaudio.cpp | 8 ---- linden/indra/newview/llpanellandaudio.h | 1 - linden/indra/newview/llpanellandmedia.cpp | 38 +------------------ .../skins/default/xui/en-us/floater_about_land.xml | 44 ++++------------------ 7 files changed, 11 insertions(+), 101 deletions(-) (limited to 'linden') diff --git a/linden/indra/llinventory/llparcel.cpp b/linden/indra/llinventory/llparcel.cpp index 39605eb..f2c6e97 100644 --- a/linden/indra/llinventory/llparcel.cpp +++ b/linden/indra/llinventory/llparcel.cpp @@ -195,8 +195,6 @@ void LLParcel::init(const LLUUID &owner_id, mMediaID.setNull(); mMediaAutoScale = 0; mMediaLoop = TRUE; - mObscureMedia = 1; - mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); @@ -691,9 +689,8 @@ void LLParcel::packMessage(LLSD& msg) msg["auto_scale"] = getMediaAutoScale(); msg["media_loop"] = getMediaLoop(); msg["media_current_url"] = getMediaCurrentURL(); - msg["obscure_media"] = getObscureMedia(); - msg["obscure_music"] = getObscureMusic(); - msg["media_id"] = getMediaID(); + msg["obscure_media"] = FALSE; // OBSOLETE - no longer used + msg["obscure_music"] = FALSE; // OBSOLETE - no longer used msg["media_allow_navigate"] = getMediaAllowNavigate(); msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom(); msg["media_url_timeout"] = getMediaURLTimeout(); @@ -757,8 +754,6 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) msg->getS32("MediaData", "MediaWidth", mMediaWidth); msg->getS32("MediaData", "MediaHeight", mMediaHeight); msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop ); - msg->getU8 ( "MediaData", "ObscureMedia", mObscureMedia ); - msg->getU8 ( "MediaData", "ObscureMusic", mObscureMusic ); } else { @@ -766,8 +761,6 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) // thats what we want -- AW setMediaDesc(std::string("No Description available without Server Upgrade")); mMediaLoop = true; - mObscureMedia = true; - mObscureMusic = true; } if(msg->getNumberOfBlocks("MediaLinkSharing") > 0) @@ -1233,8 +1226,6 @@ void LLParcel::clearParcel() setMediaDesc(LLStringUtil::null); setMediaAutoScale(0); setMediaLoop(TRUE); - mObscureMedia = 1; - mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; setMediaCurrentURL(LLStringUtil::null); diff --git a/linden/indra/llinventory/llparcel.h b/linden/indra/llinventory/llparcel.h index f102ec4..52f97de 100644 --- a/linden/indra/llinventory/llparcel.h +++ b/linden/indra/llinventory/llparcel.h @@ -244,8 +244,6 @@ public: void setMediaID(const LLUUID& id) { mMediaID = id; } void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; } void setMediaLoop (U8 loop) { mMediaLoop = loop; } - void setObscureMedia( U8 flagIn ) { mObscureMedia = flagIn; } - void setObscureMusic( U8 flagIn ) { mObscureMusic = flagIn; } void setMediaWidth(S32 width); void setMediaHeight(S32 height); void setMediaCurrentURL(const std::string& url); @@ -352,8 +350,6 @@ public: U8 getMediaAutoScale() const { return mMediaAutoScale; } U8 getMediaLoop() const { return mMediaLoop; } const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; } - U8 getObscureMedia() const { return mObscureMedia; } - U8 getObscureMusic() const { return mObscureMusic; } U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; } LLSD getMediaURLFilterList() const { return mMediaURLFilterList; } U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; } @@ -645,8 +641,6 @@ protected: U8 mMediaAutoScale; U8 mMediaLoop; std::string mMediaCurrentURL; - U8 mObscureMedia; - U8 mObscureMusic; LLUUID mMediaID; U8 mMediaURLFilterEnable; LLSD mMediaURLFilterList; diff --git a/linden/indra/newview/llmediaremotectrl.cpp b/linden/indra/newview/llmediaremotectrl.cpp index 8186293..2f6dbdf 100644 --- a/linden/indra/newview/llmediaremotectrl.cpp +++ b/linden/indra/newview/llmediaremotectrl.cpp @@ -172,7 +172,7 @@ void LLMediaRemoteCtrl::enableMediaButtons() { // Set the tooltip // Put this text into xui file - media_url = parcel->getObscureMedia() ? mControls->getString("media_hidden_label") : parcel->getMediaURL(); + media_url = parcel->getMediaURL(); media_type = parcel->getMediaType(); play_media_enabled = true; diff --git a/linden/indra/newview/llpanellandaudio.cpp b/linden/indra/newview/llpanellandaudio.cpp index 0247009..8d902b6 100644 --- a/linden/indra/newview/llpanellandaudio.cpp +++ b/linden/indra/newview/llpanellandaudio.cpp @@ -91,9 +91,6 @@ BOOL LLPanelLandAudio::postBuild() mMusicURLEdit = getChild("music_url"); childSetCommitCallback("music_url", onCommitAny, this); - mMusicUrlCheck = getChild("hide_music_url"); - childSetCommitCallback("hide_music_url", onCommitAny, this); - return TRUE; } @@ -117,9 +114,6 @@ void LLPanelLandAudio::refresh() mMusicURLEdit->setText(parcel->getMusicURL()); mMusicURLEdit->setEnabled( can_change_media ); - mMusicUrlCheck->set( parcel->getObscureMusic() ); - mMusicUrlCheck->setEnabled( can_change_media ); - mCheckSoundLocal->set( parcel->getSoundLocal() ); mCheckSoundLocal->setEnabled( can_change_media ); @@ -154,7 +148,6 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) BOOL sound_local = self->mCheckSoundLocal->get(); int voice_setting = self->mRadioVoiceChat->getSelectedIndex(); std::string music_url = self->mMusicURLEdit->getText(); - U8 obscure_music = self->mMusicUrlCheck->get(); BOOL voice_enabled; @@ -185,7 +178,6 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); parcel->setMusicURL(music_url); - parcel->setObscureMusic(obscure_music); // Send current parcel data upstream to server LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); diff --git a/linden/indra/newview/llpanellandaudio.h b/linden/indra/newview/llpanellandaudio.h index 3d5d633..82e27f6 100644 --- a/linden/indra/newview/llpanellandaudio.h +++ b/linden/indra/newview/llpanellandaudio.h @@ -55,7 +55,6 @@ private: LLCheckBoxCtrl* mCheckSoundLocal; LLRadioGroup* mRadioVoiceChat; LLLineEditor* mMusicURLEdit; - LLCheckBoxCtrl* mMusicUrlCheck; LLSafeHandle& mParcel; }; diff --git a/linden/indra/newview/llpanellandmedia.cpp b/linden/indra/newview/llpanellandmedia.cpp index b7df164..8a0be86 100644 --- a/linden/indra/newview/llpanellandmedia.cpp +++ b/linden/indra/newview/llpanellandmedia.cpp @@ -80,9 +80,7 @@ LLPanelLandMedia::LLPanelLandMedia(LLParcelSelectionHandle& parcel) mMediaSizeCtrlLabel(NULL), mMediaTextureCtrl(NULL), mMediaAutoScaleCheck(NULL), - mMediaLoopCheck(NULL), - mMediaUrlCheck(NULL), - mMusicUrlCheck(NULL) + mMediaLoopCheck(NULL) { } @@ -132,12 +130,6 @@ BOOL LLPanelLandMedia::postBuild() mMediaLoopCheck = getChild("media_loop"); childSetCommitCallback("media_loop", onCommitAny, this); - mMediaUrlCheck = getChild("hide_media_url"); - childSetCommitCallback("hide_media_url", onCommitAny, this); - - mMusicUrlCheck = getChild("hide_music_url"); - childSetCommitCallback("hide_music_url", onCommitAny, this); - mMediaURLEdit = getChild("media_url"); childSetCommitCallback("media_url", onCommitAny, this); @@ -243,30 +235,6 @@ void LLPanelLandMedia::refresh() mMediaTypeCombo->setEnabled( can_change_media ); childSetText("mime_type", mime_type); - mMediaUrlCheck->set( parcel->getObscureMedia() ); - mMediaUrlCheck->setEnabled( can_change_media ); - - mMusicUrlCheck->set( parcel->getObscureMusic() ); - mMusicUrlCheck->setEnabled( can_change_media ); - - // don't display urls if you're not able to change it - // much requested change in forums so people can't 'steal' urls - // NOTE: bug#2009 means this is still vunerable - however, bug - // should be closed since this bug opens up major security issues elsewhere. - bool obscure_media = ! can_change_media && parcel->getObscureMedia(); - bool obscure_music = ! can_change_media && parcel->getObscureMusic(); - - // Special code to disable asterixes for html type - if(mime_type == "text/html") - { - obscure_media = false; - mMediaUrlCheck->set( 0 ); - mMediaUrlCheck->setEnabled( false ); - } - - mMusicURLEdit->setDrawAsterixes( obscure_music ); - mMediaURLEdit->setDrawAsterixes( obscure_media ); - mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () ); mMediaAutoScaleCheck->setEnabled ( can_change_media ); @@ -413,8 +381,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) std::string mime_type = self->childGetText("mime_type"); U8 media_auto_scale = self->mMediaAutoScaleCheck->get(); U8 media_loop = self->mMediaLoopCheck->get(); - U8 obscure_media = self->mMediaUrlCheck->get(); - U8 obscure_music = self->mMusicUrlCheck->get(); S32 media_width = (S32)self->mMediaWidthCtrl->get(); S32 media_height = (S32)self->mMediaHeightCtrl->get(); LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID(); @@ -441,8 +407,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata) parcel->setMediaID(media_id); parcel->setMediaAutoScale ( media_auto_scale ); parcel->setMediaLoop ( media_loop ); - parcel->setObscureMedia( obscure_media ); - parcel->setObscureMusic( obscure_music ); // Send current parcel data upstream to server LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml b/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml index c8aacba..453bf46 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml @@ -915,32 +915,18 @@ Only large parcels can be listed in search. right="-12" scale_image="true" width="70" /> - + width="120"> Return to Home URL in: - Minutes + minutes -