Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e01e1ef9
Commit
e01e1ef9
authored
Jan 28, 2010
by
Richard Mansfield
Browse files
Avoid warning in logs caused by unset variable (bug #513331)
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
22a7fa71
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/blocktype/externalvideo/lib.php
View file @
e01e1ef9
...
...
@@ -58,11 +58,11 @@ class PluginBlocktypeExternalvideo extends SystemBlocktype {
public
static
function
render_instance
(
BlockInstance
$instance
,
$editing
=
false
)
{
$configdata
=
$instance
->
get
(
'configdata'
);
$result
=
''
;
$url
=
hsc
(
self
::
make_video_url
(
$configdata
[
'videoid'
]));
$width
=
(
!
empty
(
$configdata
[
'width'
]))
?
hsc
(
$configdata
[
'width'
])
:
self
::
$default_width
;
$height
=
(
!
empty
(
$configdata
[
'height'
]))
?
hsc
(
$configdata
[
'height'
])
:
self
::
$default_height
;
if
(
isset
(
$configdata
[
'videoid'
]))
{
$url
=
hsc
(
self
::
make_video_url
(
$configdata
[
'videoid'
]));
$result
.
=
'<div class="mediaplayer-container center"><div class="mediaplayer">'
;
$result
.
=
'<object width="'
.
$width
.
'" height="'
.
$height
.
'">'
;
$result
.
=
'<param name="movie" value="'
.
$url
.
'"></param>'
;
...
...
@@ -89,7 +89,7 @@ class PluginBlocktypeExternalvideo extends SystemBlocktype {
'title'
=>
get_string
(
'videourl'
,
'blocktype.externalvideo'
),
'description'
=>
get_string
(
'videourldescription2'
,
'blocktype.externalvideo'
)
.
self
::
get_html_of_supported_websites
(),
'width'
=>
'90%'
,
'defaultvalue'
=>
$configdata
[
'videoid'
],
'defaultvalue'
=>
isset
(
$configdata
[
'videoid'
]
)
?
$configdata
[
'videoid'
]
:
null
,
'rules'
=>
array
(
'required'
=>
true
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment