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
integration
prechecker
Commits
1777d32c
Commit
1777d32c
authored
Jun 29, 2015
by
Eloy Lafuente
Browse files
Merge branch 'wip-mdl-50675-m28' of
https://github.com/rajeshtaneja/moodle
into MOODLE_28_STABLE
parents
a8753fb8
82d0bd32
Changes
1
Hide whitespace changes
Inline
Side-by-side
repository/wikimedia/wikimedia.php
View file @
1777d32c
...
...
@@ -34,7 +34,7 @@ class wikimedia {
public
function
__construct
(
$url
=
''
)
{
if
(
empty
(
$url
))
{
$this
->
api
=
'http://commons.wikimedia.org/w/api.php'
;
$this
->
api
=
'http
s
://commons.wikimedia.org/w/api.php'
;
}
else
{
$this
->
api
=
$url
;
}
...
...
@@ -70,7 +70,7 @@ class wikimedia {
$this
->
_param
[
'titles'
]
.
=
(
'|'
.
urldecode
(
$title
));
}
}
else
{
$this
->
_param
[
'titles'
]
=
urldecode
(
$title
);
$this
->
_param
[
'titles'
]
=
urldecode
(
$title
s
);
}
$this
->
_param
[
'prop'
]
=
'imageinfo'
;
$this
->
_param
[
'iiprop'
]
=
'url'
;
...
...
@@ -116,7 +116,7 @@ class wikimedia {
return
$image_url
;
}
else
{
$thumb_url
=
''
;
$commons_main_dir
=
'http://upload.wikimedia.org/wikipedia/commons/'
;
$commons_main_dir
=
'http
s
://upload.wikimedia.org/wikipedia/commons/'
;
if
(
$image_url
)
{
$short_path
=
str_replace
(
$commons_main_dir
,
''
,
$image_url
);
$extension
=
strtolower
(
pathinfo
(
$short_path
,
PATHINFO_EXTENSION
));
...
...
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