mirror of
https://github.com/moodle/moodle.git
synced 2025-05-01 22:18:03 +02:00
"REPOSITORY/MDL-18356, append extenstions to file names smartly"
This commit is contained in:
parent
13036898c7
commit
0e51661b24
@ -162,7 +162,12 @@ class repository_flickr extends repository {
|
||||
} else {
|
||||
$format = 'jpg';
|
||||
}
|
||||
$ret['list'][] = array('title'=>$p['title'].'.'.$format,'source'=>$p['id'],
|
||||
$format = '.'.$format;
|
||||
// append extensions to the files
|
||||
if (substr($p['title'], strlen($p['title'])-strlen($format)) != $format) {
|
||||
$p['title'] .= $format;
|
||||
}
|
||||
$ret['list'][] = array('title'=>$p['title'],'source'=>$p['id'],
|
||||
'id'=>$p['id'],'thumbnail'=>$this->flickr->buildPhotoURL($p, 'Square'),
|
||||
'date'=>'', 'size'=>'unknown', 'url'=>$photos_url.$p['id']);
|
||||
}
|
||||
|
@ -224,7 +224,12 @@ class repository_flickr_public extends repository {
|
||||
} else {
|
||||
$format = 'jpg';
|
||||
}
|
||||
$ret['list'][] = array('title'=>$p['title'].'.'.$format,'source'=>$p['id'],
|
||||
$format = '.'.$format;
|
||||
// append extensions to the files
|
||||
if (substr($p['title'], strlen($p['title'])-strlen($format)) != $format) {
|
||||
$p['title'] .= $format;
|
||||
}
|
||||
$ret['list'][] = array('title'=>$p['title'], 'source'=>$p['id'],
|
||||
'id'=>$p['id'],'thumbnail'=>$this->flickr->buildPhotoURL($p, 'Square'),
|
||||
'date'=>'', 'size'=>'unknown', 'url'=>'http://www.flickr.com/photos/'.$p['owner'].'/'.$p['id']);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user