aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorthickbrick2011-04-01 16:29:49 +0300
committerthickbrick2011-04-01 16:29:49 +0300
commit1235da40f858cebed5d999dc35196ab62d3de77e (patch)
tree7d1f1501b0f4979b37ce0112358c73ddac8606c1
parentFix 829: Several changes to media filter (diff)
downloadmeta-impy-1235da40f858cebed5d999dc35196ab62d3de77e.zip
meta-impy-1235da40f858cebed5d999dc35196ab62d3de77e.tar.gz
meta-impy-1235da40f858cebed5d999dc35196ab62d3de77e.tar.bz2
meta-impy-1235da40f858cebed5d999dc35196ab62d3de77e.tar.xz
Fix #838: disable hiding of stream urls
NoObscuredURL Patch from Henri Beauchamp, applied by hand because of changes between Imprudence and Snowglobe.
-rw-r--r--linden/indra/llinventory/llparcel.cpp13
-rw-r--r--linden/indra/llinventory/llparcel.h6
-rw-r--r--linden/indra/newview/llmediaremotectrl.cpp2
-rw-r--r--linden/indra/newview/llpanellandaudio.cpp8
-rw-r--r--linden/indra/newview/llpanellandaudio.h1
-rw-r--r--linden/indra/newview/llpanellandmedia.cpp38
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml44
7 files changed, 11 insertions, 101 deletions
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,
195 mMediaID.setNull(); 195 mMediaID.setNull();
196 mMediaAutoScale = 0; 196 mMediaAutoScale = 0;
197 mMediaLoop = TRUE; 197 mMediaLoop = TRUE;
198 mObscureMedia = 1;
199 mObscureMusic = 1;
200 mMediaWidth = 0; 198 mMediaWidth = 0;
201 mMediaHeight = 0; 199 mMediaHeight = 0;
202 setMediaCurrentURL(LLStringUtil::null); 200 setMediaCurrentURL(LLStringUtil::null);
@@ -691,9 +689,8 @@ void LLParcel::packMessage(LLSD& msg)
691 msg["auto_scale"] = getMediaAutoScale(); 689 msg["auto_scale"] = getMediaAutoScale();
692 msg["media_loop"] = getMediaLoop(); 690 msg["media_loop"] = getMediaLoop();
693 msg["media_current_url"] = getMediaCurrentURL(); 691 msg["media_current_url"] = getMediaCurrentURL();
694 msg["obscure_media"] = getObscureMedia(); 692 msg["obscure_media"] = FALSE; // OBSOLETE - no longer used
695 msg["obscure_music"] = getObscureMusic(); 693 msg["obscure_music"] = FALSE; // OBSOLETE - no longer used
696 msg["media_id"] = getMediaID();
697 msg["media_allow_navigate"] = getMediaAllowNavigate(); 694 msg["media_allow_navigate"] = getMediaAllowNavigate();
698 msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom(); 695 msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom();
699 msg["media_url_timeout"] = getMediaURLTimeout(); 696 msg["media_url_timeout"] = getMediaURLTimeout();
@@ -757,8 +754,6 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
757 msg->getS32("MediaData", "MediaWidth", mMediaWidth); 754 msg->getS32("MediaData", "MediaWidth", mMediaWidth);
758 msg->getS32("MediaData", "MediaHeight", mMediaHeight); 755 msg->getS32("MediaData", "MediaHeight", mMediaHeight);
759 msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop ); 756 msg->getU8 ( "MediaData", "MediaLoop", mMediaLoop );
760 msg->getU8 ( "MediaData", "ObscureMedia", mObscureMedia );
761 msg->getU8 ( "MediaData", "ObscureMusic", mObscureMusic );
762 } 757 }
763 else 758 else
764 { 759 {
@@ -766,8 +761,6 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
766 // thats what we want -- AW 761 // thats what we want -- AW
767 setMediaDesc(std::string("No Description available without Server Upgrade")); 762 setMediaDesc(std::string("No Description available without Server Upgrade"));
768 mMediaLoop = true; 763 mMediaLoop = true;
769 mObscureMedia = true;
770 mObscureMusic = true;
771 } 764 }
772 765
773 if(msg->getNumberOfBlocks("MediaLinkSharing") > 0) 766 if(msg->getNumberOfBlocks("MediaLinkSharing") > 0)
@@ -1233,8 +1226,6 @@ void LLParcel::clearParcel()
1233 setMediaDesc(LLStringUtil::null); 1226 setMediaDesc(LLStringUtil::null);
1234 setMediaAutoScale(0); 1227 setMediaAutoScale(0);
1235 setMediaLoop(TRUE); 1228 setMediaLoop(TRUE);
1236 mObscureMedia = 1;
1237 mObscureMusic = 1;
1238 mMediaWidth = 0; 1229 mMediaWidth = 0;
1239 mMediaHeight = 0; 1230 mMediaHeight = 0;
1240 setMediaCurrentURL(LLStringUtil::null); 1231 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:
244 void setMediaID(const LLUUID& id) { mMediaID = id; } 244 void setMediaID(const LLUUID& id) { mMediaID = id; }
245 void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; } 245 void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; }
246 void setMediaLoop (U8 loop) { mMediaLoop = loop; } 246 void setMediaLoop (U8 loop) { mMediaLoop = loop; }
247 void setObscureMedia( U8 flagIn ) { mObscureMedia = flagIn; }
248 void setObscureMusic( U8 flagIn ) { mObscureMusic = flagIn; }
249 void setMediaWidth(S32 width); 247 void setMediaWidth(S32 width);
250 void setMediaHeight(S32 height); 248 void setMediaHeight(S32 height);
251 void setMediaCurrentURL(const std::string& url); 249 void setMediaCurrentURL(const std::string& url);
@@ -352,8 +350,6 @@ public:
352 U8 getMediaAutoScale() const { return mMediaAutoScale; } 350 U8 getMediaAutoScale() const { return mMediaAutoScale; }
353 U8 getMediaLoop() const { return mMediaLoop; } 351 U8 getMediaLoop() const { return mMediaLoop; }
354 const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; } 352 const std::string& getMediaCurrentURL() const { return mMediaCurrentURL; }
355 U8 getObscureMedia() const { return mObscureMedia; }
356 U8 getObscureMusic() const { return mObscureMusic; }
357 U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; } 353 U8 getMediaURLFilterEnable() const { return mMediaURLFilterEnable; }
358 LLSD getMediaURLFilterList() const { return mMediaURLFilterList; } 354 LLSD getMediaURLFilterList() const { return mMediaURLFilterList; }
359 U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; } 355 U8 getMediaAllowNavigate() const { return mMediaAllowNavigate; }
@@ -645,8 +641,6 @@ protected:
645 U8 mMediaAutoScale; 641 U8 mMediaAutoScale;
646 U8 mMediaLoop; 642 U8 mMediaLoop;
647 std::string mMediaCurrentURL; 643 std::string mMediaCurrentURL;
648 U8 mObscureMedia;
649 U8 mObscureMusic;
650 LLUUID mMediaID; 644 LLUUID mMediaID;
651 U8 mMediaURLFilterEnable; 645 U8 mMediaURLFilterEnable;
652 LLSD mMediaURLFilterList; 646 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()
172 { 172 {
173 // Set the tooltip 173 // Set the tooltip
174 // Put this text into xui file 174 // Put this text into xui file
175 media_url = parcel->getObscureMedia() ? mControls->getString("media_hidden_label") : parcel->getMediaURL(); 175 media_url = parcel->getMediaURL();
176 media_type = parcel->getMediaType(); 176 media_type = parcel->getMediaType();
177 177
178 play_media_enabled = true; 178 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()
91 mMusicURLEdit = getChild<LLLineEditor>("music_url"); 91 mMusicURLEdit = getChild<LLLineEditor>("music_url");
92 childSetCommitCallback("music_url", onCommitAny, this); 92 childSetCommitCallback("music_url", onCommitAny, this);
93 93
94 mMusicUrlCheck = getChild<LLCheckBoxCtrl>("hide_music_url");
95 childSetCommitCallback("hide_music_url", onCommitAny, this);
96
97 return TRUE; 94 return TRUE;
98} 95}
99 96
@@ -117,9 +114,6 @@ void LLPanelLandAudio::refresh()
117 mMusicURLEdit->setText(parcel->getMusicURL()); 114 mMusicURLEdit->setText(parcel->getMusicURL());
118 mMusicURLEdit->setEnabled( can_change_media ); 115 mMusicURLEdit->setEnabled( can_change_media );
119 116
120 mMusicUrlCheck->set( parcel->getObscureMusic() );
121 mMusicUrlCheck->setEnabled( can_change_media );
122
123 mCheckSoundLocal->set( parcel->getSoundLocal() ); 117 mCheckSoundLocal->set( parcel->getSoundLocal() );
124 mCheckSoundLocal->setEnabled( can_change_media ); 118 mCheckSoundLocal->setEnabled( can_change_media );
125 119
@@ -154,7 +148,6 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata)
154 BOOL sound_local = self->mCheckSoundLocal->get(); 148 BOOL sound_local = self->mCheckSoundLocal->get();
155 int voice_setting = self->mRadioVoiceChat->getSelectedIndex(); 149 int voice_setting = self->mRadioVoiceChat->getSelectedIndex();
156 std::string music_url = self->mMusicURLEdit->getText(); 150 std::string music_url = self->mMusicURLEdit->getText();
157 U8 obscure_music = self->mMusicUrlCheck->get();
158 151
159 152
160 BOOL voice_enabled; 153 BOOL voice_enabled;
@@ -185,7 +178,6 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata)
185 parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); 178 parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan);
186 parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); 179 parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local);
187 parcel->setMusicURL(music_url); 180 parcel->setMusicURL(music_url);
188 parcel->setObscureMusic(obscure_music);
189 181
190 // Send current parcel data upstream to server 182 // Send current parcel data upstream to server
191 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); 183 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:
55 LLCheckBoxCtrl* mCheckSoundLocal; 55 LLCheckBoxCtrl* mCheckSoundLocal;
56 LLRadioGroup* mRadioVoiceChat; 56 LLRadioGroup* mRadioVoiceChat;
57 LLLineEditor* mMusicURLEdit; 57 LLLineEditor* mMusicURLEdit;
58 LLCheckBoxCtrl* mMusicUrlCheck;
59 58
60 LLSafeHandle<LLParcelSelection>& mParcel; 59 LLSafeHandle<LLParcelSelection>& mParcel;
61}; 60};
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)
80 mMediaSizeCtrlLabel(NULL), 80 mMediaSizeCtrlLabel(NULL),
81 mMediaTextureCtrl(NULL), 81 mMediaTextureCtrl(NULL),
82 mMediaAutoScaleCheck(NULL), 82 mMediaAutoScaleCheck(NULL),
83 mMediaLoopCheck(NULL), 83 mMediaLoopCheck(NULL)
84 mMediaUrlCheck(NULL),
85 mMusicUrlCheck(NULL)
86{ 84{
87} 85}
88 86
@@ -132,12 +130,6 @@ BOOL LLPanelLandMedia::postBuild()
132 mMediaLoopCheck = getChild<LLCheckBoxCtrl>("media_loop"); 130 mMediaLoopCheck = getChild<LLCheckBoxCtrl>("media_loop");
133 childSetCommitCallback("media_loop", onCommitAny, this); 131 childSetCommitCallback("media_loop", onCommitAny, this);
134 132
135 mMediaUrlCheck = getChild<LLCheckBoxCtrl>("hide_media_url");
136 childSetCommitCallback("hide_media_url", onCommitAny, this);
137
138 mMusicUrlCheck = getChild<LLCheckBoxCtrl>("hide_music_url");
139 childSetCommitCallback("hide_music_url", onCommitAny, this);
140
141 mMediaURLEdit = getChild<LLLineEditor>("media_url"); 133 mMediaURLEdit = getChild<LLLineEditor>("media_url");
142 childSetCommitCallback("media_url", onCommitAny, this); 134 childSetCommitCallback("media_url", onCommitAny, this);
143 135
@@ -243,30 +235,6 @@ void LLPanelLandMedia::refresh()
243 mMediaTypeCombo->setEnabled( can_change_media ); 235 mMediaTypeCombo->setEnabled( can_change_media );
244 childSetText("mime_type", mime_type); 236 childSetText("mime_type", mime_type);
245 237
246 mMediaUrlCheck->set( parcel->getObscureMedia() );
247 mMediaUrlCheck->setEnabled( can_change_media );
248
249 mMusicUrlCheck->set( parcel->getObscureMusic() );
250 mMusicUrlCheck->setEnabled( can_change_media );
251
252 // don't display urls if you're not able to change it
253 // much requested change in forums so people can't 'steal' urls
254 // NOTE: bug#2009 means this is still vunerable - however, bug
255 // should be closed since this bug opens up major security issues elsewhere.
256 bool obscure_media = ! can_change_media && parcel->getObscureMedia();
257 bool obscure_music = ! can_change_media && parcel->getObscureMusic();
258
259 // Special code to disable asterixes for html type
260 if(mime_type == "text/html")
261 {
262 obscure_media = false;
263 mMediaUrlCheck->set( 0 );
264 mMediaUrlCheck->setEnabled( false );
265 }
266
267 mMusicURLEdit->setDrawAsterixes( obscure_music );
268 mMediaURLEdit->setDrawAsterixes( obscure_media );
269
270 mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () ); 238 mMediaAutoScaleCheck->set( parcel->getMediaAutoScale () );
271 mMediaAutoScaleCheck->setEnabled ( can_change_media ); 239 mMediaAutoScaleCheck->setEnabled ( can_change_media );
272 240
@@ -413,8 +381,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
413 std::string mime_type = self->childGetText("mime_type"); 381 std::string mime_type = self->childGetText("mime_type");
414 U8 media_auto_scale = self->mMediaAutoScaleCheck->get(); 382 U8 media_auto_scale = self->mMediaAutoScaleCheck->get();
415 U8 media_loop = self->mMediaLoopCheck->get(); 383 U8 media_loop = self->mMediaLoopCheck->get();
416 U8 obscure_media = self->mMediaUrlCheck->get();
417 U8 obscure_music = self->mMusicUrlCheck->get();
418 S32 media_width = (S32)self->mMediaWidthCtrl->get(); 384 S32 media_width = (S32)self->mMediaWidthCtrl->get();
419 S32 media_height = (S32)self->mMediaHeightCtrl->get(); 385 S32 media_height = (S32)self->mMediaHeightCtrl->get();
420 LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID(); 386 LLUUID media_id = self->mMediaTextureCtrl->getImageAssetID();
@@ -441,8 +407,6 @@ void LLPanelLandMedia::onCommitAny(LLUICtrl*, void *userdata)
441 parcel->setMediaID(media_id); 407 parcel->setMediaID(media_id);
442 parcel->setMediaAutoScale ( media_auto_scale ); 408 parcel->setMediaAutoScale ( media_auto_scale );
443 parcel->setMediaLoop ( media_loop ); 409 parcel->setMediaLoop ( media_loop );
444 parcel->setObscureMedia( obscure_media );
445 parcel->setObscureMusic( obscure_music );
446 410
447 // Send current parcel data upstream to server 411 // Send current parcel data upstream to server
448 LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); 412 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.
915 right="-12" 915 right="-12"
916 scale_image="true" 916 scale_image="true"
917 width="70" /> 917 width="70" />
918 <check_box
919 bottom_delta="-22"
920 enabled="true"
921 follows="left|top"
922 font="SansSerifSmall"
923 height="16"
924 initial_value="false"
925 label="Hide URL"
926 left="80"
927 mouse_opaque="true"
928 name="hide_media_url"
929 radio_style="false"
930 tool_tip="Checking this option will hide the media URL from any non-authorized viewers of this parcel information. Note this is not available for HTML types."
931 width="150" />
932 <text 918 <text
933 bottom_delta="0" 919 bottom_delta="-22"
934 follows="right|top" 920 follows="right|top"
935 font="SansSerifSmall" 921 font="SansSerifSmall"
936 halign="right" 922 halign="left"
937 height="16" 923 height="16"
938 length="1" 924 length="1"
939 name="media_reset" 925 name="media_reset"
940 right="-164" 926 left="80"
941 tool_tip="Amount of time until parcel automatically reverts to default URL (0 for never return)" 927 tool_tip="Amount of time until parcel automatically reverts to default URL (0 for never return)"
942 type="string" 928 type="string"
943 width="185"> 929 width="120">
944 Return to Home URL in: 930 Return to Home URL in:
945 </text> 931 </text>
946 <spinner 932 <spinner
@@ -948,14 +934,13 @@ Only large parcels can be listed in search.
948 decimal_digits="0" 934 decimal_digits="0"
949 enabled="false" 935 enabled="false"
950 follows="right|top" 936 follows="right|top"
951 halign="right"
952 height="16" 937 height="16"
953 increment="1" 938 increment="1"
954 initial_val="0" 939 initial_val="0"
955 max_val="1024" 940 max_val="1024"
956 min_val="0" 941 min_val="0"
957 name="media_reset_time" 942 name="media_reset_time"
958 right="-90" 943 left_delta="126"
959 tool_tip="Amount of time until parcel reverts to default URL (0 for never return)" 944 tool_tip="Amount of time until parcel reverts to default URL (0 for never return)"
960 width="64" /> 945 width="64" />
961 <text 946 <text
@@ -964,12 +949,11 @@ Only large parcels can be listed in search.
964 font="SansSerifSmall" 949 font="SansSerifSmall"
965 halign="left" 950 halign="left"
966 height="16" 951 height="16"
967 left_delta="70" 952 left_delta="72"
968 length="1" 953 length="1"
969 name="minutes" 954 name="minutes"
970 right="-10"
971 type="string"> 955 type="string">
972 Minutes 956 minutes
973 </text> 957 </text>
974 <text 958 <text
975 bottom_delta="-22" 959 bottom_delta="-22"
@@ -1315,20 +1299,6 @@ Select the thumbnail to choose a different texture.
1315 name="music_url" 1299 name="music_url"
1316 right="-15" 1300 right="-15"
1317 select_on_focus="true" /> 1301 select_on_focus="true" />
1318 <check_box
1319 bottom_delta="-25"
1320 enabled="true"
1321 follows="left|top"
1322 font="SansSerifSmall"
1323 height="16"
1324 initial_value="false"
1325 label="Hide URL"
1326 left="80"
1327 mouse_opaque="true"
1328 name="hide_music_url"
1329 radio_style="false"
1330 tool_tip="Checking this option will hide the music URL from any non-authorized viewers of this parcel information."
1331 width="150" />
1332 <text 1302 <text
1333 bottom_delta="-65" 1303 bottom_delta="-65"
1334 follows="left|top" 1304 follows="left|top"